/* =============================================
   Avochem Nutrition – Global Stylesheet
   ============================================= */

/* Material Symbols icon rendering */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    line-height: 1;
}

/* ── Navbar ── */
#navbar {
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}
#navbar.scrolled {
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

/* Active nav link */
.nav-link.active {
    color: #0d631b;
    border-bottom: 2px solid #0d631b;
    padding-bottom: 2px;
    font-weight: 700;
}

/* ── Cards ── */
.card-shadow {
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.card-hover {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card-hover:hover {
    box-shadow: 0 8px 30px rgba(46,125,50,0.12);
    transform: translateY(-4px);
}

/* ── Hero section ── */
.hero-overlay {
    background: linear-gradient(180deg, rgba(251,249,248,0) 30%, rgba(251,249,248,1) 100%);
}
.hero-curved {
    border-radius: 0 0 50% 50% / 0 0 10% 10%;
}

/* ── Product detail overlay ── */
#product-overlay {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: #fbf9f8;
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#product-overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* Split area fills remaining height below navbar */
#product-overlay .pd-split {
    flex: 1;
    min-height: 0;
}

/* ── MOBILE: single scroll column ── */
@media (max-width: 767px) {
    #product-overlay .pd-split {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    #product-image-panel {
        width: 100%;
        aspect-ratio: 4/3;
        flex-shrink: 0;
        overflow: hidden;
        background: #f0eded;
    }
    #product-info-panel {
        width: 100%;
        overflow: visible;
        padding-bottom: 100px;
    }
}

/* ── DESKTOP: side-by-side fixed panels ── */
@media (min-width: 768px) {
    #product-overlay .pd-split {
        display: flex;
        flex-direction: row;
        overflow: hidden;
    }
    #product-image-panel {
        width: 50%;
        height: 100%;
        overflow: hidden;
        flex-shrink: 0;
        background: #f0eded;
    }
    #product-info-panel {
        width: 50%;
        height: 100%;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #e4e2e1 transparent;
    }
    #product-info-panel::-webkit-scrollbar { width: 5px; }
    #product-info-panel::-webkit-scrollbar-track { background: transparent; }
    #product-info-panel::-webkit-scrollbar-thumb { background: #e4e2e1; border-radius: 10px; }
}

/* Slider */
#pd-slides {
    display: flex;
    height: 100%;
    will-change: transform;
}
.pd-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0eded;
}
.pd-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ── Language switcher ── */
#lang-switcher {
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}
.lang-btn {
    color: #40493d;
}
.lang-btn.active {
    background-color: #0d631b;
    color: #ffffff;
}
.lang-btn:not(.active):hover {
    background-color: #f0eded;
}

/* ── Filter pills ── */
.filter-btn {
    transition: all 0.2s ease;
}
.filter-btn.active {
    background-color: #0d631b;
    color: #ffffff;
}

/* ── Contact form ── */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 0.5rem;
    border: 2px solid #eae8e7;
    outline: none;
    transition: border-color 0.2s ease;
    background: white;
    font-family: 'Inter', sans-serif;
}
.form-input:focus {
    border-color: #0d631b;
}

/* ── Mobile menu ── */
#mobile-menu {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 16px 24px 24px;
    background: #fbf9f8;
    border-top: 1px solid #eae8e7;
}
#mobile-menu.open {
    display: flex;
}

/* ── Utility ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 32px;
    background-color: #0d631b;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.04em;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease;
}
.btn-primary:hover  { opacity: 0.9; }
.btn-primary:active { transform: scale(0.97); }

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 32px;
    background: transparent;
    color: #0d631b;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.04em;
    border-radius: 0.5rem;
    border: 2px solid #0d631b;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
}
.btn-outline:hover  { background-color: rgba(13,99,27,0.05); }
.btn-outline:active { transform: scale(0.97); }

/* Toast notification */
#toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1b1c1c;
    color: #fff;
    padding: 12px 24px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 200;
    white-space: nowrap;
}
#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Image lazy load fade */
img[data-src] { opacity: 0; transition: opacity 0.4s ease; }
img.loaded    { opacity: 1; }

/* Placeholder image background */
.img-placeholder {
    background: linear-gradient(135deg, #e4e2e1 0%, #f0eded 100%);
}

/* ── Admin-shared styles ── */
.admin-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 0.5rem;
    color: #40493d;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.admin-sidebar-link:hover,
.admin-sidebar-link.active {
    background: rgba(13,99,27,0.10);
    color: #0d631b;
}
