/* ===========================================
   ZABIHA FRESH CO. - STYLESHEET
   =========================================== */

/* -------------------------------------------
   RESET & BASE STYLES
   ------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors */
    --primary-red: #c41e3a;
    --dark-red: #a01829;
    
    /* Neutral Colors */
    --dark-gray: #333;
    --medium-gray: #666;
    --light-gray: #f5f5f5;
    --cream: #faf8f6;
    --white: #F5E4D3;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--dark-gray);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
}

/* -------------------------------------------
   HEADER & NAVIGATION
   ------------------------------------------- */

/* Invisible hover trigger area at top of screen */
.header-trigger {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    z-index: 1999;
}

/* Fixed header wrapper */
.top-header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
}

/* Red gradient background - hidden by default, shows on hover */
.red-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 50%, #8b0000 100%);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: -1;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
}

/* Show red background on hover */
.header-trigger:hover ~ .top-header-wrapper .red-background,
.top-header-wrapper:hover .red-background {
    height: 140px;
    opacity: 1;
}

/* Top header bar with logo and icons */
.top-header {
    background: var(--primary-red);
    padding: 1.2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.top-header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Header left section - search icon */
.header-left {
    flex: 1;
    display: flex;
    align-items: center;
}

.search-toggle {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
}

.search-toggle:hover {
    transform: scale(1.1);
}

/* Header center - logo */
.header-center {
    flex: 0 0 auto;
}

.logo {
    height: 150px;
    width: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.08);
}

/* Header right section - phone icon */
.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.header-icon {
    color: var(--white);
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.3s;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-icon:hover {
    transform: scale(1.1);
}

.header-icon-text {
    margin-left: 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Navigation menu */
.main-nav {
    background: transparent;
    border-bottom: none;
    transition: all 0.4s ease;
    opacity: 1;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Nav gets white background on hover */
.header-trigger:hover ~ .top-header-wrapper .main-nav,
.top-header-wrapper:hover .main-nav {
    background: var(--white);
    border-bottom: 1px solid #e0e0e0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 3rem;
    padding: 1rem 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 0.5rem 0;
}

/* Nav links change to dark when banner appears */
.header-trigger:hover ~ .top-header-wrapper .nav-links a,
.top-header-wrapper:hover .nav-links a {
    color: var(--dark-gray);
}

/* Underline effect on nav links */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--white);
    transition: width 0.3s;
}

/* Underline changes to red when banner appears */
.header-trigger:hover ~ .top-header-wrapper .nav-links a::after,
.top-header-wrapper:hover .nav-links a::after {
    background: var(--primary-red);
}

.nav-links a:hover::after {
    width: 100%;
}

/* -------------------------------------------
   SEARCH OVERLAY
   ------------------------------------------- */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    overflow-y: auto;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-header {
    padding: 2rem;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 10;
}

.search-overlay-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-overlay-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: 'Lato', sans-serif;
    transition: border-color 0.3s;
}

.search-overlay-input:focus {
    outline: none;
    border-color: var(--primary-red);
}

.search-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--dark-gray);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.3s;
}

.search-close:hover {
    color: var(--primary-red);
}

.search-results-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.search-results-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--dark-gray);
}

.search-hint {
    color: var(--medium-gray);
    font-size: 1.1rem;
    text-align: center;
    padding: 3rem;
}

/* -------------------------------------------
   HERO SLIDESHOW
   ------------------------------------------- */
.hero-slideshow {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide.active {
    opacity: 1;
}

/* Position slide 2 image to show more of the top */
.slide.slide-2 {
    background-position: center top;
}

/* Blurred dark overlay on slides */
.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.slide-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 2rem;
}

.slide-title {
    font-size: 3.8rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    color: #F5E4D3;
}

.slide-subtitle {
    font-size: 1.8rem;
    letter-spacing: 1px;
    margin-bottom: 2rem;
    font-weight: 400;
    line-height: 1.8;
    color: #F5E4D3;
}

.slide-button {
    display: inline-block;
    background: var(--white);
    color: var(--primary-red);
    padding: 1rem 3rem;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.slide-button:hover {
    background: var(--primary-red);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

/* Slideshow navigation dots */
.slideshow-dots {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.dot {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active,
.dot:hover {
    background: var(--white);
}

/* -------------------------------------------
   SECTIONS - GENERAL STYLES
   ------------------------------------------- */
section {
    padding: 5rem 2rem;
    scroll-margin-top: 200px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--medium-gray);
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* -------------------------------------------
   PRODUCTS SECTION
   ------------------------------------------- */
#products {
    background: var(--cream);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.product-info {
    padding: 2rem;
}

.product-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

.product-description {
    color: var(--medium-gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.product-price {
    font-size: 1.5rem;
    color: var(--primary-red);
    font-weight: 700;
    margin-bottom: 1rem;
}

.product-button {
    display: inline-block;
    background: var(--primary-red);
    color: var(--white);
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 1rem;
}

.product-button:hover {
    background: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(196, 30, 58, 0.3);
}

/* -------------------------------------------
   ABOUT SECTION
   ------------------------------------------- */
#about {
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-red);
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--medium-gray);
}

.about-image {
    border-radius: 15px;
    overflow: hidden;
}

.about-image img {
    width: 125%;
    height: 125%;
    object-fit: cover;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.highlight-item {
    padding: 1.5rem;
    background: var(--cream);
    border-radius: 10px;
    border-left: 4px solid var(--primary-red);
}

.highlight-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
}

/* -------------------------------------------
   CONTACT SECTION
   ------------------------------------------- */
#contact {
    background: var(--light-gray);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info-section h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-red);
}

.info-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 10px;
}

.info-item h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
}

.info-item p {
    font-size: 1.1rem;
    color: var(--medium-gray);
}

.info-item a {
    color: var(--primary-red);
    text-decoration: none;
}

.info-item a:hover {
    text-decoration: underline;
}

/* Contact form */
.contact-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-red);
}

/* Error states */
.form-group input.error {
    border-color: #dc3545;
}

.form-group input.valid {
    border-color: #28a745;
}

.error-message {
    display: none;
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.error-message.show {
    display: block;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-button {
    background: var(--primary-red);
    color: var(--white);
    padding: 1rem 3rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
}

.submit-button:hover {
    background: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(196, 30, 58, 0.3);
}

/* -------------------------------------------
   PRODUCT ORDER INPUTS
   ------------------------------------------- */
.form-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-red);
}

.form-section-hint {
    font-size: 0.9rem;
    color: var(--medium-gray);
    margin-bottom: 1.5rem;
}

.product-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.product-input-group {
    margin-bottom: 0.5rem;
}

.product-input-group label {
    font-size: 1rem;
    font-weight: 600;
}

.input-with-price {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.input-with-price input {
    flex: 1;
    max-width: 150px;
}

.price-label {
    color: var(--primary-red);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

/* Order Summary */
.order-summary {
    background: var(--cream);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e0e0e0;
}

.summary-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--dark-gray);
    margin-bottom: 1rem;
    font-weight: 600;
}

.summary-items {
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.95rem;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item-name {
    color: var(--dark-gray);
}

.summary-item-price {
    color: var(--medium-gray);
    font-weight: 500;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 2px solid var(--primary-red);
    font-size: 1.2rem;
    font-weight: 700;
}

.summary-total span:last-child {
    color: var(--primary-red);
}

/* Number input styling */
input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Re-enable spinner for better UX */
.product-input-group input[type="number"] {
    -moz-appearance: auto;
}

.product-input-group input[type="number"]::-webkit-inner-spin-button,
.product-input-group input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: auto;
}

/* -------------------------------------------
   ORDER CONFIRMATION MODAL
   ------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 4000;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--dark-gray);
    margin-bottom: 1rem;
    text-align: center;
}

.modal-message {
    font-size: 1.1rem;
    color: var(--dark-gray);
    text-align: center;
    margin-bottom: 0.5rem;
}

.modal-note {
    font-size: 0.95rem;
    color: var(--medium-gray);
    text-align: center;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.modal-summary {
    background: var(--cream);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e0e0e0;
}

.modal-summary-title {
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.modal-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.95rem;
    color: var(--medium-gray);
}

.modal-summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 2px solid var(--primary-red);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark-gray);
}

.modal-summary-total span:last-child {
    color: var(--primary-red);
}

.modal-buttons {
    display: flex;
    gap: 1rem;
}

.modal-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-btn-back {
    background: var(--light-gray);
    color: var(--dark-gray);
}

.modal-btn-back:hover {
    background: #e0e0e0;
}

.modal-btn-confirm {
    background: var(--primary-red);
    color: white;
}

.modal-btn-confirm:hover {
    background: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(196, 30, 58, 0.3);
}

/* -------------------------------------------
   FOOTER
   ------------------------------------------- */
footer {
    background: var(--dark-gray);
    color: var(--white);
    text-align: center;
    padding: 2rem;
}

/* -------------------------------------------
   RESPONSIVE DESIGN
   ------------------------------------------- */
@media (max-width: 768px) {
    .slide-title {
        font-size: 2.2rem;
    }

    .slide-subtitle {
        font-size: 1rem;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        font-size: 0.85rem;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .about-highlights {
        grid-template-columns: 1fr;
    }

    .logo {
        height: 80px;
    }

    .top-header-container {
        padding: 0 1rem;
    }

    .header-icon-text {
        display: none;
    }

    /* Remove shadow on mobile to prevent dark line when nav hides */
    .top-header {
        box-shadow: none;
    }

    /* Hide the red gradient background on mobile */
    .red-background {
        display: none;
    }

    .input-with-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .input-with-price input {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .slide-title {
        font-size: 1.8rem;
    }

    .slide-subtitle {
        font-size: 0.9rem;
    }

    section {
        padding: 3rem 1rem;
    }
}