@font-face {
    font-family: 'Inter';
    src: url('../font/inter-v13-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Inter';
    src: url('../font/inter-v13-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Inter';
    src: url('../font/inter-v13-500.woff2') format('woff2');
    font-weight: 500; /* Use 500 for semi-bold since we don't have 600 */
    font-style: normal;
}

.desktop-only { display: block !important; }
.mobile-only { display: none !important; }

@media (max-width: 991px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: block !important; }
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

:root {
    --primary-color: #F59E0B; /* Orange */
    --primary-hover: #D97706;
    --bg-color: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-surface-dark: #000;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --border-radius-lg: 20px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -4px rgba(0,0,0,0.05);

    /* Scrollbar */
    --scrollbar-width: 6px;
    --scrollbar-track: transparent;
    --scrollbar-thumb: rgba(0,0,0,0.1);
    --scrollbar-thumb-hover: rgba(0,0,0,0.2);
}

/* Global Scrollbar Styles */
::-webkit-scrollbar {
    width: var(--scrollbar-width);
    height: var(--scrollbar-width);
}
::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* MOBILE HEADER */
.mobile-header {
    display: none; /* hidden on desktop */
}

/* SIDEBAR LEFT (Navigation) */
.sidebar-left {
    width: 260px;
    background-color: var(--bg-surface-dark);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    z-index: 10;
    overflow-y: auto;
    
    /* Dark Theme Scrollbar - Increased visibility */
    --scrollbar-thumb: rgba(255,255,255,0.3);
    --scrollbar-thumb-hover: rgba(255,255,255,0.5);
}

.logo {
    margin: 10px 0 20px 0;
    padding: 0 10px;
    text-align: center;
}
.logo img {
    height: 70px;
    max-width: 100%;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: #94A3B8; /* Slate-400 for unselected */
    font-weight: 600;
    border-radius: var(--border-radius-lg);
    margin-bottom: 5px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: #1E293B; /* Slate-800 for hover */
    color: #FFFFFF;
}

/* Shop Closed Notice */
.shop-closed-notice {
    background: linear-gradient(135deg, rgb(239, 0, 0) 0%, rgb(234, 42, 103) 100%);
    border: 1px solid #ffe8cc;
    border-radius: 12px;
    padding: 16px;
    margin: 10px 16px;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(255, 145, 0, 0.08);
}

.shop-closed-notice p {
    margin: 0;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

.shop-closed-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}


.cart-wrapper .shop-closed-notice {
    margin: 16px;
}

.mobile-cart-footer .shop-closed-notice {
    margin: 0 0 12px 0;
}

.nav-item.active {
    background-color: var(--primary-color);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4); /* Nice orange glow */
}

/* In the mockup the active state doesn't have an orange background but a pill with shadow */
.nav-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    border-radius: 50%;
    object-fit: cover;
}
.nav-icon.cat-img {
    width: 32px;
    height: 32px;
}

/* SECONDARY NAV (Subpages) */
.secondary-nav {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.secondary-nav-item {
    display: block;
    padding: 4px 16px;
    text-decoration: none;
    color: #64748B; /* Slate-500 */
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}
.secondary-nav-item:hover {
    color: #FFFFFF;
}

@media (max-width: 1024px) {
    .secondary-nav {
        display: none !important;
    }
}

/* PWA INSTALL BUTTON */
.pwa-install-wrapper {
    margin: 15px 15px 0 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.pwa-install-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px;
    background: #000;
    border: none;
    border-radius: var(--border-radius-md);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.pwa-install-btn:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
}

.pwa-install-btn .nav-icon {
    width: 28px;
    height: 28px;
    margin-right: 10px;
    display: block;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.pwa-install-btn:hover .nav-icon {
    transform: scale(1.1);
}

/* Mobile specific overrides for the right nav drawer */
.sidebar-right-nav .pwa-install-wrapper {
    margin: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.pwa-install-btn.mobile {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.pwa-install-btn.mobile:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* MAIN CONTENT WRAPPER */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg-color);
}
.top-nav-desktop {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 24px 40px; /* matched to cart-header padding 24px */
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-surface);
}
.top-nav-desktop a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 16px;
    transition: color 0.2s;
}
.top-nav-desktop a:hover, .top-nav-desktop a.active {
    color: var(--primary-color);
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 40px 32px 40px;
    background-color: var(--bg-color);
}

/* VIEW HEADER & SECTIONS */
.category-section {
    scroll-margin-top: 0px;
    margin-bottom: 60px;
}
.category-section:first-child {
    margin-top: 0 !important;
}

.view-header {
    position: sticky;
    top: 0;
    margin: 0 -40px 24px -40px;
    padding: 12px 40px 12px 40px;
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 50;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

@media (max-width: 1024px) {
    .view-header {
        top: 0 !important;
        margin: 0 -16px 20px -16px !important;
        padding: 10px 16px 10px 16px;
    }
}

.view-header h1, .view-header h2 {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

/* PRODUCT GRID */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-img-wrapper {
    position: relative;
    padding-top: 60%; /* Aspect Ratio */
    background: #e2e8f0;
}
.product-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.product-badge {
    position: absolute;
    bottom: 8px; right: 8px;
    background: rgba(255,255,255,0.9);
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
    font-size: 16px;
    font-family: serif;
    color: #000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sale-badge {
    position: absolute;
    rotate:-8deg;
    bottom: 12px;
    left: 12px;
    background-color: #ff2428ff;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    line-height: 1.1;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border: 2px solid white;
}
.sale-badge-percent {
    font-size: 1.1rem;
}
.sale-badge-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    font-weight: 700;
}

.product-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-content p {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 16px;
    flex: 1;
    /* Limit to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
}
.price small {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
}

.btn-add {
    background: var(--primary-color);
    border: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: background 0.2s;
}
.btn-add:hover {
    background: var(--primary-hover);
}
.btn-add img {
    width: 28px; height: 28px;
    filter: brightness(0) invert(1);
}

/* SIDEBAR RIGHT (Cart) */
.sidebar-right {
    width: 360px;
    background-color: var(--bg-surface);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    z-index: 20;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    transform-origin: right;
}

/* Hide Sidebar on Checkout */
body.is-checkout .sidebar-right {
    transform: translateX(100%);
    width: 0;
    opacity: 0;
    border-left: none;
    pointer-events: none;
}

.cart-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
}
.cart-header h2 {
    font-size: 16px;
    font-weight: 600;
}
.cart-close-mobile {
    display: none;
    cursor: pointer;
}

.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.cart-empty {
    margin: auto;
    text-align: center;
    color: var(--text-muted);
}
.cart-empty img {
    opacity: 0.3;
    width: 80px;
    height: 80px;
    margin:0;
}

/* MOBILE CART FOOTER */
.mobile-cart-footer {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--bg-surface);
    padding: 16px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    z-index: 444;
}
body.is-checkout .mobile-cart-footer {
    display: none !important;
}
.btn-block {
    width: 100%;
    padding: 16px;
    border-radius: var(--border-radius-lg);
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    border: none;
    cursor: pointer;
    text-align: center;
}

.cart-toggle-btn {
    display: none;
}

body.cart-has-items .cart-toggle-btn {
    display: block;
}

/* SIDEBAR MOBILE NAV */
.sidebar-right-nav {
    display: none;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .app-layout {
        flex-direction: column;
    }
    .hide-on-mobile {
        display: none !important;
    }
    .main-content {
        padding: 0 16px 20px 16px;
    }
    
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 20px;
        background-color: var(--bg-surface-dark);
        color: #fff;
        z-index: 40; /* Above main content */
    }
    
    .mobile-header a {
        display: flex;
        align-items: center;
    }
    
    .mobile-logo {
        height: 50px;
        display: block;
        padding-top:10px;
    }

    .logo {
        display: none;
    }
    
    .mobile-header-actions {
        display: flex;
        align-items: center;
        gap: 16px;
    }
    
    .hamburger-btn, .icon-btn {
        background: none;
        border: none;
        color: #fff;
        padding: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sidebar-left {
        position: fixed;
        top: 0; 
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 555;
        transition: left 0.3s ease;
        padding-top: 24px;
        box-shadow: var(--shadow-lg);
    }
    
    #pwa-install-wrapper-desktop {
        display: none !important;
    }
    
    .sidebar-left.open {
        left: 0;
    }
    
    .sidebar-backdrop {
        position: fixed;
        top: 0; left: 0;
        width: 100vw; height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 90;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    
    .sidebar-backdrop.open {
        opacity: 1;
        pointer-events: all;
    }
    
    .sidebar-right {
        position: fixed;
        top: 0; right: -100vw;
        width: 100vw;
        height: 100vh;
        max-width: none;
        border-left: none;
        transition: right 0.3s ease;
        z-index: 555;
    }
    .sidebar-right.open {
        right: 0;
    }
    
    .sidebar-right-nav {
        display: flex;
        position: fixed;
        top: 0; right: -100vw;
        width: 280px;
        height: 100vh;
        z-index: 555;
        transition: right 0.3s ease;
        background: var(--bg-surface);
        box-shadow: var(--shadow-lg);
        display: flex;
        flex-direction: column;
    }
    .sidebar-right-nav.open {
        right: 0;
    }
    .sidebar-nav-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 24px;
        border-bottom: 1px solid var(--border-color);
    }
    .sidebar-nav-header h2 {
        font-size: 20px;
        font-weight: 600;
    }
    .close-mobile-nav {
        background: none;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        color: var(--text-main);
    }
    .mobile-top-nav-links {
        display: flex;
        flex-direction: column;
        padding: 16px;
    }
    .mobile-nav-item {
        padding: 16px;
        text-decoration: none;
        font-size: 18px;
        font-weight: 600;
        color: var(--text-main);
        border-radius: var(--border-radius-sm);
        margin-bottom: 8px;
        transition: background 0.2s;
    }
    .mobile-nav-item:hover, .mobile-nav-item.active {
        background: var(--primary-color);
        color: #fff;
    }

    .mobile-secondary-nav {
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid var(--border-color);
        padding-left: 16px;
        padding-right: 16px;
        display: flex;
        flex-direction: column;
    }
    .mobile-nav-item.secondary {
        font-size: 15px;
        color: var(--text-muted);
        padding: 10px 16px;
    }
    .mobile-nav-item.secondary:hover {
        background: #f1f5f9;
        color: var(--text-main);
    }

    .cart-close-mobile {
        display: flex;
    }
    
    body.cart-has-items .mobile-cart-footer,
    body.shop-is-closed .mobile-cart-footer {
        display: block;
    }
}

/* ============================================================
   MODAL & MODIFIERS
   ============================================================ */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.6);
    z-index: 111;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: all;
}

.product-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--bg-surface);
    width: 100%; max-width: 500px;
    height: 90vh; /* Fixed height to allow scrolling within */
    max-height: 800px;
    border-radius: 20px;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.product-modal.open {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 220;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: var(--text-main);
    transition: background 0.2s;
}
.modal-close:hover {
    background: #f1f5f9;
}

/* Image & Scroll Area */
.modal-scroll-area {
    flex: 1;
    overflow-y: auto;
    /* Custom Scrollbar */
    scrollbar-width: thin;
}
.modal-header-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.modal-body {
    padding: 24px;
}
.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}
.modal-desc {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Modifiers UI */
.modifier-group {
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}
.modifier-group-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
}
.modifier-group-info {
    font-size: 12px;
    font-weight: 400;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 12px;
}

.modifier-option {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative; /* Fixes browser scroll-jump on hidden input focus */
}
.modifier-option:last-child {
    margin-bottom: 0;
}
.modifier-option:hover {
    border-color: #cbd5e1;
}

/* Hides default radio/checkbox but keeps them accessible without scrolling bugs */
.modifier-input {
    opacity: 0;
    position: absolute;
    width: 1px;
    height: 1px;
    top: 50%;
    left: 20px;
}

/* Custom Checkmark/Radio */
.modifier-control {
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    margin-right: 16px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    flex-shrink: 0;
}
.modifier-input[type="checkbox"] + .modifier-label-text .modifier-control {
    border-radius: 6px; /* Box for checkbox */
}

/* Selected State */
.modifier-input:checked + .modifier-label-text .modifier-control {
    border-color: var(--primary-color);
}
/* The dot inside the radio */
.modifier-input[type="radio"]:checked + .modifier-label-text .modifier-control::after {
    content: '';
    width: 12px; height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
}
/* The check inside the checkbox */
.modifier-input[type="checkbox"]:checked + .modifier-label-text .modifier-control::after {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
    font-size: 16px;
}
.modifier-label-content {
    display: flex;
    flex: 1;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: var(--text-main);
}
.modifier-price-tag {
    padding-left:4px;
    color: var(--primary-color);
    font-size: 14px;
}
.modifier-input:checked + .modifier-label-text .modifier-label-content {
    color: var(--text-main); /* or bolder? */
}

.modifier-label-text {
    display: flex;
    width: 100%;
    align-items: center;
}

/* ============================================================
   STICKY FOOTER INSIDE MODAL
   ============================================================ */
.modal-footer {
    padding: 20px 24px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}
.qty-selector {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px 8px;
}
.qty-btn {
    border: none;
    background: transparent;
    width: 36px; height: 36px;
    font-size: 20px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-main);
}
/* This class is shared with cart */
.qty-display {
    font-weight: 700;
    width: 24px; text-align: center;
    font-size: 18px;
}
.btn-add-modal {
    flex: 1;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}
.btn-add-modal:hover {
    background: var(--primary-hover);
}
.modal-btn-price {
    padding-left:6px;
    font-weight: 500;
    opacity: 0.85;
}


/* ============================================================
   CART SIDEBAR
   ============================================================ */
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}
.cart-header h2 {
    font-size: 21px;
    font-weight: 700;
    color: #111827;
    text-align: center;
    width: 100%;
}
.cart-close-mobile {
    display: none;
    position: absolute;
    top: 16px; right: 16px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: none;
    align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 220;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: var(--text-main);
    transition: background 0.2s;
}
.cart-close-mobile:hover {
    background: #f1f5f9;
}

.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.cart-empty {
    text-align: center;
    color: var(--text-muted);
    margin-top: 40px;
}

.cart-item-container {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}
.cart-item-container:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.cart-item-details {
    flex: 1;
    padding-right: 16px;
}
.cart-item-name {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}
.cart-item-modifiers {
    list-style: none;
    margin: 0 0 8px 0;
    padding: 0;
}
.cart-item-modifiers li {
    font-size: 14px;
    color: var(--text-muted);
    position: relative;
    padding-left: 12px;
    line-height: 1.4;
}
.cart-item-modifiers li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #94a3b8;
}
.cart-item-price {
    margin-top:4px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.cart-item-note-link {
    margin-top: 4px;
}
.cart-item-note-link a {
    font-size: 13px;
    color: #111827;
    opacity: 0.5;
    text-decoration: underline;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s;
}
.cart-item-note-link a:hover {
    opacity: 1;
}
.cart-item-note-display {
    margin-bottom: 8px;
}
.cart-item-note-display span {
    display: inline-block;
    background-color: #dee5f3;
    color: #111827;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
}
.cart-item-note-editor {
    margin: 12px 0;
    padding: 0;
}
.cart-item-note-editor textarea {
    width: 100%;
    height: 70px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 12px;
    font-family: inherit;
    font-size: 15px;
    resize: none;
    outline: none;
}
.cart-item-note-editor textarea:focus {
    border-color: #94a3b8;
}
.note-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 25px;
}
.note-editor-actions button {
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    padding: 4px 0;
}
.note-editor-actions .btn-note-save {
    color: #111827;
}
.note-editor-actions .btn-note-cancel, 
.note-editor-actions .btn-note-delete {
    color: #626e80;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 12px;
}
.qty-btn-round {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #475569;
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
}
.qty-btn-round:hover {
    background-color: #334155;
}
.cart-item-qty .qty-display {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    min-width: 16px;
    text-align: center;
}

.cart-footer {
    padding: 24px;
    background-color: var(--bg-surface);
    border-top: 4px solid #f1f5f9;
}
.cart-breakdown {
    margin-bottom: 16px;
}
.cart-line {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.cart-sum {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 24px;
    padding-top: 8px;
}
.btn-checkout {
    display: block;
    width: 100%;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 999px; /* Pill shape */
    padding: 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s ease;
}
.btn-checkout:hover {
    background-color: var(--primary-hover);
}

/* Mobile Adjustments for Modal */
@media (max-width: 768px) {
    .product-modal {
        border-radius: 20px 20px 0 0;
        top: auto; bottom: 0; left: 0;
        transform: translateY(100%);
        max-width: 100%; /* full width */
        height: 90vh; /* slightly less than full viewport */
        max-height: none;
    }
    .product-modal.open {
        transform: translateY(0);
    }
    
    .cart-close-mobile {
        display: block;
    }
    
    body.cart-has-items .main-content,
    body.shop-is-closed .main-content {
        padding-bottom: 120px;
    }
}

@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   UNIVERSAL FORM DESIGN SYSTEM
   ============================================================ */

/* Form Container */
.form-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Row Layout (2 side-by-side) */
.form-row {
    display: flex;
    gap: 16px;
}
.form-row-2 > .form-group {
    flex: 1;
}

/* Form Group */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Labels */
.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.02em;
}

/* Inputs */
.form-input {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
    width: 100%;
}
.form-input::placeholder {
    color: #94a3b8;
}
.form-input:hover {
    border-color: #cbd5e1;
}
.form-input:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}
.form-input.is-invalid {
    border-color: #ef4444 !important;
    background: #fef2f2;
}
.form-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form-error-text {
    font-size: 13px;
    font-weight: 500;
    color: #ef4444;
    margin-top: 4px;
}

/* Code Input (Special) */
.form-input-code {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 6px;
    text-align: center;
    text-transform: uppercase;
    padding: 16px;
    font-family: 'Inter', monospace;
}

/* Hints below inputs */
.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Tabs ───────────────────────────────────────────────────── */
.form-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: var(--border-radius-sm);
    padding: 4px;
    margin-bottom: 8px;
}
.form-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: none;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.form-tab:hover {
    color: var(--text-main);
}
.form-tab.active {
    background: #fff;
    color: var(--text-main);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Auth forms: show/hide */
.auth-form {
    display: none;
}
.auth-form.active {
    display: flex;
}

/* ── Buttons ────────────────────────────────────────────────── */
.form-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}
.form-btn-block {
    width: 100%;
}
.form-btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}
.form-btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}
.form-btn-outline {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border-color);
}
.form-btn-outline:hover {
    border-color: #cbd5e1;
    color: var(--text-main);
    background: #f8fafc;
}
.form-btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 10px 16px;
}
.form-btn-ghost:hover {
    color: var(--text-main);
    background: #f1f5f9;
}

/* Loading Spinner */
.form-btn-loading {
    pointer-events: none;
    opacity: 0.7;
}
.form-btn-loading span {
    visibility: hidden;
}
.form-btn-loading::after {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: formSpin 0.6s linear infinite;
}
.form-btn-outline.form-btn-loading::after {
    border-color: rgba(0,0,0,0.1);
    border-top-color: var(--text-main);
}

@keyframes formSpin {
    to { transform: rotate(360deg); }
}

/* ── Alerts ─────────────────────────────────────────────────── */
.form-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    animation: formAlertIn 0.3s ease;
}
.form-alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.form-alert-success svg {
    color: #10b981;
    flex-shrink: 0;
}
.form-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.form-alert-error svg {
    color: #ef4444;
    flex-shrink: 0;
}

@keyframes formAlertIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Form Actions (button row) ──────────────────────────────── */
.form-actions {
    display: flex;
    gap: 12px;
    padding-top: 8px;
}

/* ============================================================
   ACCOUNT PAGE SPECIFIC
   ============================================================ */

.account-page {
    max-width: 560px;
    margin: 0 auto;
    padding: 20px 0;
}

.account-card {
    background: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    padding: 40px 36px;
    box-shadow: var(--shadow-md);
}

.account-card-icon {
    text-align: center;
    margin-bottom: 8px;
}

.account-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.account-subtitle {
    text-align: center;
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.5;
}

/* Profile Header */
.account-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.account-avatar {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}
.account-avatar span {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.account-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
}
.account-email {
    font-size: 14px;
    color: var(--text-muted);
}

/* Verify Info */
.verify-info {
    text-align: center;
    padding: 20px 0 8px;
}
.verify-info svg {
    margin-bottom: 12px;
}
.verify-info p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── Responsive Forms ───────────────────────────────────────── */
@media (max-width: 640px) {
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
    .account-card {
        padding: 28px 20px;
        border-radius: var(--border-radius-md);
    }
    .form-actions {
        flex-direction: column;
    }
    .account-page {
        padding: 8px 0;
    }
}
