/* ===== GLOBAL STYLES - Used across all pages ===== */

/* Font Faces */
@import url('../fonts/fonts.css');
/* Modern UI fonts (fallback to local fonts when available) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&family=Mokoto:wght@400;700&display=swap');

:root {
    --ui-font: 'Poppins', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    --brand-font: 'Mokoto', serif;
    --primary: #800000;
    --primary-dark: #5d1212;
    --nav-height: 68px;
    --nav-gap: 18px;
    --nav-radius: 10px;
}

/* Global layout helpers to keep page content consistent across all pages.
   These rules provide a single source of truth for max-width, side padding
   and top offset under the header so elements don't shift between pages. */
:root {
    --site-max-width: 1200px;
    --site-side-pad: 20px;
}

/* Make header height a hard value so pages render consistently */
.main-header {
    height: var(--nav-height);
    min-height: var(--nav-height);
}

/* Global site container: used by `.container`, `.shop-main`, `.main` etc. */
.site-container,
.container,
.shop-main,
.checkout-main,
.main,
.hero-container,
.shop-hero-content {
    max-width: var(--site-max-width) !important;
    padding-left: var(--site-side-pad) !important;
    padding-right: var(--site-side-pad) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

/* Ensure every main section starts below the header consistently. Some pages
   had varying paddings which caused vertical reflow. This applies a consistent
   top offset for page content (adjustable via --nav-height). */
main, section, .shop-main, .checkout-main, .container, .modern-hero, .featured-section {
    padding-top: calc(var(--nav-height) + 12px) !important;
}

/* Prevent large hero text from pushing layout unexpectedly on pages that include
   the hero. The hero still centers its content but won't change header flow. */
/* Reduce top padding for shop-hero to minimize space */
.modern-hero, .shop-hero {
    padding-top: var(--nav-height);
}

/* Anchor scrolling safety so named anchors don't jump under the header */
html { scroll-padding-top: calc(var(--nav-height) + 8px); }

/* Consistent logo sizing so header height remains predictable */
.logo-icon { height: 48px; width: auto; }

/* Make sure navbar items don't mentally push layout by using consistent padding */
.main-header .navbar a { padding: 8px 12px !important; }

/* Base Reset & Global Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 15px; }

body {
    font-family: var(--ui-font);
    background: #fefefe;
    color: #222;
    overflow-x: hidden;
    position: relative;
    font-size: 1rem; /* 1rem == 15px for slightly smaller, natural scale */
}

/* ===== WORDPRESS FIXES ===== */
.notice, .update-nag, .admin-notice, 
.notice-success, .notice-info, .notice-warning,
.wp-header-end, .updated, .error, .is-dismissible,
.woocommerce-message, .woocommerce-info, .woocommerce-error,
.woocommerce-notices-wrapper {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* Ensure header stays at top */
header, .main-header, .site-header, #masthead {
    position: relative !important;
    top: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove any forced margins/padding */
body {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.admin-bar .main-header {
    top: 0 !important;
}

/* Center logo */
.main-header .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    transition: opacity 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.main-header .logo:hover {
    opacity: 0.8;
}

/* Right side elements */
.main-header .nav-right-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

/* Remove old navbar styles */
.navbar,
.navbar-left,
.navbar-right {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-header .navbar {
    min-width: 0;
}

/* ===== SOFT ANIMATED BACKGROUND ===== */
.soft-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, #ffffff, #f3f3f3 60%, #f9f9f9);
    background-size: 200% 200%;
    animation: subtleMove 18s ease-in-out infinite;
    z-index: -1;
}

@keyframes subtleMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== HEADER & NAVIGATION ===== */
.main-header {
    background: linear-gradient(135deg, #3d0000 0%, #1a0000 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 30px;
    height: 80px;
    position: sticky;
    top: 0;
    z-index: 11010;
    box-shadow: none;
    border-bottom: none;
    transition: background-color 0.22s ease, box-shadow 0.22s ease;
    overflow: visible !important;
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
}

/* Left navigation */
.navbar-left {
    display: flex;
    gap: var(--nav-gap, 18px);
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    flex: 1 1 0;
    min-width: 0;
    flex-wrap: nowrap;
}

/* Center logo */
.main-header .logo {
    flex: 0 0 auto;
    margin: 0 20px;
    z-index: 10;
    transition: opacity 0.2s ease;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.main-header .logo .logo-icon {
    height: 50px;
    width: auto;
    display: block;
}

.main-header .logo:hover {
    opacity: 0.8;
}

/* Right navigation */
.navbar-right {
    display: flex;
    gap: var(--nav-gap, 18px);
    align-items: center;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
    flex: 1 1 0;
    min-width: 0;
    flex-wrap: nowrap;
}

/* Responsive header adjustments */
@media (min-width: 1400px) {
    .main-header {
        gap: 40px;
    }
}

@media (max-width: 1200px) {
    .main-header { gap: 20px; padding: 20px 30px; }
    .navbar-left {
        gap: 15px;
    }
    .navbar-right {
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .main-header { gap: 15px; padding: 15px 20px; }
    .navbar-left {
        gap: 12px;
    }
    .navbar-right {
        gap: 15px;
    }
    .navbar a {
        font-size: 0.95rem;
    }
}

/* Menu Toggle Button in Header */
.menu-toggle-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.18s ease;
    margin: 0;
    align-self: center;
    line-height: 1;
    position: relative;
    width: 46px;
    height: 46px;
    z-index: 11025;
}

.menu-toggle-btn:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.12);
}

/* Hamburger to X Animation - Proper Transform */
.menu-toggle-btn i {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    display: inline-block;
}

/* When sidebar is active, transform hamburger into X */
body.sidebar-active .menu-toggle-btn i {
    transform: rotate(180deg) scale(0.9);
}

.menu-toggle-btn.active i {
    transform: rotate(180deg) scale(0.9);
}

/* Alternative: Replace icon content with X */
.menu-toggle-btn.active i.fa-bars::before {
    content: "\f00d"; /* Font Awesome times/X icon */
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    margin-left: 0 !important;
    align-self: center;
}

.logo-icon {
    height: 55px;
    width: auto;
    display: block;
}

.logo-text-img {
    height: 42px;
    width: auto;
    display: block;
}

.logo-text {
    font-family: var(--brand-font);
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    -webkit-font-smoothing:antialiased;
}

.navbar a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-weight: 400;
    transition: opacity 0.2s ease;
    padding: 8px 0;
    border-radius: 0;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    position: relative;
}

.navbar a:hover { opacity: 0.7; }

.navbar a.active { opacity: 1; font-weight: 500; }

/* Sign In/Register CTA Button */
.navbar a.nav-cta {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
}

.navbar a.nav-cta:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
}

/* Sale link highlight */
.navbar a[style*="ffd700"] {
    color: #ffd700 !important;
    font-weight: 600;
}

.main-header.scrolled {
    padding: 15px 50px;
    background: rgba(0, 0, 0, 0.85);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* ===== GLOBAL BUTTON STYLES ===== */
.btn-shop {
    background: linear-gradient(to right, #c74a4a, #5d1212);
    color: #fff;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-shop:hover {
    background: #fff;
    color: #5d1212;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(93, 18, 18, 0.4);
}

/* Checkout Button */
.checkout-btn {
    background: #fff;
    color: #5d1212;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: inline-flex;
    align-items: center;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    margin: 0;
    align-self: center;
}

.checkout-btn.header-cart {
    background: #fff;
    color: #5d1212;
    padding: 12px 24px;
    margin-left: 15px;
}

.checkout-btn:hover {
    background: #eee;
    color: #a62b2b;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* ===== ADD TO CART BUTTON (Global) ===== */
.btn-add-cart {
    background: linear-gradient(135deg, #5d1212 0%, #a62b2b 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 140px;
    height: 42px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(166, 43, 43, 0.3);
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(166, 43, 43, 0.4);
    background: linear-gradient(135deg, #a62b2b 0%, #5d1212 100%);
}

.btn-add-cart:active {
    transform: translateY(0);
}

.btn-add-cart i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.btn-add-cart:hover i {
    transform: scale(1.1);
}

/* Loading state for cart buttons */
.btn-add-cart.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-add-cart.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== CART SIDEBAR STYLES (Updated from Shop) ===== */
.cart-toggle-btn {
    position: fixed;
    top: 96px;
    right: 22px;
    background: transparent;
    color: white;
    border: none;
    border-radius: 8px;
    width: auto;
    height: auto;
    padding: 10px 12px;
    cursor: pointer;
    z-index: 13050; /* Increased to ensure it's clickable above all other elements */
    box-shadow: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.cart-toggle-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 40px rgba(128, 0, 0, 0.5);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ffd700;
    color: #800000;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ===== TOAST NOTIFICATION STYLES ===== */
.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #4CAF50;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--ui-font);
    font-size: 0.95rem;
    font-weight: 500;
    transform: translateX(-400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 400px;
    min-width: 280px;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-notification.error {
    background: #f44336;
}

.toast-notification.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.toast-notification .toast-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.toast-notification i.toast-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom toast for shop.js fallback */
.custom-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #4CAF50;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    transform: translateX(-400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 400px;
    font-family: var(--ui-font);
}

.custom-toast.error {
    background: linear-gradient(135deg, #f44336, #da190b);
}

.custom-toast.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.custom-toast .toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 500;
}

.custom-toast .toast-content i {
    font-size: 1.3rem;
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-400px);
        opacity: 0;
    }
}

/* Cart badge pulse animation for visual feedback */
@keyframes badgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.cart-badge.pulse {
    animation: badgePulse 0.4s ease;
}

.cart-sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    left: auto !important;
    height: 100% !important; /* Fallback */
    height: 100dvh !important;
    min-height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    --cart-header-h: 72px;
    --cart-footer-h: 120px;
    width: 520px !important; /* Fixed width to match recommendations offset */
    max-width: 100vw !important;
    background: #fff5f5 !important; /* Light Maroon Theme */
    box-shadow: none !important; /* Remove shadow for seamless join */
    border-left: 1px solid rgba(128,0,0,0.05) !important; /* Subtle divider line */
    z-index: 12000 !important;
    transform: translate3d(100%, 0, 0) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    will-change: transform, opacity !important;
    transition: transform 0.3s cubic-bezier(0.22, 0.9, 0.32, 1), opacity 0.25s ease, visibility 0s 0.3s !important;
    display: grid !important;
    grid-template-rows: auto 1fr auto !important;
    overflow: hidden !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    -webkit-perspective: 1000 !important;
    perspective: 1000 !important;
}

/* Mobile Responsive for Cart Sidebar */
@media (max-width: 580px) {
    .cart-sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Fallback for browsers without dvh support */
@supports not (height: 100dvh) {
    .cart-sidebar {
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
    }
}

.cart-sidebar.active {
    transform: translate3d(0, 0, 0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: transform 0.3s cubic-bezier(0.22, 0.9, 0.32, 1), opacity 0.25s ease !important;
}

.cart-sidebar-header {
    padding: 22px 24px;
    background: #fff5f5; /* Light Maroon Theme */
    color: #800000; /* Maroon Text */
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    grid-row: 1;
    min-height: 72px;
    z-index: 1;
    border-bottom: 1px solid rgba(128,0,0,0.1);
}

.cart-sidebar-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.close-sidebar {
    background: rgba(128,0,0,0.1);
    border: none;
    color: #800000;
    font-size: 1.2rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-sidebar:hover {
    background: #800000;
    color: #fff;
    transform: rotate(90deg);
}

.cart-sidebar-content {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 22px !important;
    background: #fff5f5; /* Light Maroon Theme */
    -webkit-overflow-scrolling: touch;
}

.empty-cart-message {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.empty-cart-message i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-cart-message h3 {
    color: #333;
    margin-bottom: 10px;
}

.cart-sidebar-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 20px;
    background: #fff;
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart-sidebar-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.cart-sidebar-item-image {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    background: #f9f9f9;
    border: 1px solid #eee;
}

.cart-sidebar-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-sidebar-item-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cart-sidebar-item-info h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
}

.cart-sidebar-item-info p {
    margin: 2px 0;
    font-size: 0.95rem;
    color: #666;
}

.cart-sidebar-item-info .item-subtotal {
    font-weight: 700;
    color: #800000;
    margin-top: 6px;
    font-size: 1rem;
}

.cart-sidebar-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.quantity-selector-cart {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    margin-left: 0;
}

.quantity-btn-cart {
    width: 28px;
    height: 28px;
    border: none;
    background: #f8f8f8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #555;
    transition: background 0.2s;
    padding: 0;
}

.quantity-btn-cart:hover {
    background: #eee;
}

.cart-sidebar-item-quantity {
    width: 32px;
    text-align: center;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    padding: 0;
    height: 28px;
    -moz-appearance: textfield;
    background: transparent;
}

.remove-sidebar-item {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    transition: color 0.2s;
}

.remove-sidebar-item:hover {
    color: #dc3545;
    transform: scale(1.1);
}

.cart-sidebar-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0 6px;
    margin-top: 6px;
    border-top: 1px dashed #f0f0f0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #333;
}

.cart-sidebar-total span:last-child {
    color: #800000;
    font-size: 1.4rem;
}

.cart-sidebar-footer {
    grid-row: 3;
    padding: 20px 22px 22px;
    background: #fff5f5; /* Light Maroon Theme */
    border-top: 1px solid rgba(128,0,0,0.1);
    box-shadow: 0 -8px 30px rgba(0,0,0,0.06);
    min-height: 100px;
    z-index: 1;
}

.checkout-btn-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px;
    background: #800000;
    color: #fff;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1.15rem;
    transition: all 0.2s ease;
    box-shadow: 0 10px 25px rgba(128, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkout-btn-sidebar:hover {
    background: #600000;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(128, 0, 0, 0.3);
}

.shop-now-btn-sidebar {
    width: 100%;
    padding: 15px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.shop-now-btn-sidebar:hover {
    background: #000;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 11990; /* Just below cart sidebar (12000) */
    display: none;
}

.sidebar-overlay.active {
    display: block;
}

/* Messages Container */
#message-container {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 10000;
}

/* Responsive adjustments for cart */
@media (max-width: 700px) {
    .cart-sidebar { 
        width: 100% !important; 
        max-width: 100% !important; 
        border-radius: 0 !important; 
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        top: 0 !important;
        bottom: 0 !important;
    }
    .cart-sidebar.active { 
        transform: translate3d(0, 0, 0) !important;
    }
}

.message {
    padding: 10px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    box-shadow: 0 5px 18px rgba(0,0,0,0.15);
    animation: slideInRight 0.4s ease;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- FIXED NOTIFICATION STYLES (Bottom Left) --- */
.modal-confirmation-window {
    position: fixed;
    bottom: 80px;
    left: 22px;
    z-index: 20001; /* Higher than global modal (20000) and sidebar (12000) */
    max-width: 320px;
    background: white;
    padding: 14px 18px;
    border-radius: 11px;
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.25);
    border-left: 5px solid #800000;
    transition: all 0.4s ease-out;
    opacity: 0;
    transform: translateX(-100%);
}

.modal-confirmation-window.show {
    left: 22px;
    opacity: 1;
    transform: translateX(0);
}

.confirmation-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

#modal-icon {
    font-size: 1.6rem;
    color: #800000;
}

#modal-message {
    margin: 0;
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
}

.modal-confirmation-window.success {
    border-left-color: #28a745;
}
.modal-confirmation-window.success #modal-icon {
    color: #28a745;
}

.modal-confirmation-window.error {
    border-left-color: #dc3545;
}
.modal-confirmation-window.error #modal-icon {
    color: #dc3545;
}

/* --- CUSTOM REMOVAL MODAL DIALOG STYLES --- */
.custom-modal-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 20002; /* Higher than toast (20001) */
}

.custom-modal-dialog.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal-dialog .modal-content {
    background: white;
    padding: 24px;
    border-radius: 14px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
    transform: translateY(-30px);
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
    border: 1px solid #ddd;
    opacity: 0;
}

.custom-modal-dialog.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.custom-modal-dialog .modal-body {
    padding: 12px 0 20px 0;
}

.custom-modal-dialog .modal-icon-warning {
    font-family: "Font Awesome 6 Free", sans-serif !important;
    font-weight: 900 !important;
    font-size: 3rem;
    color: #ffc107;
    margin-bottom: 14px;
}

.custom-modal-dialog #removal-modal-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #333;
    margin: 6px 0 10px 0;
}

.custom-modal-dialog #removal-modal-message {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.custom-modal-dialog .modal-actions {
    display: flex;
    justify-content: space-around;
    gap: 12px;
    margin-top: 18px;
}

.custom-modal-dialog .modal-actions button {
    padding: 10px 18px;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    flex-grow: 1;
    transition: all 0.3s ease;
}

.custom-modal-dialog .btn-secondary {
    background: #f8f9fa;
    color: #555;
    border: 2px solid #e9ecef;
}

.custom-modal-dialog .btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.custom-modal-dialog .btn-danger {
    background: linear-gradient(135deg, #a00000, #800000);
    color: white;
    box-shadow: 0 6px 20px rgba(128, 0, 0, 0.3);
}

.custom-modal-dialog .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(128, 0, 0, 0.4);
}

.custom-modal-dialog .close-modal-btn {
    position: absolute;
    top: 8px;
    right: 14px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
    transition: color 0.2s;
}

.custom-modal-dialog .close-modal-btn:hover {
    color: #800000;
}

/* ===== BASE PRODUCT CARD STYLES (Shared) ===== */
.product-card {
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(166, 43, 43, 0.4);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: 0.3s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(166,43,43,0.2);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: transform 0.5s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card h3 {
    font-family: 'Mokoto', sans-serif;
    font-size: 1.3rem;
    color: #5d1212;
}

.product-card p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}

.product-card .price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #a62b2b;
    margin-bottom: 15px;
}

/* Product Badges */
.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #a62b2b;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.product-content {
    padding: 15px 0 0;
}

.product-category {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: block;
}

/* Quantity Input Container */
.quantity-input-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
}

.quantity-input-container label {
    font-weight: 500;
    color: #444;
    margin-right: 5px;
}

.quantity-input-container input[type="number"] {
    width: 60px;
    padding: 5px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 10px;
    -moz-appearance: textfield;
}

.quantity-input-container input[type="number"]::-webkit-outer-spin-button,
.quantity-input-container input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ===== SHOP PAGE SPECIFIC STYLES ===== */
.shop-main {
    margin-top: 20px;
    padding: 40px 50px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.shop-title {
    font-family: 'Mokoto', sans-serif;
    font-size: 2.5rem;
    color: #a62b2b;
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(166, 43, 43, 0.1);
}

.shop-content {
    display: flex;
    gap: 30px;
}

/* Sidebar Filters */
.sidebar-filters {
    width: 250px;
    flex-shrink: 0;
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 1px solid rgba(166, 43, 43, 0.1);
    position: sticky;
    top: 90px;
    height: fit-content;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: #5d1212;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.filter-group ul {
    list-style: none;
}

.filter-group ul li a {
    text-decoration: none;
    color: #444;
    display: block;
    padding: 5px 0;
    transition: color 0.2s;
}

.filter-group ul li a:hover {
    color: #a62b2b;
    font-weight: 500;
}

.reset-filters-btn {
    width: 100%;
    padding: 10px;
    background: #444;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.reset-filters-btn:hover {
    background: #222;
}

/* Product Grid */
.product-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* ===== FOOTER STYLES ===== */
.main-footer {
    background: linear-gradient(135deg, #3d0000 0%, #1a0000 100%);
    color: white;
    text-align: center;
    padding: 50px 0;
    position: relative;
    overflow: hidden;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
    text-align: left;
}

.footer-column h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s;
}

.social-links a:hover {
    background: white;
    color: #a62b2b;
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

/* Footer Logo */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-family: 'Mokoto', sans-serif;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.social-link:hover {
    background: white;
    color: #a62b2b;
    transform: translateY(-3px);
}

/* ===== MODAL STYLES (Shared) ===== */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    opacity: 0;
    visibility: hidden;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    /* Removed backdrop-filter for 240Hz performance */
    z-index: 20000; /* Higher than cart sidebar (12000) */
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.modal.show {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

.modal-content {
    background: #ffffff;
    border: 1px solid rgba(166, 43, 43, 0.1);
    border-radius: 12px;
    padding: 40px;
    width: 90%;
    max-width: 550px;
    text-align: center;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.3),
        0 0 0 5px rgba(166, 43, 43, 0.05);
    transform: translate3d(0, 20px, 0) scale(0.95);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.22, 0.9, 0.32, 1), opacity 0.25s ease;
    position: relative;
    will-change: transform, opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

.modal.show .modal-content {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
}

.modal-content h2 {
    font-family: 'Mokoto', sans-serif;
    color: #a62b2b;
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.modal-content p {
    font-size: 1rem;
    line-height: 
    margin-bottom: 15px;
    color: #444;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: #5d1212;
    background: none;
    border: none;
    transition: color 0.3s, transform 0.3s;
    padding: 5px;
    line-height: 1;
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', sans-serif !important;
}

.close-btn:hover {
    color: #c74a4a;
    transform: rotate(90deg);
}

/* --- MODERN ABOUT MODAL STYLES --- */
.about-modal-content {
    padding: 0 !important; /* Override default padding */
    overflow: hidden;
    max-width: 600px;
    border: none;
    background: #fff;
    text-align: left;
}

.about-header {
    background: linear-gradient(135deg, #800000 0%, #5d1212 100%);
    padding: 35px 30px;
    text-align: center;
    color: white;
    position: relative;
}

.about-logo {
    height: 55px;
    width: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.about-header h2 {
    font-family: 'Mokoto', sans-serif;
    font-size: 1.6rem;
    margin: 0;
    letter-spacing: 1px;
    color: white !important; /* Override default modal h2 color */
    border-bottom: none !important; /* Override default modal h2 border */
    padding-bottom: 0 !important;
}

.about-divider {
    width: 50px;
    height: 3px;
    background: rgba(255,255,255,0.3);
    margin: 15px auto 0;
    border-radius: 2px;
}

.about-body {
    padding: 30px;
    color: #444;
    line-height: 1.6;
    font-size: 0.95rem;
}

.about-intro {
    font-weight: 600;
    color: #800000;
    font-size: 1.05rem;
    margin-bottom: 15px;
}

.about-footer {
    background: #f9f9f9;
    padding: 25px;
    text-align: center;
    border-top: 1px solid #eee;
}

.about-footer h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.social-links-gradient {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icon-gradient {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon-gradient i {
    background: linear-gradient(45deg, #800000, #d63031);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

.social-icon-gradient:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(128, 0, 0, 0.15);
}

/* Ensure close button is visible on dark header */
.about-modal-content .close-btn {
    color: rgba(255,255,255,0.7);
    top: 15px;
    right: 15px;
}

.about-modal-content .close-btn:hover {
    color: white;
    transform: rotate(90deg);
}

/* ===== MODAL TEXT VISIBILITY FIXES ===== */
/* About Modal - Ensure all text is white on maroon background */
#about-modal .modal-content,
#about-modal .modal-content * {
    color: #ffffff !important;
}
#about-modal .modal-content p,
#about-modal .modal-content h2,
#about-modal .modal-content h3,
#about-modal .modal-content span {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
#about-modal .close-btn {
    color: #ffffff !important;
}
#about-modal .close-btn:hover {
    color: #ffd700 !important;
}

/* Contact Modal - Left column text visibility */
#contact-modal .bg-gradient-to-br p,
#contact-modal .bg-gradient-to-br h2,
#contact-modal .bg-gradient-to-br h4,
#contact-modal .bg-gradient-to-br span {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Contact Modal - Right column (form) text visibility */
#contact-modal .bg-white h3 {
    color: #1f2937 !important;
}
#contact-modal .bg-white p {
    color: #6b7280 !important;
}
#contact-modal .bg-white label {
    color: #6b7280 !important;
}
#contact-modal .bg-white input,
#contact-modal .bg-white textarea {
    color: #1f2937 !important;
}
#contact-modal .bg-white input::placeholder,
#contact-modal .bg-white textarea::placeholder {
    color: #9ca3af !important;
}

/* --- MODERN CONTACT MODAL STYLES --- */
@keyframes modalPopIn {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.contact-modal-content {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    max-width: 900px !important;
    width: 95% !important;
    overflow: hidden;
}

.modal.show .contact-modal-content {
    animation: modalPopIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Ensure Tailwind classes work within the modal */
.contact-modal-content .text-white { color: #ffffff !important; }
.contact-modal-content .text-gray-800 { color: #1f2937 !important; }
.contact-modal-content .text-gray-700 { color: #374151 !important; }
.contact-modal-content .text-gray-600 { color: #4b5563 !important; }
.contact-modal-content .bg-white { background-color: #ffffff !important; }
.contact-modal-content input, 
.contact-modal-content textarea {
    color: #111827 !important;
}
.contact-modal-content input::placeholder, 
.contact-modal-content textarea::placeholder {
    color: #9ca3af !important;
}

/* Contact Modal Specific Styles */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    text-align: left;
    margin-top: 20px;
}

.contact-info-col h3, .contact-form-col h3 {
    font-family: 'Mokoto', sans-serif;
    color: #5d1212;
    font-size: 1.2rem;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(166, 43, 43, 0.1);
    padding-bottom: 8px;
}

.contact-details-list {
    list-style: none;
    margin-bottom: 20px;
}

.contact-details-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #555;
}

.contact-details-list li i {
    width: 35px;
    height: 35px;
    background: #f8f9fa;
    color: #a62b2b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.2s;
}

.social-btn:hover {
    transform: translateY(-2px);
}

.social-btn.fb { background: #1877F2; }
.social-btn.tk { background: #000000; }
.social-btn.ig { background: #E1306C; }
.social-btn.ph { background: #25D366; }

.contact-form-dummy input, .contact-form-dummy textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
}

.contact-form-dummy button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(to right, #a62b2b, #5d1212);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.contact-form-dummy button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(166, 43, 43, 0.3);
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .modal-content {
        width: 95%;
        padding: 25px;
    }
}

/* ===== CHECKOUT PAGE STYLES ===== */
.checkout-main {
    padding: 40px 50px;
    max-width: 1200px;
    margin: 20px auto 50px auto;
}

/* Auth Login/Register Section */
.checkout-container.auth-container {
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.auth-title {
    text-align: center;
    color: #5d1212;
    font-size: 2.2rem;
    margin: 10px 0 20px 0;
}

.auth-sections-wrapper {
    display: flex;
    gap: 40px;
    width: 100%;
    justify-content: center;
    max-width: 1000px;
}

.login-section, .create-account-section {
    flex: 1;
    max-width: 450px;
    padding: 30px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.section-divider {
    width: 1px;
    background: #ddd;
    min-height: 400px;
}

.login-btn {
    background: linear-gradient(to right, #7a1b1b, #5d1212);
    margin-top: 15px;
}

.create-account-btn {
    background: linear-gradient(to right, #a62b2b, #7a1b1b);
    margin-top: 15px;
}

/* Standard Checkout (Logged In) */
.checkout-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.checkout-form-section, .order-summary-section {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.checkout-form-section {
    flex: 2;
    min-width: 450px;
}

.order-summary-section {
    flex: 1;
    position: sticky;
    top: 90px;
}

.checkout-form-section h2, .order-summary-section h2 {
    font-family: 'Mokoto', sans-serif;
    color: #5d1212;
    font-size: 1.5rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Form Styles */
.customer-form .form-group {
    margin-bottom: 20px;
}

.customer-form label {
    display: block;
    font-weight: 500;
    color: #444;
    margin-bottom: 5px;
}

.customer-form input[type="text"],
.customer-form input[type="email"],
.customer-form input[type="tel"],
.customer-form input[type="password"],
.customer-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.customer-form input:focus, .customer-form textarea:focus {
    border-color: #a62b2b;
    box-shadow: 0 0 0 3px rgba(166, 43, 43, 0.1);
    outline: none;
}

/* Payment Options */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.payment-option input[type="radio"] {
    margin-right: 10px;
    accent-color: #5d1212;
}

.payment-option:hover:not(.unavailable) {
    background: #fdf5f5;
}

.payment-option.unavailable {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f9f9f9;
}

/* Order Summary */
.cart-items-list {
    border-bottom: 1px dashed #ddd;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    padding: 5px 0;
}

.item-name {
    color: #444;
}

.item-price {
    font-weight: 500;
    color: #5d1212;
}

.summary-details {
    padding-top: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 1.1rem;
}

.summary-row.grand-total {
    font-weight: bold;
    color: white;
    background: linear-gradient(to right, #a62b2b, #5d1212);
    padding: 12px;
    margin: 10px -30px -30px -30px;
    border-radius: 0 0 10px 10px;
}

.summary-row.grand-total span {
    font-size: 1.2rem;
}

.place-order-btn.final-order-btn {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    font-size: 1.1rem;
    background: linear-gradient(to right, #7a1b1b, #5d1212);
}

.place-order-btn.final-order-btn:hover {
    background: linear-gradient(to right, #5d1212, #4a0d0d);
}

/* ===== GLOBAL RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
    .shop-content {
        flex-direction: column;
    }
    .sidebar-filters {
        width: 100%;
        position: static;
        margin-bottom: 30px;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .checkout-container,
    .checkout-container.auth-container {
        flex-direction: column;
        gap: 20px;
    }

    .auth-sections-wrapper {
        flex-direction: column;
        gap: 20px;
        max-width: none;
    }
    
    .section-divider {
        width: 100%;
        height: 1px;
        min-height: 1px;
        margin: 10px 0;
        background: #eee;
    }

    .checkout-form-section {
        min-width: unset;
        width: 100%;
    }
    .order-summary-section {
        width: 100%;
        position: static;
    }
    
    .summary-row.grand-total {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 768px) {
    .product-list { flex-direction: column; }
    .main-header {
        padding: 15px 20px;
        flex-direction: row; /* Keep row for mobile header */
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    
    /* Hide navbar visually but keep navbar-left in DOM for JavaScript */
    .navbar {
        position: absolute !important;
        left: -9999px !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    .navbar-left {
        position: absolute !important;
        left: -9999px !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    .navbar-right {
        display: none !important;
    }
    
    .navbar.active {
        display: flex;
    }
    .mobile-menu-btn {
        display: block; /* Show hamburger on mobile */
    }
    .navbar a {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
    .navbar .checkout-btn.header-cart {
        display: block; 
    }
    
    .shop-main, .checkout-main {
        padding: 20px;
        margin-top: 20px; 
    }
    
    .cart-sidebar {
        width: 100%;
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        top: 0 !important;
        bottom: 0 !important;
    }
    
    .cart-toggle-btn {
        top: 90px;
        right: 15px;
        width: 55px;
        height: 55px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 30px 20px;
    }
    .modal-content h2 {
        font-size: 1.5rem;
    }
    .contact-link {
        width: 100%;
        max-width: none;
    }
    .checkout-main {
        padding: 20px;
    }
    
    .auth-title {
        font-size: 1.8rem;
    }
    
    .cart-toggle-btn {
        top: 85px;
        right: 10px;
        width: 50px;
        height: 50px;
        padding: 12px;
    }
    
    .cart-sidebar-header {
        padding: 15px;
    }
    
    .cart-sidebar-content {
        padding: 15px;
    }
}

/* Container for centered content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== MODERN CHECKOUT STYLES ===== */
.checkout-main {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 20px auto 50px;
    animation: fadeIn 0.6s ease-out;
}

.shop-title {
    font-family: 'Mokoto', sans-serif;
    font-size: 2.8rem;
    color: #a62b2b;
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 3px solid rgba(166, 43, 43, 0.1);
    position: relative;
}

.shop-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, #5d1212, #a62b2b);
    border-radius: 2px;
}

/* Modern Checkout Container */
.checkout-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: start;
}

.checkout-container.auth-container {
    grid-template-columns: 1fr;
    max-width: 1000px;
    margin: 0 auto;
}

/* Auth Sections - Modern Layout */
.auth-sections-wrapper {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 40px;
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 
        0 10px 40px rgba(93, 18, 18, 0.1),
        0 0 0 1px rgba(166, 43, 43, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.section-divider {
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(166, 43, 43, 0.3) 50%, 
        transparent 100%);
    height: 100%;
    min-height: 400px;
}

.login-section, .create-account-section {
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}

.login-section h2, .create-account-section h2 {
    font-family: 'Mokoto', sans-serif;
    color: #5d1212;
    font-size: 1.6rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(166, 43, 43, 0.1);
}

/* Modern Form Styles */
.customer-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafbfc;
    font-family: 'Poppins', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #a62b2b;
    background: #ffffff;
    box-shadow: 
        0 0 0 4px rgba(166, 43, 43, 0.1),
        0 4px 15px rgba(0, 0, 0, 0.05);
    outline: none;
    transform: translateY(-2px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0a4a8;
}

/* Enhanced Payment Options */
.payment-options {
    display: grid;
    gap: 12px;
    margin: 25px 0;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.payment-option:hover:not(.unavailable) {
    border-color: #a62b2b;
    background: #fff5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(166, 43, 43, 0.1);
}

.payment-option input[type="radio"] {
    margin-right: 15px;
    transform: scale(1.2);
    accent-color: #a62b2b;
}

.payment-option.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

/* Modern Order Summary */
.order-summary-section {
    background: linear-gradient(135deg, #ffffff 0%, #fdfcfc 100%);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 
        0 10px 40px rgba(93, 18, 18, 0.1),
        0 0 0 1px rgba(166, 43, 43, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: sticky;
    top: 100px;
}

.order-summary-section h2 {
    font-family: 'Mokoto', sans-serif;
    color: #5d1212;
    font-size: 1.4rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(166, 43, 43, 0.1);
}

.cart-items-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
}

.cart-items-list::-webkit-scrollbar {
    width: 6px;
}

.cart-items-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.cart-items-list::-webkit-scrollbar-thumb {
    background: #a62b2b;
    border-radius: 10px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.cart-item:last-child {
    border-bottom: none;
}

.item-details {
    flex: 1;
}

.item-name {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 4px;
}

.item-quantity-price {
    font-size: 0.85rem;
    color: #666;
}

.item-price {
    font-weight: 700;
    color: #a62b2b;
    font-size: 1rem;
}

/* Enhanced Summary Details */
.summary-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 25px -10px -10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 1rem;
}

.summary-row.grand-total {
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, #a62b2b 0%, #5d1212 100%);
    padding: 18px 20px;
    margin: 20px -20px -20px;
    border-radius: 0 0 12px 12px;
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(166, 43, 43, 0.3);
}

/* Modern Buttons */
.btn-shop {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-shop::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    transition: left 0.6s ease;
}

.btn-shop:hover::before {
    left: 100%;
}

.btn-shop:active {
    transform: translateY(2px);
}

.login-btn {
    background: linear-gradient(135deg, #7a1b1b 0%, #5d1212 100%);
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
}

.create-account-btn {
    background: linear-gradient(135deg, #a62b2b 0%, #7a1b1b 100%);
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
}

.place-order-btn.final-order-btn {
    background: linear-gradient(135deg, #7a1b1b 0%, #5d1212 100%);
    width: 100%;
    padding: 18px;
    font-size: 1.2rem;
    margin-top: 25px;
    box-shadow: 0 6px 20px rgba(166, 43, 43, 0.4);
}

.place-order-btn.final-order-btn:hover {
    background: linear-gradient(135deg, #5d1212 0%, #4a0d0d 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(166, 43, 43, 0.5);
}

/* Enhanced Alerts & Messages */
.alert-message {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    animation: slideInDown 0.5s ease-out;
}

.error-alert {
    background: linear-gradient(135deg, #ffe6e6 0%, #ffcccc 100%);
    border: 2px solid #ff4444;
    color: #a62b2b;
}

.thank-you-message {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #ffffff 0%, #fdfcfc 100%);
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(93, 18, 18, 0.15),
        0 0 0 1px rgba(76, 175, 80, 0.1);
    border: 2px solid rgba(76, 175, 80, 0.2);
    animation: fadeInScale 0.6s ease-out;
}

.thank-you-message h2 {
    color: #7a1b1b;
    font-family: 'Mokoto', sans-serif;
    font-size: 2.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.thank-you-message p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
}

.logged-in-message {
    background: linear-gradient(135deg, #f7eaea 0%, #f0dcdc 100%);
    border: 2px solid #a62b2b;
    color: #5d1212;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-weight: 500;
}

.logged-in-message a {
    color: #a62b2b;
    text-decoration: none;
    font-weight: 600;
}

.logged-in-message a:hover {
    text-decoration: underline;
}

/* Loading States */
.btn-shop.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-shop.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 968px) {
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .order-summary-section {
        position: static;
        order: -1;
    }
    
    .auth-sections-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px;
    }
    
    .section-divider {
        width: 100%;
        height: 1px;
        min-height: 1px;
        background: linear-gradient(to right, 
            transparent 0%, 
            rgba(166, 43, 43, 0.3) 50%, 
            transparent 100%);
    }
}

@media (max-width: 768px) {
    .checkout-main {
        padding: 20px 15px;
    }
    
    .shop-title {
        font-size: 2.2rem;
    }
    
    .auth-sections-wrapper {
        padding: 25px 20px;
    }
    
    .thank-you-message {
        padding: 40px 25px;
    }
    
    .thank-you-message h2 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .shop-title {
        font-size: 1.8rem;
    }
    
    .order-summary-section,
    .checkout-form-section {
        padding: 20px 15px;
    }
    
    .summary-row.grand-total {
        font-size: 1.1rem;
        padding: 15px;
    }
}
/* ===== MODERN CHECKOUT STYLES ===== */
.modern-checkout {
    min-height: 100vh;
}

/* Checkout Hero Section */
.checkout-hero {
    background: linear-gradient(135deg, #5d1212 0%, #a62b2b 50%, #5d1212 100%);
    color: white;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.checkout-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 2;
}

.checkout-header-content {
    max-width: 600px;
}

.checkout-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.checkout-title {
    font-family: 'Mokoto', sans-serif;
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 15px;
}

.checkout-title .highlight {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.checkout-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Progress Steps */
.checkout-progress {
    display: flex;
    gap: 30px;
    align-items: center;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.progress-step.active {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: white;
    color: #a62b2b;
    border-color: white;
}

.step-text {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Floating Gear */
.checkout-header-visual {
    position: relative;
}

.floating-gear {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gear-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Auth Section */
.auth-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.auth-container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(93, 18, 18, 0.1);
    overflow: hidden;
}

.auth-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.auth-tab {
    flex: 1;
    padding: 20px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background: white;
    color: #a62b2b;
    box-shadow: 0 -2px 0 #a62b2b inset;
}

.auth-content {
    padding: 40px;
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h3 {
    font-family: 'Mokoto', sans-serif;
    color: #a62b2b;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.auth-header p {
    color: #6c757d;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.input-with-icon input {
    padding-left: 45px !important;
}

/* Checkout Form Section */
.checkout-form-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.checkout-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

.checkout-main-form {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.form-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.section-header h3 {
    font-family: 'Mokoto', sans-serif;
    color: #a62b2b;
    font-size: 1.4rem;
    margin: 0;
}

.section-header i {
    color: #a62b2b;
    font-size: 1.2rem;
}

.customer-info-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.customer-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #a62b2b, #5d1212);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.customer-details h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.customer-details p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.logout-link {
    margin-left: auto;
    color: #a62b2b;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.logout-link:hover {
    color: #5d1212;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-method {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.payment-method input {
    display: none;
}

.payment-method.selected {
    border-color: #a62b2b;
    background: #fff5f5;
}

.payment-method.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.method-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.method-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #a62b2b;
}

.method-info {
    flex: 1;
}

.method-info h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.method-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.coming-soon-badge {
    background: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.method-check {
    color: #a62b2b;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.payment-method.selected .method-check {
    opacity: 1;
}

/* Order Summary */
.checkout-sidebar {
    position: sticky;
    top: 100px;
}

.order-summary-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.summary-title {
    font-family: 'Mokoto', sans-serif;
    color: #a62b2b;
    font-size: 1.3rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 25px;
    padding-right: 10px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f8f9fa;
}

.cart-item:last-child {
    border-bottom: none;
}

.item-image {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a62b2b;
    font-size: 1.2rem;
}

.item-details {
    flex: 1;
}

.item-name {
    margin: 0 0 5px 0;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.item-meta {
    margin: 0;
    color: #6c757d;
    font-size: 0.85rem;
}

.item-price {
    font-weight: 700;
    color: #a62b2b;
    font-size: 1rem;
}

.summary-totals {
    border-top: 2px solid #f8f9fa;
    padding-top: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 1rem;
}

.total-row.grand-total {
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, #a62b2b, #5d1212);
    padding: 18px 20px;
    margin: 20px -20px -20px;
    border-radius: 0 0 20px 20px;
    font-size: 1.2rem;
}

.shipping-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f9ecec;
    border-radius: 10px;
    margin-top: 20px;
    border: 1px solid #a62b2b;
}

.shipping-info i {
    color: #a62b2b;
    font-size: 1.2rem;
}

.shipping-text {
    font-size: 0.9rem;
    color: #5d1212;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.security-badge i {
    color: #a62b2b;
    font-size: 1.5rem;
}

.security-text {
    display: flex;
    flex-direction: column;
}

.security-text strong {
    color: #333;
    font-size: 0.95rem;
}

.security-text span {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Confirmation Section */
.confirmation-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.confirmation-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.confirmation-card {
    background: white;
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 2px solid #e8f5e8;
}

.confirmation-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #a62b2b, #7a1b1b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    margin: 0 auto 25px;
}

.confirmation-card h2 {
    font-family: 'Mokoto', sans-serif;
    color: #333;
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.confirmation-text {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.order-details {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    text-align: left;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: #666;
    font-weight: 500;
}

.detail-value {
    color: #333;
    font-weight: 600;
}

.confirmation-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
}

.confirmation-note {
    background: #fbecec;
    border: 1px solid #a62b2b;
    border-radius: 10px;
    padding: 15px;
    color: #5d1212;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.confirmation-note i {
    font-size: 1.1rem;
}

/* Enhanced Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #a62b2b, #5d1212);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5d1212, #4a0d0d);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(166, 43, 43, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn.full-width {
    width: 100%;
    justify-content: center;
}

.order-btn {
    padding: 18px 25px;
    font-size: 1.1rem;
    margin-top: 20px;
}

/* Helper Text */
.helper-text {
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Loading States */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 968px) {
    .checkout-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .checkout-sidebar {
        position: static;
        order: -1;
    }
    
    .checkout-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .checkout-title {
        font-size: 2.8rem;
    }
    
    .checkout-progress {
        justify-content: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .checkout-hero {
        padding: 60px 0 40px;
    }
    
    .checkout-title {
        font-size: 2.2rem;
    }
    
    .checkout-main-form,
    .auth-content {
        padding: 30px 20px;
    }
    
    .confirmation-card {
        padding: 40px 25px;
    }
    
    .confirmation-actions {
        flex-direction: column;
    }
    
    .auth-tabs {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .checkout-title {
        font-size: 1.8rem;
    }
    
    .progress-step .step-text {
        display: none;
    }
    
    .customer-info-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .logout-link {
        margin-left: 0;
    }
    
    .method-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* Desktop-scale: make the site render like ~80% zoom on wide screens
   Uses transform (works in Firefox) and leaves a zoom fallback for Blink/Edge.
   Applied only on large viewports to avoid mobile issues. */
@media (min-width: 1000px) {
    :root{ --ui-scale: 0.8; }
    /* Use zoom where supported (Chrome/Edge/Safari). Avoid transform on body
       because it breaks fixed-positioned elements (modals, sidebars) in some browsers. */
    html { zoom: var(--ui-scale); }
}
/* --- FIXED NOTIFICATION STYLES (Bottom Left) --- */
.modal-confirmation-window {
    position: fixed;
    bottom: 80px;
    left: 22px;
    z-index: 20001; /* Higher than global modal (20000) and sidebar (12000) */
    max-width: 320px;
    background: white;
    padding: 14px 18px;
    border-radius: 11px;
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.25);
    border-left: 5px solid #800000;
    transition: all 0.4s ease-out;
    opacity: 0;
    transform: translateX(-100%);
}

.modal-confirmation-window.show {
    left: 22px;
    opacity: 1;
    transform: translateX(0);
}

.confirmation-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

#modal-icon {
    font-size: 1.6rem;
    color: #800000;
}

#modal-message {
    margin: 0;
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
}

.modal-confirmation-window.success {
    border-left-color: #28a745;
}
.modal-confirmation-window.success #modal-icon {
    color: #28a745;
}

.modal-confirmation-window.error {
    border-left-color: #dc3545;
}
.modal-confirmation-window.error #modal-icon {
    color: #dc3545;
}



/* ===== INFO SIDEBAR STYLES (Alta-inspired Clean UI) ===== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 11010;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hide old toggle button - now in header */
.info-toggle-btn {
    display: none;
}

.info-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -470px;
    width: 450px;
    height: 100vh; /* Full height */
    background: #fff;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 11020;
    left: 0;
    transform: translateX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    display: flex;
    flex-direction: column;
}

.info-sidebar.active {
    left: 0 !important;
}

.info-sidebar-header {
    display: none; /* Remove the red header completely */
}

.close-sidebar {
    display: none; /* Close button removed, use hamburger toggle instead */
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-logo-img {
    height: 32px;
    width: auto;
    filter: invert(1); /* Make white logo visible on white background */
}

.info-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 90px 0 0 0; /* Remove bottom padding, let footer handle it */
    display: flex;
    flex-direction: column;
}

/* Navigation List - Maroon Theme */
.sidebar-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-list > li {
    margin: 0;
}

.sidebar-nav-list > li > a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    color: #374151;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border-radius: 0;
}

.sidebar-nav-list > li > a:hover {
    background: #fef2f2;
    color: #800000;
}

.sidebar-nav-list > li > a i:first-child {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: #800000;
}

.sidebar-nav-list > li > a:hover i:first-child {
    color: #5a0000;
}

/* Active/Selected State - Maroon */
.sidebar-nav-list > li.active > a,
.sidebar-nav-list > li > a.active {
    background: #fef2f2;
    color: #800000;
}

.sidebar-nav-list > li.active > a i:first-child,
.sidebar-nav-list > li > a.active i:first-child {
    color: #800000;
}

/* Submenu Styles */
.has-submenu > a {
    position: relative;
}

.submenu-arrow {
    margin-left: auto;
    font-size: 0.75rem !important;
    color: #9ca3af !important;
    transition: transform 0.2s ease;
}

.has-submenu.active .submenu-arrow {
    transform: rotate(180deg);
}

.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height 0.3s ease, opacity 0.2s ease, transform 0.2s ease;
    background: #fafafa;
}

.has-submenu.active .sidebar-submenu {
    max-height: 400px;
    opacity: 1;
    transform: translateY(0);
}

/* Hover/focus drop-down for Categories */
.has-submenu:hover .sidebar-submenu,
.has-submenu:focus-within .sidebar-submenu {
    max-height: 400px;
    opacity: 1;
    transform: translateY(0);
}

.has-submenu:hover .submenu-arrow,
.has-submenu:focus-within .submenu-arrow {
    transform: rotate(180deg);
}

.sidebar-submenu li a {
    display: block;
    padding: 10px 24px 10px 60px;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}

.sidebar-submenu li a:hover {
    background: #fef2f2;
    color: #800000;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto; /* Push to bottom */
    padding: 16px 24px 20px 24px; /* Extra bottom padding */
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0; /* Don't shrink */
}

.sidebar-footer .logout-btn,
.sidebar-footer .login-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #dc2626;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.sidebar-footer .login-btn {
    color: #800000;
}

.sidebar-footer .logout-btn:hover {
    background: #fef2f2;
}

.sidebar-footer .login-btn:hover {
    background: #fef2f2;
}

.sidebar-footer .logout-btn i,
.sidebar-footer .login-btn i {
    font-size: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .info-sidebar {
        width: 100%;
        left: -100%;
    }
}

/* End of Info Sidebar Styles */

/* Transparent Overlay for Info Sidebar */
.sidebar-overlay.transparent-overlay {
    background: transparent !important;
    pointer-events: auto; /* Ensure clicks are still captured */
    backdrop-filter: none !important; /* Prevent global blur when info sidebar is open */
    filter: none !important;
    z-index: 11015; /* Keep overlay beneath the info sidebar UI */
}

/* ===== MODERN INVOICE STYLES ===== */

.invoice-container {
    max-width: 800px;
    margin: 40px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

.invoice-header {
    background: linear-gradient(135deg, #800000, #a00000);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.invoice-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.invoice-logo i {
    font-size: 2rem;
}

.invoice-logo .logo-text {
    font-family: 'Mokoto', serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.invoice-details {
    text-align: right;
}

.invoice-details h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
}

.invoice-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    flex-shrink: 0;
}

.invoice-status {
    text-align: center;
    margin: 15px 0;
}

.invoice-details p {
    margin: 5px 0 0 0;
    opacity: 0.9;
}

.invoice-body {
    padding: 30px;
}

.invoice-section {
    margin-bottom: 30px;
}

.invoice-section h2 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #800000;
    padding-bottom: 5px;
}

.invoice-address {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #800000;
}

.invoice-address p {
    margin: 0;
    color: #555;
    line-height: 1.5;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.invoice-table th,
.invoice-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.invoice-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #800000;
}

.invoice-table .item-image {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.invoice-table .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.invoice-table .item-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.invoice-table .item-info h4 {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.invoice-table .item-info p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 0.9rem;
}

.invoice-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.invoice-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #555;
}

.invoice-summary-row.total {
    border-top: 2px solid #800000;
    padding-top: 15px;
    margin-top: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #333;
}

.invoice-footer {
    background: #333;
    color: white;
    padding: 20px 30px;
    text-align: center;
}

.invoice-footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .invoice-container {
        margin: 20px;
        border-radius: 8px;
    }
    
    .invoice-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .invoice-table {
        font-size: 0.9rem;
    }
    
    .invoice-table th,
    .invoice-table td {
        padding: 10px;
    }
    
    .invoice-table .item-details {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Invoice Actions */
.invoice-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.invoice-actions .btn-back,
.invoice-actions .btn-invoice,
.invoice-actions .btn-print,
.invoice-actions .btn-track {
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.invoice-actions .btn-back {
    background: #6c757d;
    color: white;
}

.invoice-actions .btn-back:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108,117,125,0.3);
}

.invoice-actions .btn-invoice {
    background: #007bff;
    color: white;
}

.invoice-actions .btn-invoice:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,123,255,0.3);
}

.invoice-actions .btn-print {
    background: #28a745;
    color: white;
}

.invoice-actions .btn-print:hover {
    background: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40,167,69,0.3);
}

.invoice-actions .btn-track {
    background: #ffc107;
    color: #212529;
}

.invoice-actions .btn-track:hover {
    background: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,193,7,0.3);
}

.invoice-logo-img {
    height: 50px;
    width: auto;
    max-width: 200px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.status-processing {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

.status-badge.status-shipped {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-badge.status-delivered {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.status-cancelled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===== INFO SIDEBAR STYLES (Redesigned) ===== */
.info-sidebar {
    position: fixed;
    inset: 0 auto 0 0; /* top:0; right:auto; bottom:0; left:0 off-screen */
    left: -400px;
    width: 380px;
    height: auto;
    min-height: 100vh; /* Reach full viewport height */
    background: #fff;
    box-shadow: 4px 0 25px rgba(0,0,0,0.15);
    z-index: 11000;
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.info-sidebar.active {
    left: 0;
}

.info-sidebar-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #4a0d0d 0%, #8a1c1c 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.close-sidebar {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.close-sidebar:hover {
    transform: rotate(90deg);
    color: #ffd700;
}

.info-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

/* ===== ACCOUNT SIDEBAR STYLES (Redesigned) ===== */
.account-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 380px;
    height: 100% !important; /* Force full height */
    min-height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
    box-shadow: -6px 0 28px rgba(0,0,0,0.16);
    border-left: 1px solid rgba(0,0,0,0.04);
    z-index: 11000;
    transform: translateX(100%);
    transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.account-sidebar.active {
    transform: translateX(0);
}

.account-sidebar-header {
    padding: 25px 30px; /* More padding */
    background: linear-gradient(135deg, #4a0d0d 0%, #8a1c1c 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.close-account-sidebar {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.close-account-sidebar:hover {
    transform: rotate(90deg);
    color: #ffd700;
}

.account-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-profile {
    display: flex;
    align-items: center;
    gap: 12px; /* Reduced gap */
    margin-bottom: 15px; /* Much less spacing */
    padding-bottom: 15px; /* Less padding */
    border-bottom: 1px solid #eee;
}

.account-avatar {
    width: 50px; /* Smaller avatar */
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff; /* Thinner border */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initial {
    width: 100%;
    height: 100%;
    background: #800000;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem; /* Smaller font */
    font-weight: bold;
}

.account-meta {
    flex: 1;
    min-width: 0;
    text-align: left;
    line-height: 1.3; /* Tighter line height */
}

.account-name {
    font-size: 1.05rem; /* Smaller */
    font-weight: 700;
    color: #333;
    margin-bottom: 3px; /* Less margin */
    word-break: break-word;
    white-space: nowrap; /* Keep on one line */
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-email {
    font-size: 0.85rem; /* Smaller */
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
    word-break: break-word;
    white-space: nowrap; /* Keep on one line */
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-email .verified {
    color: #18a84b;
    font-size: 0.9rem; /* Smaller */
}

.account-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.account-menu-item {
    margin-bottom: 6px; /* Much less spacing */
}

.account-menu-link {
    display: flex;
    align-items: center;
    gap: 14px; /* Slightly reduced */
    padding: 11px 16px; /* Reduced padding */
    color: #444;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem; /* Slightly smaller */
    border-radius: 8px;
    transition: all 0.2s;
}

.account-menu-link:hover, .account-menu-item.active .account-menu-link {
    background: #fff5f5;
    color: #800000;
    transform: translateX(5px);
}

.account-menu-link i {
    width: 28px; /* Larger icons */
    font-size: 1.1rem;
    text-align: center;
    color: #800000;
}

.menu-badge {
    margin-left: auto;
    background: #800000;
    color: white;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== SIDEBAR NAVIGATION STYLES ===== */
.sidebar-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-list li {
    margin-bottom: 5px;
}

.sidebar-nav-list a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}

.sidebar-nav-list a:hover {
    background: #fff5f5;
    color: #800000;
    transform: translateX(5px);
}

.sidebar-nav-list a i {
    width: 25px;
    text-align: center;
    font-size: 1.1rem;
    color: #800000;
}

.nav-divider {
    height: 1px;
    background: #eee;
    margin: 10px 20px;
}

/* Submenu */
.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fcfcfc;
}

.sidebar-nav-list li.active .sidebar-submenu {
    max-height: 500px;
}

.sidebar-submenu li a {
    padding: 10px 20px 10px 60px;
    font-size: 0.95rem;
    color: #555;
}

.sidebar-submenu li a:hover {
    color: #800000;
    background: #f0f0f0;
}

.submenu-arrow {
    margin-left: auto;
    font-size: 0.8rem !important;
    transition: transform 0.3s;
}

.sidebar-nav-list li.active .submenu-arrow {
    transform: rotate(180deg);
}

/* Sidebar Vouchers Panel */
.sidebar-vouchers-panel {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
    display: none;
}

.account-menu-item.active .sidebar-vouchers-panel {
    display: block;
}

.vouchers-section h5 {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vouchers-section ul {
    list-style: none;
    padding: 0;
}

.sv-item {
    background: white;
    border: 1px dashed #ccc;
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.sv-code {
    font-weight: bold;
    color: #800000;
    display: block;
}

.sv-desc {
    color: #555;
    font-size: 0.8rem;
}

/* =====================================================
   GLOBAL MOBILE-FIRST RESPONSIVE STYLES
   ===================================================== */

@media (max-width: 768px) {
    /* Root Variables for Mobile */
    :root {
        --nav-height: auto;
        --site-side-pad: 12px;
    }
    
    /* Base Typography */
    html {
        font-size: 14px;
    }
    
    /* Header Mobile Reset */
    .main-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        flex-wrap: wrap !important;
        padding: 12px !important;
        gap: 10px !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    .main-header .navbar-left,
    .main-header .navbar-right {
        display: none !important;
    }
    
    .main-header .logo {
        order: 1;
        margin: 0 auto;
    }
    
    .logo-icon {
        height: 36px !important;
    }
    
    /* Page Content Mobile Reset */
    main, section, .shop-main, .checkout-main, .container, .modern-hero, .featured-section {
        padding-top: 20px !important;
    }
    
    .modern-hero, .shop-hero {
        padding-top: 0;
    }
    
    /* Container Mobile */
    .site-container,
    .container,
    .shop-main,
    .checkout-main,
    .main,
    .hero-container,
    .shop-hero-content {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    /* Account Sidebar Mobile */
    .account-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        border-radius: 0 !important;
    }
    
    .account-sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-header {
        padding: 20px 16px;
    }
    
    .user-avatar {
        width: 60px;
        height: 60px;
    }
    
    .sidebar-nav-list li a {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
    
    .sidebar-nav-list li a i {
        width: 28px;
    }
    
    /* Cart Sidebar Mobile */
    .cart-sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .cart-sidebar-header {
        padding: 16px;
    }
    
    .cart-sidebar-content {
        padding: 12px;
    }
    
    .cart-sidebar-footer {
        padding: 16px;
    }
    
    /* Global Form Elements Mobile */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    textarea,
    select {
        font-size: 16px !important; /* Prevents iOS zoom */
        padding: 12px 14px;
        border-radius: 8px;
    }
    
    button,
    .btn,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 0.95rem;
        border-radius: 8px;
    }
    
    /* Modal Mobile */
    .modal {
        padding: 16px;
    }
    
    .modal-content {
        max-width: 100% !important;
        max-height: 90vh;
        margin: auto;
        border-radius: 16px !important;
        overflow-y: auto;
    }
    
    .close-btn {
        position: absolute;
        top: 12px;
        right: 12px;
        font-size: 1.5rem;
        z-index: 10;
    }
    
    /* Footer Mobile */
    .main-footer {
        padding: 30px 16px 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }
    
    .footer-column {
        width: 100%;
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .copyright {
        font-size: 0.8rem;
        padding-top: 20px;
    }
    
    /* Confirmation Modal Mobile */
    .modal-confirmation-window {
        padding: 16px;
    }
    
    .confirmation-content {
        padding: 20px;
        border-radius: 12px;
    }
    
    .confirmation-content i {
        font-size: 2rem;
    }
    
    .confirmation-content p {
        font-size: 0.95rem;
    }
}

/* Very Small Mobile (360px and below) */
@media (max-width: 360px) {
    html {
        font-size: 13px;
    }
    
    .logo-icon {
        height: 32px !important;
    }
    
    .main-header {
        padding: 10px !important;
    }
    
    button,
    .btn {
        padding: 10px 14px;
    }
}

/* Touch Device Enhancements */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap targets */
    a,
    button,
    input[type="submit"],
    input[type="button"],
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Disable hover effects */
    a:hover,
    button:hover,
    .btn:hover {
        transform: none;
    }
    
    /* Active state for touch feedback */
    a:active,
    button:active,
    .btn:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
    
    /* Better scrolling */
    .overflow-x-auto,
    .scroll-container {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .overflow-x-auto::-webkit-scrollbar,
    .scroll-container::-webkit-scrollbar {
        display: none;
    }
}

/* Safe Area Support for Notched Devices */
@supports (padding: env(safe-area-inset-bottom)) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    .main-footer {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
    
    .cart-sidebar-footer {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
    
    .modal-content {
        margin-bottom: env(safe-area-inset-bottom);
    }
}

/* Landscape Mobile Adjustments */
@media (max-width: 812px) and (orientation: landscape) {
    .main-header {
        padding: 8px 16px !important;
    }
    
    .modal-content {
        max-height: 95vh;
    }
}
