:root {
    /* Clean Premium Theme (Neblix Brand) */
    --color-bg: #F7F8FA; /* Clean light gray/off-white background */
    --color-card-bg: #FFFFFF; /* Pure white for high contrast cards */
    
    --color-white: #FFFFFF; /* Restore pure white element base */
    --color-pure-white: #FFFFFF; 
    
    --color-dark-green: #0A0A0A; /* Text / Strong Emphasis */

    /* Brand colors — overridden at runtime by applyTheme() from Supabase */
    --color-primary: #7B2CFF;         /* Brand Purple */
    --color-accent:  #A855F7;         /* Accent / Action color */
    --color-primary-green: var(--color-primary);
    --color-yellow:        var(--color-accent);
    --color-yellow-hover:  #9333EA;
    --color-blue: #3B82F6; /* Electric blue support */
    
    --color-text-main: #1F2937; /* Dark Slate Gray for perfect readability */
    --color-text-muted: #6B7280; /* Soft gray for secondary reads */
    --color-border: #E5E7EB; /* Clean soft borders */
    
    --font-primary: 'Orbitron', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-pill: 9999px;
    
    --shadow-soft: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-neon: 0 4px 16px rgba(123, 44, 255, 0.25);
    
    --max-width: 1300px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.5;
    overflow-y: scroll;
}

#app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ================= HEADER & COVER ================= */
.header {
    background: var(--color-white);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* Compensate for fixed header */
#app-container {
    padding-top: 300px; /* will be overridden by JS for exactness */
}

.cover-banner {
    height: 160px;
    width: 100%;
    /* Replicating the wavy/green background */
    background: linear-gradient(135deg, #005a32 0%, #004d2b 100%);
    background-image: url('cover.webp');
    background-size: cover;
    background-position: center;
    position: relative;
}

.status-badge-aberto {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #2e7d32;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-badge-fechado {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #b91c1c;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10B981; /* Universally recognized neon green for "Open" */
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.header-inner {
    --inner-px: 24px;
    --inner-pt: 0px;
    --inner-pb: 12px;
    
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--inner-pt) var(--inner-px) var(--inner-pb) var(--inner-px);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Logo anchor: zero-height strip so the logo floats freely above header-inner */
.logo-anchor {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 0;          /* Takes no vertical space */
    overflow: visible;  /* Logo hangs below into header-inner area */
    position: relative;
    z-index: 20;
}

.logo-wrapper {
    margin-top: -36px; /* Overlap up into cover */
    width: 108px;      /* 3:2 aspect ratio for the rectangular image */
    height: 72px;
    border: 3px solid var(--color-white);
    border-radius: 12px;
    background: var(--color-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Keeps everything visible */
    border-radius: 8px;
    display: block;
}

.store-info-wrapper {
    padding-bottom: 4px;
}

.store-name {
    font-family: var(--font-primary);
    font-size: 26px;
    font-weight: 800;
    color: var(--color-text-main);
    letter-spacing: 2px;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.delivery-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.delivery-info i {
    font-size: 16px;
}

.header-actions-right {
    padding-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Cart button with badge */
.cart-btn {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--color-yellow);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    animation: badge-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badge-pop {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-main);
    transition: all 0.2s;
}

.icon-btn:hover {
    background: #f8f9fa;
}

.whatsapp-btn i {
    font-size: 20px;
    color: var(--color-primary-green);
}

/* ================= SCROLL-DRIVEN ANIMATIONS ================= */
/* --scroll-p is a CSS custom property set by JS (0 = top, 1 = scrolled)    */
/* Everything below interpolates using calc(), no binary class needed.        */

.header {
    --scroll-p: 0;
}

/* Cover shrinks 160px → 56px */
.cover-banner {
    overflow: hidden;
    transition: none;
    height: calc(160px - (104px * var(--scroll-p)));
}

/* Logo anchor: fades out as user scrolls, but overflow:visible so it never clips */
.logo-anchor {
    --logo-anchor-h: 0; /* overridden to 40px in mobile media query */
    height: calc(var(--logo-anchor-h) * (1 - var(--scroll-p)));
    overflow: visible;
    opacity: calc(1 - var(--scroll-p));
    pointer-events: none;
}

/* Store info + actions strip collapses cleanly — logo is a sibling, safe to clip here */
.header-inner {
    overflow: hidden;
    transition: none;
    opacity: calc(1 - var(--scroll-p));
    padding-top: calc(var(--inner-pt) * (1 - var(--scroll-p)));
    padding-bottom: calc(var(--inner-pb) * (1 - var(--scroll-p)));
    max-height: calc(120px * (1 - var(--scroll-p)));
}



/* Aberto badge fades out */
.status-badge-aberto {
    transition: none;
    opacity: calc(1 - var(--scroll-p));
}

/* ================= TABS ================= */
.sticky-tabs-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 12px 24px 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-and-menu {
    display: flex;
    gap: 8px;
    padding-bottom: 12px;
}

.categories-scroll {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding-bottom: 12px;
}

.categories-scroll::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.tab-btn {
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-muted);
    cursor: pointer;
    white-space: nowrap;
    position: relative;
}

.tab-btn.active {
    color: var(--color-yellow);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-yellow);
    border-radius: 3px 3px 0 0;
}

/* ================= PRODUCT LAYOUT ================= */
.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 24px 32px 24px;
    flex-grow: 1;
    width: 100%;
}

.category-section {
    margin-bottom: 40px;
}

.grid-parent {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 24px;
}

@media (max-width: 900px) {
    .grid-parent {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Logo: centered horizontally, with real height so content flows below */
    .logo-anchor {
        --logo-anchor-h: 40px; /* drives the scroll-driven height animation */
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 0;
    }

    /* Store name + delivery: centered column below logo */
    .header-inner {
        --inner-px: 16px;
        --inner-pt: 8px;
        --inner-pb: 16px;
        
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 4px;
    }

    .store-info-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .store-name {
        display: none; /* Name shown via mini-title in cover when scrolled */
    }

    /* WhatsApp button absolute top-right */
    .header-actions-right {
        position: absolute;
        top: calc(160px + 8px);
        right: 16px;
    }

    .main-content {
        padding: 24px 16px;
    }
    
    .sticky-tabs-container {
        padding: 12px 16px 0 16px;
    }
}

/* ================= PRODUCT CARD (Accessiblity & Separation) ================= */
.product-card {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    background: var(--color-card-bg);
    cursor: pointer;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s;
    outline: none;
}

.product-card:hover {
    border-color: var(--color-primary-green);
    box-shadow: var(--shadow-neon);
}

.product-card:focus-visible {
    border-color: var(--color-yellow);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.4);
}

.product-card:active {
    transform: scale(0.98);
    background: var(--color-bg);
}

.pc-info {
    flex: 1;
    padding-right: 16px;
    display: flex;
    flex-direction: column;
}

.pc-title {
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 4px;
    text-transform: uppercase;
    line-height: 1.3;
    letter-spacing: 1px;
}

.pc-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-bottom: auto; /* Pushes price to bottom */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pc-price-block {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.badge-discount {
    background: rgba(123, 44, 255, 0.15); /* Tint of primary purple */
    color: var(--color-yellow); /* Neon Purple */
    font-size: 11px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.price-current {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-main);
}

.price-old {
    font-size: 12px;
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.pc-image-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg);
    flex-shrink: 0;
    border: 1px solid var(--color-border);
}

.pc-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.add-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: var(--color-yellow);
    color: var(--color-white);
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: 600;
    transition: var(--transition);
}

.add-btn:hover {
    background: var(--color-yellow-hover);
}

/* ================= FOOTER ================= */
.site-footer {
    background: #0F0F11;
    padding: 56px 24px 0;
    margin-top: 40px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    .footer-brand-col {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

.footer-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    margin-bottom: 16px;
    display: block;
}

.footer-tagline {
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.social-btn.whatsapp {
    background: #25D366;
    color: #fff;
}

.social-btn.whatsapp i {
    font-size: 18px;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.footer-col-title {
    font-family: var(--font-primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-yellow);
    margin-bottom: 16px;
}

.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-list li {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-list li i {
    font-size: 15px;
    color: var(--color-yellow);
    flex-shrink: 0;
}

/* Trust Bar */
.footer-trust-bar {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 32px;
    padding: 24px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-weight: 600;
}

.trust-badge i {
    font-size: 20px;
    color: var(--color-yellow);
}

/* Bottom Bar */
.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-bottom p {
    color: rgba(255,255,255,0.35);
    font-size: 12px;
}

.footer-legal {
    font-style: italic;
}


/* ================= PRODUCT DETAIL FULL MODAL ================= */
.product-view-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.product-view-overlay.hidden {
    display: none;
}

.product-view-header {
    background: var(--color-bg);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    position: relative;
    justify-content: center;
    border-bottom: 1px solid var(--color-border);
}

.back-btn {
    position: absolute;
    left: 24px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-main);
}

.pv-header-title {
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 800;
    color: var(--color-text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-view-content {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    padding-bottom: 100px; /* space for bottom bar */
}

@media (max-width: 900px) {
    .product-view-content {
        flex-direction: column;
    }
}

.pv-left-column {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 32px;
}

.image-carousel {
    width: 100%;
    max-width: 400px;
    position: relative;
}

.image-carousel img {
    width: 100%;
    border-radius: var(--radius-md);
    background: transparent;
    mix-blend-mode: multiply; /* Helps fake a transparent bg if it's white */
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background: transparent;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.dot:hover { border-color: var(--color-text-main); transform: scale(1.2); }

.dot.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: scale(1.25);
}

/* Carousel navigation arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,0.9);
    color: var(--color-text-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    transition: transform 0.15s, background 0.15s;
    z-index: 2;
    opacity: 0;
}
.image-carousel:hover .carousel-arrow { opacity: 1; }
.carousel-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
}
.carousel-arrow.prev { left: 8px; }
.carousel-arrow.next { right: 8px; }

@media (max-width: 900px) {
    .carousel-arrow { display: none; } /* mobile: usa swipe */
}

.pv-right-column {
    flex: 1;
    padding: 32px;
    max-width: 600px;
}

@media (max-width: 900px) {
    .pv-right-column {
        padding: 0 24px 32px;
        margin: 0 auto;
        width: 100%;
    }
    .pv-left-column {
        padding: 24px;
    }
}

.pv-description {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

.pv-price-block {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 24px;
}

.pv-current-price {
    font-size: 20px;
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--color-text-main);
}

.pv-old-price {
    font-size: 14px;
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.pv-discount-badge {
    background: rgba(123, 44, 255, 0.15); /* Tint of primary purple */
    color: var(--color-yellow); /* Neon Purple */
    font-weight: 800;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

/* Flavour Selection */
.pv-options-section {
    margin-bottom: 32px;
}

.pv-options-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.pv-options-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-main);
}

.required-badge {
    background: var(--color-border);
    color: var(--color-text-muted);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
}

.pv-options-subtitle {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.flavors-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.flavor-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    transition: var(--transition);
}

.flavor-item:hover {
    background: rgba(0, 0, 0, 0.02); /* Clean hover */
}

.flavor-item.selected {
    border-color: var(--color-primary-green);
    background: rgba(123, 44, 255, 0.05); /* Slight purple tint */
}

.f-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-text-muted);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flavor-item.selected .f-checkbox {
    background: var(--color-primary-green);
    border-color: var(--color-primary-green);
}

.flavor-item.selected .f-checkbox::after {
    content: '';
    display: block;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.f-emoji {
    font-size: 18px;
    line-height: 1;
    min-width: 22px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.f-name {
    font-size: 14px;
    color: var(--color-text-main);
    font-weight: 500;
    flex: 1;
}

/* Comments */
.pv-comments-section {
    border-top: 1px solid var(--color-border);
    padding-top: 24px;
}

.pv-comments-section h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.pv-comments-section textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    background: #F9FAFB;
    border-radius: var(--radius-sm);
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--color-text-main);
    resize: none;
}

.pv-comments-section textarea:focus {
    outline: none;
    border-color: var(--color-yellow); /* Neon Purple focus */
    background: var(--color-white);
}

/* Action Bar Bottom */
.pv-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--color-white); /* Use pure white */
    border-top: 1px solid var(--color-border);
    padding: 16px 24px;
    z-index: 101;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}

.pv-action-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: 16px;
    justify-content: center;
}

.pv-qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    background: var(--color-card-bg);
    border-radius: 6px;
    height: 48px;
    width: 120px;
    justify-content: space-between;
}

.qty-btn {
    width: 40px;
    height: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-val {
    font-size: 15px;
    font-family: var(--font-primary);
    font-weight: 600;
}

.pv-add-btn {
    background: var(--color-yellow);
    color: var(--color-white);
    border: none;
    border-radius: 6px;
    height: 48px;
    padding: 0 24px;
    font-size: 16px;
    font-family: var(--font-primary);
    font-weight: 700;
    cursor: pointer;
    flex-grow: 1;
    max-width: 400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-neon);
}

.pv-add-btn:hover {
    background: var(--color-yellow-hover);
}

/* ================= FLOATING CART BAR ================= */
.floating-cart-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 500px;
    background: var(--color-primary-green);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-neon);
    cursor: pointer;
    z-index: 99;
    opacity: 1;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
}

.floating-cart-bar.hidden {
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
    pointer-events: none;
}

.fcb-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.fcb-info i {
    font-size: 24px;
}

.fcb-count {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.fcb-action {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fcb-action span:first-child {
    font-size: 13px;
    opacity: 0.9;
}

.fcb-action span:last-child {
    font-family: var(--font-primary);
    font-weight: 800;
    font-size: 16px;
}

/* ================= MULTI-STEP CHECKOUT ================= */
.checkout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    z-index: 1000;
    display: flex;
    justify-content: center;
    overflow-y: auto;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.checkout-overlay.hidden {
    display: none;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.checkout-container {
    width: 100%;
    max-width: 600px;
    background: var(--color-card-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 24px rgba(0,0,0,0.05);
}

.checkout-header {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background: var(--color-card-bg);
    z-index: 10;
}

.chk-back-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--color-text-main);
    cursor: pointer;
    flex-shrink: 0;
}

.chk-title {
    flex-grow: 1;
    text-align: center;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 800;
    color: var(--color-text-main);
    text-transform: uppercase;
    margin-right: 24px; /* balance out the back button */
}

.checkout-body {
    flex-grow: 1;
    padding: 24px;
    padding-bottom: 100px;
}

.chk-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.chk-step.active {
    display: block;
}

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

.chk-section {
    margin-bottom: 32px;
}

.chk-section h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
}

/* Input Styles */
.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    color: var(--color-text-main);
    background: #F9FAFB;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--color-primary-green);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(123,44,255,0.1);
}

.input-group input:disabled {
    background: #F3F4F6;
    color: #6B7280;
    cursor: not-allowed;
}

/* Address field layout */
.input-row {
    display: flex;
    gap: 12px;
}
.input-row .input-group { margin-bottom: 0; flex: 1; }
@media (max-width: 480px) {
    .input-row { flex-direction: column; gap: 0; }
    .input-row .input-group { margin-bottom: 14px; }
}

.cep-row {
    position: relative;
    display: flex;
    align-items: center;
}
.cep-row input { flex: 1; padding-right: 40px; }

.cep-status {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}
.cep-status.loading { color: var(--color-primary); animation: cep-spin 1s linear infinite; }
.cep-status.success { color: #10B981; }
.cep-status.error   { color: #EF4444; }
@keyframes cep-spin { from { transform: translateY(-50%) rotate(0deg); } to { transform: translateY(-50%) rotate(360deg); } }

.cep-help-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--color-primary);
    text-decoration: none;
}
.cep-help-link:hover { text-decoration: underline; }

.address-preview {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(123,44,255,0.06);
    border: 1px solid rgba(123,44,255,0.2);
    border-radius: 10px;
    font-size: 14px;
    color: #1F2937;
    line-height: 1.4;
}
.address-preview i { font-size: 18px; color: var(--color-primary); margin-top: 1px; }
.address-preview.hidden { display: none; }

/* Delivery verification card (replaces old dropdown) */
.delivery-result {
    margin-top: 4px;
    padding: 14px 16px;
    border-radius: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.45;
}
.delivery-result.success {
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.3);
    color: #065F46;
}
.delivery-result.error {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.3);
    color: #991B1B;
    flex-direction: column;
    gap: 10px;
}
.delivery-result i { font-size: 22px; flex-shrink: 0; }
.delivery-result strong { font-weight: 700; }
.delivery-result .wa-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 22px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s;
    align-self: stretch;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.delivery-result .wa-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 60%);
    opacity: 0;
    transition: opacity 0.2s;
}
.delivery-result .wa-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(37, 211, 102, 0.5);
    filter: brightness(1.05);
}
.delivery-result .wa-cta:hover::before { opacity: 1; }
.delivery-result .wa-cta:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(37,211,102,0.35); }
.delivery-result .wa-cta i { font-size: 22px; position: relative; z-index: 1; }
.delivery-result .wa-cta span { position: relative; z-index: 1; }

.delivery-result.hidden { display: none; }

/* Lock form when delivery not available */
.chk-section.locked .input-group:not(#chk-cep-group),
.chk-section.locked .input-row,
.chk-section.locked .address-preview {
    opacity: 0.45;
    pointer-events: none;
    filter: grayscale(0.3);
    transition: opacity 0.25s, filter 0.25s;
}
.chk-action-btn:disabled {
    background: #D1D5DB !important;
    color: #6B7280 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Cart Items in Checkout */
.chk-items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chk-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--color-border);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: #F9FAFB;
}

.chk-item-info p {
    margin: 0;
}

.chk-item-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--color-text-main);
}

.chk-item-flavor {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.chk-item-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.chk-item-price {
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary-green);
}

.chk-item-remove {
    background: transparent;
    border: none;
    color: #EF4444;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.6;
}

/* Payment Options */
.payment-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.pay-option input {
    display: none;
}

.pay-box {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    background: #F9FAFB;
    transition: all 0.2s;
}

.pay-box i {
    font-size: 24px;
    color: var(--color-text-muted);
}

.pay-box span {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-main);
}

.pay-option input:checked + .pay-box {
    border-color: var(--color-primary-green);
    background: rgba(123,44,255,0.05);
}

.pay-option input:checked + .pay-box i {
    color: var(--color-primary-green);
}

.summary-box {
    background: #F9FAFB;
    padding: 16px;
    border-radius: var(--radius-sm);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--color-text-muted);
}

.summary-row.total {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--color-border);
    font-size: 18px;
    font-weight: 800;
    color: var(--color-text-main);
}

/* Checkout Action Bar */
.checkout-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background: var(--color-card-bg);
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 16px rgba(0,0,0,0.05);
}

.chk-action-btn {
    width: 100%;
    background: var(--color-yellow);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    height: 52px;
    font-size: 16px;
    font-family: var(--font-primary);
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-neon);
    transition: transform 0.15s;
}

.chk-action-btn:active {
    transform: scale(0.98);
}

/* Add Btn Disabled State */
.pv-add-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
    background: var(--color-border);
    color: var(--color-text-muted);
    box-shadow: none;
}

/* ================= TOAST ================= */
.neblix-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1F2937;
    color: #fff;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
    opacity: 0;
    white-space: nowrap;
    pointer-events: none;
}

.neblix-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ================= PRODUCT TAGS ================= */
.badge-tag {
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
