/* Modern storefront theme
   Scoped to html.theme-modern so the classic theme remains unchanged. */

html.theme-modern {
    --background-color: #ffffff;
    --highlight-color: #16a34a;
    --price-color: #16a34a;
}

html.theme-modern body {
    background-color: var(--background-color);
}

/* Top bar: white, clean, modern */
html.theme-modern .top-bar {
    background-color: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), 0 16px 40px rgba(15, 23, 42, 0.06);
    backdrop-filter: none;
}

html.theme-modern .top-bar .logo h1,
html.theme-modern .top-bar a,
html.theme-modern .top-bar button,
html.theme-modern .top-bar i {
    color: #0f172a;
}

html.theme-modern .top-bar .restaurant-logo {
    filter: none;
}

/* Search */
html.theme-modern .search-bar-top input,
html.theme-modern .search-bar input {
    background-color: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: none;
}

html.theme-modern .search-bar-top input:focus,
html.theme-modern .search-bar input:focus {
    border-color: rgba(22, 163, 74, 0.55);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
}

html.theme-modern .search-bar-top input::placeholder,
html.theme-modern .search-bar input::placeholder {
    color: rgba(15, 23, 42, 0.45);
}

html.theme-modern .search-icon-desktop,
html.theme-modern .search-bar i {
    color: rgba(15, 23, 42, 0.55);
}

/* Header actions */
html.theme-modern .language-switcher .lang-btn {
    border-color: rgba(15, 23, 42, 0.18);
    color: #0f172a;
}

html.theme-modern .language-switcher .lang-btn.active {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.35);
}

html.theme-modern .cart-button {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

html.theme-modern .cart-button:hover {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(22, 163, 74, 0.45);
    transform: translateY(-1px);
}

html.theme-modern .cart-badge {
    background: var(--highlight-color);
    color: #fff;
    border: none;
}

/* Sidebar */
html.theme-modern .sidebar {
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), 0 22px 60px rgba(15, 23, 42, 0.06);
    border-right: 1px solid rgba(15, 23, 42, 0.06);
}

html.theme-modern .categories-header {
    border-bottom-color: rgba(22, 163, 74, 0.45);
}

html.theme-modern .category-btn.active {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.35);
    color: #0f172a;
}

/* Product cards */
html.theme-modern .product-card {
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

html.theme-modern .product-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(22, 163, 74, 0.55);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.12);
}

html.theme-modern .promo-badge {
    background: rgba(22, 163, 74, 0.95);
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.25);
}

html.theme-modern .product-weight-overlay {
    background: rgba(15, 23, 42, 0.60);
}

/* Primary action: green */
html.theme-modern .add-to-cart-btn,
html.theme-modern .ux-modal-btn-primary,
html.theme-modern .btn-primary {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    box-shadow: 0 14px 30px rgba(22, 163, 74, 0.22);
}

html.theme-modern .add-to-cart-btn:hover,
html.theme-modern .ux-modal-btn-primary:hover,
html.theme-modern .btn-primary:hover {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
    box-shadow: 0 18px 40px rgba(22, 163, 74, 0.28);
}

html.theme-modern .add-to-cart-btn.btn-click-animate {
    animation:
        addToCartBtnPopModern 420ms cubic-bezier(0.2, 0.8, 0.2, 1) 0s 1,
        addToCartBtnGreenBlink 160ms ease-in-out 0s 3 alternate;
}

@keyframes addToCartBtnPopModern {
    0% {
        transform: translateY(0) scale(1);
        filter: brightness(1);
    }
    35% {
        transform: translateY(-2px) scale(1.06);
        filter: brightness(1.05);
    }
    100% {
        transform: translateY(0) scale(1);
        filter: brightness(1);
    }
}

@keyframes addToCartBtnGreenBlink {
    0% {
        box-shadow: none;
        filter: brightness(1);
    }
    100% {
        box-shadow:
            0 0 0 4px rgba(34, 197, 94, 0.28),
            0 16px 40px rgba(22, 163, 74, 0.22);
        filter: brightness(1.06);
    }
}

/* Destructive actions: red */
html.theme-modern .remove-btn,
html.theme-modern .btn-danger,
html.theme-modern .delete-btn {
    background: #dc2626 !important;
    color: #fff !important;
}

/* Modal surface */
html.theme-modern .ux-modal {
    box-shadow: 0 26px 90px rgba(15, 23, 42, 0.30);
}

html.theme-modern .ux-modal-card {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.08);
}

/* Checkout page overrides
   (checkout has a large inline <style> with classic-red hover/glow values)
   Loaded after that inline block to override in modern theme only. */

html.theme-modern .checkout-page .item-notes-input:focus {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
}

html.theme-modern .checkout-page .quantity-btn:hover,
html.theme-modern .checkout-page .apply-promo-btn:hover,
html.theme-modern .checkout-page .checkout-btn:hover,
html.theme-modern .checkout-page .continue-shopping-btn:hover {
    background: #15803d;
}

html.theme-modern .checkout-page .checkout-btn:hover {
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.28);
}

html.theme-modern .checkout-page .delivery-option.active {
    background: rgba(22, 163, 74, 0.08);
}

html.theme-modern .checkout-page .delivery-option.disabled,
html.theme-modern .checkout-page .delivery-option.disabled:hover {
    border-color: rgba(15, 23, 42, 0.16);
    background: rgba(15, 23, 42, 0.04);
}

html.theme-modern .checkout-page .search-address-btn {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
}

html.theme-modern .checkout-page .search-address-btn:hover {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.28);
}
