/* ========================================
   BASE, UTILITIES & FONTS
   ======================================== */
   :root {
    --primary-color: #1a1a1a;
    --accent-color: #1a3a2e;
    --accent-color-dark: #112820;
    --bg-color: #ffffff;
    --light-bg-color: #f8f9fa;
    --text-color: #333333;
    --light-text-color: #6c757d;
    --border-color: #dee2e6;
    --dark-bg-color: #121212;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; /* Added for extra safety against overflow */ }
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 100px 0; }
.section-title { font-family: 'Playfair Display', serif; font-size: 2.8rem; margin-bottom: 20px; text-align: center; }
.section-subtitle { text-align: center; font-size: 1.1rem; color: var(--light-text-color); max-width: 600px; margin: 0 auto 60px auto; }
.cta-button { display: inline-block; background: var(--accent-color); color: var(--bg-color); padding: 14px 35px; border-radius: 50px; text-decoration: none; font-weight: 600; cursor: pointer; border: 2px solid var(--accent-color); transition: all 0.3s ease; }
.cta-button:hover { background: var(--accent-color-dark); border-color: var(--accent-color-dark); }

/* Updated Page Header with background image support */
.page-header {
    padding: 120px 0;
    background-color: var(--light-bg-color);
    text-align: center;
    background-size: cover;
    background-position: center;
    position: relative;
    color: var(--primary-color); /* Default text color */
}
.page-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}
body:is(:has(#page-about), :has(#page-products), :has(#page-contact)) .page-header::before {
    opacity: 1; /* Activate overlay only for pages with images */
}
body:is(:has(#page-about), :has(#page-products), :has(#page-contact)) .page-header {
    color: #ffffff; /* White text for pages with images */
}
body:has(#page-about) .page-header { background-image: url('https://images.unsplash.com/photo-1552664730-d307ca884978?q=80&w=2070&auto=format&fit=crop'); }
body:has(#page-products) .page-header { background-image: url('https://images.unsplash.com/photo-1605161049537-6f4e6de21142?q=80&w=1974&auto=format&fit=crop'); }
body:has(#page-contact) .page-header { background-image: url('https://images.unsplash.com/photo-1587560699334-cc426240169f?q=80&w=2070&auto=format&fit=crop'); }

.page-header h1, .page-header p {
    position: relative;
    z-index: 2;
}
.page-header h1 { font-family: 'Playfair Display', serif; font-size: 3.5rem; }


/* ========================================
   HEADER & NAVIGATION
   ======================================== */
header { background: rgba(199, 198, 188, 0.368); backdrop-filter: blur(10px); padding: 15px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; }
nav { display: flex; justify-content: space-between; align-items: center; }
.logo { display: block; }
.logo img { height: 83px; width: auto; display: block; border-radius: 50%; }
.nav-links-container { flex-grow: 1; display: flex; justify-content: center; }
.nav-links { display: flex; list-style: none; gap: 35px; }
.nav-links a { text-decoration: none; color: var(--primary-color); font-weight: 500; position: relative; padding: 5px 0; color: rgb(0, 0, 0); }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--accent-color); transition: width 0.3s ease; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* Search Bar */
.nav-actions { display: flex; align-items: center; gap: 20px; }
.search-container { position: relative; }
.search-bar { display: flex; align-items: center; background: var(--light-bg-color); border: 1px solid var(--border-color); border-radius: 50px; padding: 5px; }
.search-bar input { border: none; background: transparent; outline: none; padding: 5px 10px; font-size: 0.9rem; width: 200px; transition: width 0.3s ease; }
.search-bar input:focus { width: 250px; }
.search-bar svg { color: var(--light-text-color); margin: 0 8px; }
.search-suggestions { position: absolute; top: 110%; right: 0; width: 300px; background: var(--bg-color); border-radius: 8px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); list-style: none; display: none; z-index: 10; max-height: 300px; overflow-y: auto; }
.search-suggestions a { display: flex; align-items: center; gap: 10px; padding: 12px 15px; color: var(--text-color); text-decoration: none; }
.search-suggestions a:hover { background: var(--light-bg-color); }
.search-suggestions img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; }
.standalone-search { max-width: 500px; margin: 0 auto 60px auto; }
.standalone-search .search-bar input { width: 100%; }

.hamburger { display: none; cursor: pointer; background: none; border: none; z-index: 1001; }
.hamburger-bar { display: block; width: 25px; height: 3px; margin: 5px auto; background: var(--primary-color); transition: all 0.3s ease-in-out; }

/* ========================================
   HOME PAGE & GENERIC SECTIONS
   ======================================== */
.hero {
    position: relative;
    color: var(--bg-color);
    height: 90vh;
    display: flex;
    align-items: flex-end; /* Align content to the bottom */
    justify-content: flex-start; /* Align content to the left */
    background-size: cover;
    background-position: center;
}
.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}
.hero-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero::after { /* Add overlay for text readability */
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent 50%);
    z-index: 2;
}
.hero-content {
    position: relative;
    z-index: 3;
    text-align: left;
    max-width: 600px;
    padding: 60px;
}
.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    line-height: 1.2;
    font-weight: 700;
}
.hero p {
    font-size: 1.15rem;
    margin: 20px 0 30px 0;
    opacity: 0.9;
}

.intro-section { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.intro-card { text-align: center; }
.intro-card svg { color: var(--accent-color); width: 48px; height: 48px; margin-bottom: 15px; }

/* ========================================
   PRODUCTS PAGE & CARDS
   ======================================== */
/* FIXED: Reduced minmax to prevent overflow on small screens */
#products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }

/* Homepage Product Carousel */
#featured-products-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 90%;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0 30px 0;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
#featured-products-grid::-webkit-scrollbar { display: none; } /* Chrome, Safari, Opera */

@media (min-width: 768px) {
    #featured-products-grid { grid-auto-columns: 45%; }
}
@media (min-width: 1024px) {
    #featured-products-grid { grid-auto-columns: 31%; }
}


.product-card {
    background: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
}
.product-card:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(0,0,0,0.1); }
.product-image { width: 100%; height: 250px; object-fit: cover; }
.product-info { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; }
.product-title { font-family: 'Playfair Display', serif; font-size: 1.6rem; margin-bottom: 10px; }
.product-description { color: var(--light-text-color); margin-bottom: 20px; flex-grow: 1; }
.product-info .cta-button { align-self: flex-start; padding: 10px 25px; font-size: 0.9rem; }

/* Product Page Pagination */
.product-pagination-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 50px;
}
.pagination-btn {
    background: var(--accent-color);
    color: var(--bg-color);
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--accent-color);
    transition: all 0.3s ease;
}
.pagination-btn:hover {
    background: var(--accent-color-dark);
    border-color: var(--accent-color-dark);
}
.pagination-btn:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}


/* ========================================
   PRODUCT DETAIL PAGE
   ======================================== */
.product-detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: flex-start; }
.product-gallery-main { margin-bottom: 15px; }
.product-gallery-main img { width: 100%; height: auto; max-height: 500px; object-fit: cover; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); }
.product-gallery-thumbnails { display: flex; gap: 10px; flex-wrap: wrap; }
.thumbnail-img { width: 80px; height: 80px; border-radius: 5px; object-fit: cover; cursor: pointer; border: 2px solid transparent; transition: border-color 0.3s ease; }
.thumbnail-img.active { border-color: var(--accent-color); }
.product-detail-content h1 { font-family: 'Playfair Display', serif; font-size: 3rem; margin-bottom: 20px; }
.product-detail-content h3 { font-size: 1.3rem; margin-top: 30px; margin-bottom: 15px; border-bottom: 2px solid var(--accent-color); padding-bottom: 8px; }
.product-detail-content ul { list-style-position: inside; padding-left: 5px; }
.product-detail-content li { margin-bottom: 8px; }

/* ========================================
   ABOUT PAGE
   ======================================== */
.about-section { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 60px; }
.about-image img { width: 100%; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.team-section { background-color: var(--light-bg-color); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.team-card { background: var(--bg-color); text-align: center; padding: 30px; border-radius: 10px; box-shadow: 0 5px 25px rgba(0,0,0,0.07); }
.team-card img { width: 123px; height: 170px; border-radius: 0; object-fit: cover; margin-bottom: 20px; }

/* ========================================
   CONTACT PAGE
   ======================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: flex-start; }
.contact-info-item { display: flex; gap: 20px; margin-bottom: 30px; }
.contact-info-item svg { flex-shrink: 0; width: 24px; color: var(--accent-color); margin-top: 5px; }
.contact-map iframe { width: 100%; height: 250px; border: 0; border-radius: 10px; }

/* ========================================
   MODAL, FOOTER, FIXED CTAs
   ======================================== */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 2000; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { background: var(--bg-color); padding: 40px; border-radius: 10px; max-width: 600px; width: 90%; position: relative; transform: scale(0.8); transition: transform 0.3s ease; max-height: 90vh; overflow-y: auto; }
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-close { position: absolute; top: 15px; right: 20px; font-size: 2rem; color: #aaa; cursor: pointer; }
.modal-content h3 { font-family: 'Playfair Display', serif; font-size: 1.8rem; margin-bottom: 25px; text-align: center; }
#infoModal .modal-content { text-align: center; }
.modal-icon { color: var(--accent-color); font-size: 4rem; margin-bottom: 20px; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; font-weight: 600; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 15px; border: 1px solid var(--border-color); border-radius: 5px; font-size: 1rem; }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(26, 58, 46, 0.1); }
.submit-btn { background: var(--accent-color); color: var(--bg-color); width: 100%; border: none; padding: 16px; border-radius: 5px; font-weight: 600; font-size: 1.1rem; cursor: pointer; transition: background-color 0.3s ease; display: flex; align-items: center; justify-content: center; gap: 10px; }
.submit-btn:disabled { background-color: #aaa; }
.spinner { border: 3px solid rgba(255,255,255,0.3); border-top: 3px solid #fff; border-radius: 50%; width: 20px; height: 20px; animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

footer { background-color: var(--primary-color); color: #a0a0a0; padding: 60px 0; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-col h4 { color: var(--bg-color); font-family: 'Playfair Display', serif; font-size: 1.3rem; margin-bottom: 20px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #a0a0a0; text-decoration: none; transition: color 0.3s; }
.footer-col a:hover { color: var(--bg-color); }

/* --- NEW: Styles for Footer Contact Icons --- */
.footer-col .contact-item {
    display: flex;
    align-items: flex-start; /* Aligns items to the top, good for multi-line text */
    gap: 12px; /* Creates space between the icon and the text */
}
.footer-col .contact-item svg {
    flex-shrink: 0; /* Prevents the icon from shrinking if space is tight */
    width: 18px;
    height: 18px;
    margin-top: 5px; /* Fine-tunes vertical alignment with the text line-height */
    color: var(--bg-color); /* Make icon stand out */
}
/* --- END: New Styles --- */

.footer-bottom { text-align: center; margin-top: 50px; padding-top: 30px; border-top: 1px solid #444; }

/* Desktop-only WhatsApp button (hidden on mobile by default) */
.whatsapp-desktop-button { 
    position: fixed; bottom: 25px; right: 25px; width: 60px; height: 60px; 
    background-color: green; color: white; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); z-index: 999; text-decoration: none; 
    transform: scale(0); animation: fadeInAndScale 0.5s forwards 1s; 
    transition: all 0.3s ease; 
}
.whatsapp-desktop-button:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.whatsapp-desktop-button svg { width: 32px; height: 32px; }
@keyframes fadeInAndScale { to { transform: scale(1); } }

/*
   NEW RULE: Hide mobile bottom bar by default on all screen sizes.
   This is the best practice for mobile-first elements.
*/
.mobile-bottom-bar {
    display: none;
}


/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .search-bar input { width: 150px; }
    .search-bar input:focus { width: 200px; }
    .nav-links-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--bg-color);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding-top: 100px;
        transition: right 0.4s ease-in-out;
    }
    .nav-links-container.mobile-active { right: 0; }
    .nav-links { flex-direction: column; align-items: flex-start; gap: 25px; padding: 0 40px; width: 100%; }
    .nav-actions { margin-left: auto; }
    .search-container { display: none; } /* Hide search bar from header on mobile */
    .hamburger { display: block; }
    .hamburger.active .hamburger-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .hamburger-bar:nth-child(2) { opacity: 0; }
    .hamburger.active .hamburger-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

@media (max-width: 768px) {
    .section, .page-header { padding: 60px 0; }
    .page-header { padding: 80px 0; }
    .section-title, .page-header h1 { font-size: 2.2rem; }
    
    .hero { height: 80vh; }
    .hero-content { padding: 30px; }
    .hero h1 { font-size: 2.8rem; }
    .hero p { font-size: 1rem; }

    .footer-grid { grid-template-columns: 1fr; }
    .product-detail-layout, .about-section, .contact-grid { grid-template-columns: 1fr; }
    .about-image { order: -1; margin-bottom: 30px; }
    .contact-details { margin-bottom: 40px; }
    
    /* Responsive Modal Form Fix */
    .modal-content { padding: 30px 20px; }
    .modal-content h3 { font-size: 1.4rem; }
    .form-input, .form-select, .form-textarea { padding: 12px; font-size: 0.95rem;}

    /* HIDE desktop WhatsApp button on mobile */
    .whatsapp-desktop-button { 
        display: none;
    }

    /* Styles for the new mobile bottom navigation bar */
    /* This ensures content doesn't get hidden behind the fixed bar */
    body { 
        padding-bottom: 70px; /* Add padding to the body for the bottom bar height */
    }
    
    .mobile-bottom-bar {
        display: flex; /* This OVERRIDES the default 'display: none' and makes the bar VISIBLE on mobile */
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px; 
        background-color: var(--primary-color); /* Dark background for visibility */
        box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
        z-index: 998; /* Ensure it stays above other content */
    }
    
    .mobile-bottom-bar .mobile-cta-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        text-decoration: none;
        color: #ffffff; /* White text/icon for contrast */
        font-size: 0.65rem;
        font-weight: 500;
        transition: color 0.3s ease;
        flex: 1; /* Distribute space evenly */
        padding: 5px;
    }

    .mobile-bottom-bar .mobile-cta-btn:hover {
        color: var(--accent-color); /* Highlight on hover */
    }

    .mobile-bottom-bar .mobile-cta-btn svg {
        width: 22px;
        height: 22px;
        margin-bottom: 3px; /* Space between icon and text */
    }

    /* Style for the central "Request a Quote" button - elevated and prominent */
    .mobile-bottom-bar .mobile-cta-quote {
        flex: 0 0 70px; /* Fixed width for the elevated button */
        height: 70px; /* Make it slightly taller */
        background-color: var(--accent-color);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transform: translateY(-20px); /* Elevate it above the bar */
        box-shadow: 0 -4px 15px rgba(0,0,0,0.3);
        border: 4px solid var(--primary-color); /* Border color matching the bar */
        color: white;
        text-decoration: none;
        transition: background-color 0.3s ease, transform 0.3s ease;
    }

    .mobile-bottom-bar .mobile-cta-quote:hover {
        background-color: var(--accent-color-dark);
        transform: translateY(-22px) scale(1.05);
    }

    .mobile-bottom-bar .mobile-cta-quote svg {
        width: 28px;
        height: 28px;
    }
}