/* =========================================================
   FINAL POLISH: no pink accents + mobile header cart
   Keep the current design, only replace pink trim with warm white/champagne.
   ========================================================= */
:root {
    --accent: #F5F0E6;
    --accent-2: #DDD0B4;
    --accent-shadow: rgba(245, 240, 230, 0.22);
    --premium-ink: #161616;
}

/* Light accent buttons need dark text, otherwise text is invisible. */
.header-btn.filled,
.weekly-order-btn,
.checkout-btn,
.submit-order-btn,
.add-to-cart-btn:hover,
.category-btn.active,
.promo-badge,
.weekly-hero-badge,
#rating-submit-btn,
#confirm-yes {
    color: var(--premium-ink) !important;
}

.header-btn.filled,
.weekly-order-btn,
.checkout-btn,
.submit-order-btn,
.add-to-cart-btn:hover,
.category-btn.active,
.promo-badge,
.weekly-hero-badge {
    background: linear-gradient(135deg, #ffffff, #DDD0B4) !important;
    border-color: rgba(255,255,255,0.15) !important;
}

.header-btn,
.phone-btn,
.burger,
.add-to-cart-btn,
.logout-btn,
#logout-btn,
.product-card:hover,
.promo-card,
.about-container,
.checkout-modal,
.auth-content,
.cart-modal,
.modal-content {
    border-color: rgba(245, 240, 230, 0.65) !important;
}

.site-header,
.cart-header,
.menu-filters-sticky,
.mobile-menu,
.cart-footer {
    border-color: rgba(245, 240, 230, 0.22) !important;
}

.product-price,
.product-price-promo,
.brand,
.desktop-nav a:hover,
.desktop-nav a.active,
.desktop-nav a.active-nav,
.section-title,
.social-link:hover,
.mobile-nav a:hover,
.mobile-nav .active-nav {
    color: #F5F0E6 !important;
}

/* Mobile quick cart near burger */
.mobile-header-cart-btn {
    display: none;
}

@media (max-width: 900px) {
    .header-inner {
        gap: 10px !important;
    }

    .mobile-header-cart-btn {
        position: relative;
        width: 46px;
        height: 46px;
        flex: 0 0 46px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(245, 240, 230, 0.72);
        border-radius: 14px;
        background: rgba(255,255,255,0.03);
        color: #fff;
        cursor: pointer;
        padding: 0;
    }

    .mobile-header-cart-icon {
        font-size: 20px;
        line-height: 1;
    }

    .mobile-header-cart-badge {
        position: absolute;
        top: -7px;
        right: -7px;
        min-width: 21px;
        height: 21px;
        padding: 0 6px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        background: #fff;
        color: #161616;
        border: 1px solid rgba(0,0,0,0.15);
        font-size: 12px;
        font-weight: 900;
        line-height: 1;
    }
}

@media (max-width: 420px) {
    .mobile-header-cart-btn {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }
}


/* ===== PATCH v2: pink sakura + compact mobile cards ===== */
.sakura-petal {
    background: linear-gradient(135deg, #ffe0ea 0%, #ffb7c8 45%, #ff8faf 100%) !important;
    opacity: 0.78 !important;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.45), 0 0 8px rgba(255, 157, 188, 0.18) !important;
}

.brand img {
    box-shadow: 0 0 0 1px rgba(255, 190, 210, 0.28), 0 6px 14px rgba(0,0,0,0.25);
    border-radius: 50%;
}

#cart-icon .cart-badge,
.mobile-cart-badge,
.mobile-header-cart-badge {
    color: #24151d !important;
    background: #fff !important;
    text-shadow: none !important;
}

@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
        align-items: stretch;
    }

    .product-card {
        max-width: none !important;
        min-height: 0 !important;
        border-radius: 18px !important;
        margin: 0 !important;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24) !important;
    }

    .product-card img {
        height: 138px !important;
    }

    .promo-badge {
        top: 10px !important;
        right: 10px !important;
        padding: 5px 10px !important;
        font-size: 11px !important;
    }

    .product-info {
        padding: 12px 12px 8px !important;
    }

    .product-title {
        min-height: 44px !important;
        font-size: 18px !important;
        line-height: 1.16 !important;
        margin-bottom: 6px !important;
    }

    .product-rating {
        min-height: 24px !important;
        margin: 2px 0 8px !important;
        font-size: 12px !important;
    }

    .product-desc {
        min-height: 40px !important;
        margin-bottom: 8px !important;
        font-size: 13px !important;
        line-height: 1.35 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .product-meta {
        gap: 8px !important;
        padding: 0 12px !important;
        margin-bottom: 10px !important;
    }

    .product-weight {
        font-size: 13px !important;
    }

    .product-old-price {
        font-size: 12px !important;
    }

    .product-price,
    .product-price-promo {
        font-size: 22px !important;
    }

    .add-to-cart-btn {
        min-height: 42px !important;
        padding: 10px 12px !important;
        margin: 0 12px 12px !important;
        width: calc(100% - 24px) !important;
        font-size: 13px !important;
        border-radius: 999px !important;
    }
}

@media (max-width: 420px) {
    .products-grid {
        gap: 10px !important;
    }

    .product-card img {
        height: 124px !important;
    }

    .product-title {
        font-size: 16px !important;
        min-height: 38px !important;
    }

    .product-desc {
        font-size: 12px !important;
        min-height: 34px !important;
    }

    .product-price,
    .product-price-promo {
        font-size: 20px !important;
    }

    .product-weight {
        font-size: 12px !important;
    }

    .add-to-cart-btn {
        font-size: 12px !important;
        min-height: 40px !important;
    }
}

@media (max-width: 340px) {
    .products-grid {
        grid-template-columns: 1fr !important;
    }
}


/* ===== PATCH v3: restore sakura icon + compact mobile rating ===== */
.brand img {
    border-radius: 10px !important;
    box-shadow: none !important;
}

#cart-icon .cart-badge,
.mobile-cart-badge,
.mobile-header-cart-badge {
    color: #24151d !important;
    background: #fff !important;
    border: 1px solid rgba(0,0,0,0.14) !important;
    text-shadow: none !important;
    font-weight: 900 !important;
}

@media (max-width: 900px) {
    .product-rating {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 4px !important;
        min-height: auto !important;
        margin: 2px 0 8px !important;
        width: 100% !important;
    }

    .product-rating span[id^="stars-"] {
        display: block !important;
        white-space: nowrap !important;
        line-height: 1 !important;
        font-size: 18px !important;
        letter-spacing: 1px !important;
    }

    .product-rating span[id^="val-"] {
        display: block !important;
        width: 100% !important;
        margin-top: 0 !important;
        font-size: 11px !important;
        line-height: 1.2 !important;
        color: #a7a7b2 !important;
    }
}


/* ===== PATCH v4: desktop cart text dark like mobile ===== */
@media (min-width: 1025px) {
    #cart-icon.cart-header-btn {
        background: linear-gradient(135deg, #ffffff, #ece2d1) !important;
        color: #24151d !important;
        border: 1px solid rgba(0,0,0,0.08) !important;
    }

    #cart-icon.cart-header-btn i,
    #cart-icon.cart-header-btn .cart-btn-text {
        color: #24151d !important;
    }

    #cart-icon.cart-header-btn #cart-count,
    #cart-icon .cart-badge {
        background: #fff !important;
        color: #24151d !important;
        border: 1px solid rgba(0,0,0,0.14) !important;
        text-shadow: none !important;
        font-weight: 900 !important;
    }
}


/* ===== PATCH v5: keep header always fixed on top ===== */
html {
    scroll-padding-top: 92px;
}

body {
    padding-top: 82px;
}

.site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 2000 !important;
}

@media (max-width: 1024px) {
    html {
        scroll-padding-top: 84px;
    }

    body {
        padding-top: 74px;
    }
}


/* ===== PATCH v6: cart panel must be above fixed header ===== */
#cart-modal.cart-modal {
    z-index: 6500 !important;
}

#cart-modal.cart-modal.open {
    right: 0 !important;
}

#cart-modal .cart-header {
    position: sticky;
    top: 0;
    z-index: 2;
}

#close-cart.close-cart {
    position: relative;
    z-index: 3;
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== PATCH v7: force desktop cart badge number to dark ===== */
@media (min-width: 1025px) {
    .site-header .desktop-actions > #cart-icon.cart-header-btn > #cart-count.cart-badge,
    .site-header .desktop-actions > #cart-icon.cart-header-btn span#cart-count.cart-badge,
    button#cart-icon.cart-header-btn span#cart-count.cart-badge {
        color: #161616 !important;
        -webkit-text-fill-color: #161616 !important;
        background: #ffffff !important;
        border: 1px solid rgba(0, 0, 0, 0.14) !important;
        text-shadow: none !important;
        mix-blend-mode: normal !important;
        opacity: 1 !important;
        font-weight: 900 !important;
    }
}

/* ===== iOS Safari cart modal fix ===== */
#cart-modal.cart-modal {
    overflow: hidden !important;
}

#cart-modal .cart-items {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

@media (max-width: 700px) {
    #cart-modal.cart-modal {
        top: 0 !important;
        left: 0 !important;
        right: auto !important;
        width: 100vw !important;
        max-width: none !important;
        height: 100vh !important;
        height: 100svh !important;
        display: flex !important;
        flex-direction: column !important;
        transform: translate3d(100%, 0, 0) !important;
        transition: transform 0.3s ease !important;
        z-index: 6500 !important;
    }

    #cart-modal.cart-modal.open {
        right: auto !important;
        transform: translate3d(0, 0, 0) !important;
    }

    #cart-modal .cart-header {
        flex: 0 0 auto !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 2 !important;
    }

    #cart-modal .cart-footer {
        flex: 0 0 auto !important;
        padding-bottom: max(20px, env(safe-area-inset-bottom)) !important;
    }

    #cart-modal .cart-items {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}