/* =========================================================
   DIOLIVO PREMIUM — Main Styles
   Design tokens, reset, typography, layout, header, footer
   ========================================================= */

/* ── Design Tokens ── */
:root {
    --dv-dark: #1a1a1a;
    --dv-gold: #C6A96C;
    --dv-gold-light: #d4b87a;
    --dv-gold-dark: #8B7D3C;
    --dv-white: #ffffff;
    --dv-bg: #fafaf8;
    --dv-border: #e8e4dc;
    --dv-border-light: #eee;
    --dv-muted: #888;
    --dv-text: #444;
    --dv-text-lighter: #555;

    --dv-font-head: 'Cormorant Garamond', Georgia, serif;
    --dv-font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --dv-container: 1280px;
    --dv-container-wide: 1440px;
    --dv-radius: 3px;

    --dv-tr-fast: 0.2s ease;
    --dv-tr-med: 0.35s cubic-bezier(.25,.46,.45,.94);
    --dv-tr-slow: 0.6s cubic-bezier(.25,.46,.45,.94);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0; padding: 0;
    font-family: var(--dv-font-body);
    font-size: 15px;
    line-height: 1.65;
    color: var(--dv-text);
    background: var(--dv-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--dv-dark); text-decoration: none; transition: color var(--dv-tr-fast); }
a:hover { color: var(--dv-gold); }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--dv-font-head);
    color: var(--dv-dark);
    font-weight: 500;
    line-height: 1.25;
    margin: 0 0 0.6em;
    letter-spacing: 0.01em;
}
h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: clamp(24px, 3.2vw, 32px); }
h3 { font-size: clamp(20px, 2.4vw, 26px); }
h4 { font-size: 20px; font-weight: 600; }
p { margin: 0 0 1em; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }

/* ── Utility ── */
.dv-container { max-width: var(--dv-container); margin: 0 auto; padding: 0 20px; }
.dv-container-wide { max-width: var(--dv-container-wide); margin: 0 auto; padding: 0 20px; }
.dv-wc-wrap { max-width: var(--dv-container); margin: 0 auto; padding: 40px 24px; }
.dv-main { min-height: 60vh; }
.dv-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Header ── */
.dv-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(198, 169, 108, 0.15);
}
.dv-header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 24px; max-width: var(--dv-container-wide); margin: 0 auto;
    gap: 24px;
}
.dv-logo { display: inline-block; line-height: 0; }
.dv-logo img { max-height: 44px; width: auto; display: block; }
.dv-nav { flex: 1; }
.dv-nav-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; justify-content: center; gap: 32px;
}
.dv-nav-list a {
    color: rgba(255, 255, 255, 0.88);
    font-family: var(--dv-font-body);
    font-size: 13px; font-weight: 500;
    letter-spacing: 0.1em; text-transform: uppercase;
    padding: 8px 0;
    position: relative;
}
.dv-nav-list a:hover { color: var(--dv-gold); }
.dv-nav-list a::after {
    content: ""; position: absolute; bottom: 0; left: 50%; right: 50%;
    height: 1px; background: var(--dv-gold); transition: all var(--dv-tr-med);
}
.dv-nav-list a:hover::after { left: 0; right: 0; }
.dv-header-actions { display: flex; align-items: center; gap: 16px; }
.dv-cart-link {
    display: inline-flex; align-items: center; gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--dv-font-body); font-size: 13px;
    padding: 6px 0;
    position: relative;
}
.dv-cart-link svg { width: 20px; height: 20px; fill: currentColor; }
.dv-cart-count {
    background: var(--dv-gold); color: var(--dv-dark);
    font-size: 10px; font-weight: 700;
    min-width: 18px; height: 18px; padding: 0 5px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; line-height: 1;
}
.dv-burger {
    display: none; background: none; border: none; cursor: pointer;
    padding: 8px; color: var(--dv-white);
    min-width: 44px; min-height: 44px;
    align-items: center; justify-content: center;
}
.dv-burger-lines {
    display: flex; flex-direction: column; gap: 5px;
}
.dv-burger-lines span {
    display: block; width: 22px; height: 1.5px; background: currentColor;
    transition: transform var(--dv-tr-fast), opacity var(--dv-tr-fast);
}
.dv-burger.open .dv-burger-lines span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.dv-burger.open .dv-burger-lines span:nth-child(2) { opacity: 0; }
.dv-burger.open .dv-burger-lines span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* ── Mobile Menu: Slide from Left ── */
.dv-mobile-menu {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 82vw;
    max-width: 320px;
    background: #0a0a0a;
    z-index: 101;
    display: flex; flex-direction: column;
    transform: translateX(-100%);
    opacity: 1;
    pointer-events: none;
    transition: transform var(--dv-tr-med);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 6px 0 24px rgba(0,0,0,0.3);
    padding: 80px 0 40px;
}
.dv-mobile-menu.open {
    transform: translateX(0);
    pointer-events: auto;
}
/* Backdrop behind the menu */
.dv-mobile-menu-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dv-tr-med);
}
.dv-mobile-menu-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}
.dv-mobile-menu-list {
    list-style: none; margin: 0; padding: 0;
    width: 100%;
}
.dv-mobile-menu-list li { border-bottom: 1px solid rgba(198, 169, 108, 0.12); }
.dv-mobile-menu-list li:last-child { border-bottom: none; }
.dv-mobile-menu-list a {
    display: block;
    color: rgba(255, 255, 255, 0.92);
    font-family: var(--dv-font-head);
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 0.06em;
    padding: 14px 24px;
    text-align: left;
    transition: color var(--dv-tr-fast), background var(--dv-tr-fast);
}
.dv-mobile-menu-list a:hover, .dv-mobile-menu-list a:active {
    color: var(--dv-gold);
    background: rgba(198, 169, 108, 0.06);
}
.dv-mobile-menu-divider {
    border-bottom: none !important;
    height: 14px;
}

/* ── Footer ── */
.dv-footer {
    background: #0a0a0a;
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 30px;
    margin-top: 80px;
}
.dv-footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    max-width: var(--dv-container); margin: 0 auto;
    padding: 0 24px;
}
.dv-footer h4 {
    color: var(--dv-white);
    font-family: var(--dv-font-body);
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.18em; text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(198, 169, 108, 0.2);
}
.dv-footer a { color: rgba(255, 255, 255, 0.75); }
.dv-footer a:hover { color: var(--dv-gold); }
.dv-footer p { font-size: 13.5px; line-height: 1.7; margin: 0 0 0.6em; }
.dv-footer-bottom {
    max-width: var(--dv-container); margin: 60px auto 0;
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 12px; color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.05em;
}
.dv-social { display: flex; gap: 12px; margin-top: 16px; justify-content: center; }
.dv-social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid rgba(198, 169, 108, 0.3);
    color: rgba(255, 255, 255, 0.7);
}
.dv-social a:hover { border-color: var(--dv-gold); color: var(--dv-gold); }
.dv-social svg { width: 14px; height: 14px; fill: currentColor; }

/* ── Buttons ── */
.dv-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 32px;
    background: var(--dv-dark); color: var(--dv-white);
    font-family: var(--dv-font-body); font-size: 13px; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase;
    border: none; border-radius: var(--dv-radius);
    cursor: pointer;
    transition: background var(--dv-tr-med), color var(--dv-tr-med);
    text-decoration: none;
    min-height: 48px;
}
.dv-btn:hover { background: var(--dv-gold); color: var(--dv-dark); text-decoration: none; }
.dv-btn--gold { background: var(--dv-gold); color: var(--dv-dark); }
.dv-btn--gold:hover { background: var(--dv-dark); color: var(--dv-white); }
.dv-btn--outline {
    background: transparent; color: var(--dv-dark);
    border: 1px solid var(--dv-dark);
}
.dv-btn--outline:hover { background: var(--dv-dark); color: var(--dv-white); }
.dv-btn--large { padding: 18px 48px; font-size: 14px; }
.dv-btn--full { width: 100%; }

/* ── Section Titles ── */
.dv-section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 20px;
}
.dv-section-title::after {
    content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 48px; height: 2px; background: var(--dv-gold);
}
.dv-section-sub {
    text-align: center;
    font-family: var(--dv-font-body);
    font-size: 12px; font-weight: 500;
    color: var(--dv-gold);
    letter-spacing: 0.18em; text-transform: uppercase;
    margin-bottom: 12px;
}

/* ── Forms ── */
input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
textarea, select {
    width: 100%; padding: 12px 14px;
    font-family: var(--dv-font-body); font-size: 14px;
    border: 1px solid var(--dv-border-light);
    border-radius: var(--dv-radius);
    background: var(--dv-white);
    transition: border-color var(--dv-tr-fast);
}
input:focus, textarea:focus, select:focus {
    outline: none; border-color: var(--dv-gold);
}

/* ── WhatsApp button (ht-ctc plugin) — sized + positioned above countdown bar ── */
#ht-ctc-chat,
.ht-ctc.ht-ctc-chat {
    width: 62px !important;
    height: 62px !important;
    bottom: 62px !important;
    right: 16px !important;
}
#ht-ctc-chat .ht-ctc-chat-style img,
#ht-ctc-chat img {
    width: 62px !important;
    height: 62px !important;
}
/* When countdown is dismissed, pull WA closer to the edge */
body:has(.dv-cdown:not(.visible)) #ht-ctc-chat,
body.dv-cd-dismissed #ht-ctc-chat { bottom: 18px !important; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .dv-nav { display: none; }
    .dv-burger { display: inline-flex; }

    /* Mobile header: burger left · logo centered · cart right (Bertolli-style) */
    .dv-header-inner {
        gap: 8px;
        justify-content: space-between;
    }
    .dv-burger {
        flex: 0 0 44px;
        order: 1;
    }
    .dv-logo {
        order: 2;
        flex: 1 1 auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .dv-header-actions {
        order: 3;
        flex: 0 0 auto;
        justify-content: flex-end;
        min-width: 44px;
    }
    .dv-cart-link { padding: 4px 8px; }
    .dv-cart-link span:not(.dv-cart-count) { display: none; }
    .dv-footer-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
    .dv-footer h4 { display: inline-block; }
}
@media (max-width: 767px) {
    /* Bertolli-style: thin header with logo overflowing below */
    .dv-header {
        overflow: visible;
    }
    .dv-header-inner {
        height: 46px;
        min-height: 46px;
        padding: 0 12px;
        position: relative;
        align-items: center;
    }
    .dv-burger {
        flex: 0 0 44px;
        min-height: 40px;
        order: 1;
    }
    /* Logo is absolutely positioned so it doesn't dictate header height */
    .dv-logo {
        position: absolute;
        left: 50%;
        top: -34px;
        transform: translateX(-50%);
        z-index: 5;
        order: unset;
        flex: unset;
        display: block;
        max-width: 60%;
    }
    .dv-logo img {
        max-width: 100%;
        max-height: none;
        height: 148px !important;
        width: auto;
        display: block;
        filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
    }
    .dv-header-actions {
        flex: 0 0 auto;
        order: 3;
        margin-left: auto;
    }
    /* Logo stays same size on scroll — does not shrink */

    .dv-footer { padding: 60px 0 24px; margin-top: 60px; }
    .dv-section-title { font-size: 26px; margin-bottom: 32px; }
    .dv-header-actions { gap: 8px; }
    .dv-cart-link svg { width: 26px; height: 26px; }
    .dv-cart-count {
        position: absolute;
        top: -4px; right: -4px;
        min-width: 16px; height: 16px;
        font-size: 9px;
    }
    .dv-cart-link { position: relative; }
    .dv-burger-lines span { width: 26px; height: 2px; }
}
@media (max-width: 380px) {
    .dv-logo img { height: 126px !important; }
    .dv-header-inner { padding: 0 10px; height: 42px; min-height: 42px; }
}
