/*
Theme Name: Siddhanath App UI
Theme URI: https://siddhanath.store
Author: Antigravity
Description: A mobile-first, app-shell WooCommerce theme for professional B2B stores.
Version: 1.0
Tags: mobile-first, ecommerce, b2b, minimalist
*/

:root {
    /* Brand */
    --wa-green: #39b54a;
    --wa-dark-green: #1b2a41;
    /* Backgrounds */
    --bg-light: #f4f7f6;
    --bg-card: #ffffff;
    /* Text */
    --text-main: #2c3e50;
    --text-muted: #888;
    /* Layout */
    --header-height: 140px;
    --footer-height: 75px;
    --shell-width: 480px;
    --shell-border: 8px;
    --shell-breakpoint: 500px;
    /* Animations */
    --transition-spring: cubic-bezier(0.68, -0.6, 0.32, 1.6);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    /* Border Radius */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    /* Skeleton Shimmer */
    --shimmer: #e2e8f0;
    --shimmer-highlight: #f8fafc;
}

/* GLASS UTILITY */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-lg);
}

.glow-btn {
    box-shadow: 0 4px 15px rgba(57, 181, 74, 0.3);
    transition: all 0.3s var(--transition-smooth);
}
.glow-btn:active { transform: scale(0.94); opacity: 0.9; }

.elastic-hover {
    transition: all 0.4s var(--transition-spring);
}
.elastic-hover:hover { transform: translateY(-5px) scale(1.02); }
.elastic-hover:active { transform: scale(0.96); }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: #f8faf9;
    color: var(--text-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* APP SHELL CONTAINER */
#app-shell {
    max-width: 480px;
    margin: 20px auto;
    background: white;
    min-height: calc(100vh - 40px);
    box-shadow: 0 30px 100px rgba(0,0,0,0.12);
    position: relative;
    padding-top: var(--header-height);
    padding-bottom: var(--footer-height);
    border-radius: 28px;
    overflow: hidden;
    border: 10px solid #1b2a41;
}

/* Header styles are self-contained in header.php */

/* MOBILE VIEW — Full width on real devices */
@media screen and (max-width: 500px) {
    #app-shell {
        max-width: 100%;
        margin: 0;
        min-height: 100vh;
        border-radius: 0;
        border: none;
    }
    .app-footer { bottom: 0; top: auto; }
}

/* WOOCOMMERCE APP STYLES - GLOBAL OVERRIDES */
.woocommerce-result-count, .woocommerce-ordering { display: none !important; }
.woocommerce breadcrumb { display: none !important; }

/* GLASS NOTIFICATION TOASTS — Replaces standard WooCommerce notices */
.woocommerce-message, 
.woocommerce-error, 
.woocommerce-info,
.woocommerce-notice {
    border: none !important;
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border-radius: 20px !important;
    box-shadow: var(--glass-shadow) !important;
    padding: 20px !important;
    margin: 15px !important;
    border-left: 5px solid var(--wa-green) !important;
    color: var(--wa-dark-green) !important;
    font-weight: 700 !important;
    list-style: none !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
}

.woocommerce-error { border-left-color: #e74c3c !important; background: rgba(231, 76, 60, 0.05) !important; }
.woocommerce-info { border-left-color: #3498db !important; background: rgba(52, 152, 219, 0.05) !important; }

.woocommerce-message::before, .woocommerce-error::before, .woocommerce-info::before {
    display: none !important;
}

.woocommerce-message a.button,
.woocommerce-message .button {
    background: var(--wa-green) !important;
    color: white !important;
    border-radius: 12px !important;
    padding: 10px 20px !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(57,181,74,0.2);
}
/* Fix Add to Cart button — brand green instead of WooCommerce purple */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    background-color: var(--wa-green) !important;
    color: white !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    border: none !important;
    transition: background 0.2s, transform 0.2s !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover {
    background-color: var(--wa-dark-green) !important;
    transform: translateY(-1px);
}
.woocommerce a.button.alt,
.woocommerce button.button.alt {
    background-color: var(--wa-green) !important;
}

/* SINGLE PRODUCT APP VIEW */
.woocommerce-product-gallery { margin-bottom: 20px !important; }
.product_title { font-size: 1.5em !important; margin-bottom: 10px !important; }
.woocommerce-tabs { display: none !important; }

/* B2B EXCLUSIVE BADGE — improved contrast */
.b2b-badge,
.product-card-info small {
    color: #4a7c38 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    background: #e8f5e9;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 3px;
}

/* STICKY BARS — Keep inside app shell on desktop (no viewport escape) */
@media screen and (min-width: 501px) {
    .app-cart-summary {
        position: fixed !important;
        bottom: 25px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 430px !important;
        right: auto !important;
        border-radius: 30px !important;
    }
    .siddhanath-checkout-confirm-bar {
        position: fixed !important;
        bottom: 25px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 430px !important;
        right: auto !important;
    }
}
/* OVERLAY SYSTEM */
.app-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 2000;
    display: none;
    flex-direction: column;
}
@media screen and (min-width: 501px) {
    .app-overlay { max-width: 480px; margin: 0 auto; border: 8px solid #333; border-radius:30px; }
}
.overlay-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #eee;
}
.overlay-content { padding: 30px 20px; }
.search-form { display: flex; align-items: center; background: #f0f0f0; border-radius: 30px; padding: 5px 15px; }
.search-field { background: transparent; border: none; flex: 1; padding: 10px; font-size: 1.1em; outline: none; }
/* SKELETON LOADERS */
.skeleton-shimmer {
    background: linear-gradient(
        90deg,
        var(--shimmer) 25%,
        var(--shimmer-highlight) 50%,
        var(--shimmer) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
    to { background-position-x: -200%; }
}

.skeleton-search {
    height: 50px;
    margin: 10px 0;
    width: 100%;
    border-radius: 12px;
}
.skeleton-search.active {
    @extend .skeleton-shimmer; /* Note: browsers don't support @extend, adding manually */
    background: linear-gradient(90deg, var(--shimmer) 25%, var(--shimmer-highlight) 50%, var(--shimmer) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

/* SIDE MENU LIST */
.side-menu-list { list-style: none; padding: 0; margin: 0; }
.side-menu-list li { border-bottom: 1px solid #f9f9f9; }
.side-menu-list a { 
    display: block; 
    padding: 15px 0; 
    color: #444; 
    text-decoration: none; 
    font-size: 15px; 
    display: flex; 
    align-items: center; 
    gap: 15px;
}
.side-menu-list a:hover { color: var(--wa-green); }

/* SHOP LAYOUT v5.0 */
.app-shop-container { padding-top: 10px; }

.category-scroller {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 15px 20px;
    scrollbar-width: none; /* Hide scrollbar Firefox */
    position: sticky;
    top: var(--header-height);
    background: white;
    z-index: 99;
    border-bottom: 1px solid #f0f0f0;
}
.category-scroller::-webkit-scrollbar { display: none; }
.cat-chip {
    white-space: nowrap;
    padding: 8px 18px;
    background: #f0f3f2;
    border-radius: 20px;
    text-decoration: none;
    color: #555;
    font-size: 13px;
    font-weight: 600;
}
.cat-chip.active {
    background: var(--wa-green);
    color: white;
    box-shadow: 0 4px 10px rgba(57, 181, 74, 0.2);
}

.app-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 12px;
    min-width: 0;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #edf2f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
}
.product-card-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fcfdfc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 10px;
}
.product-card-image img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.product-card-info { padding: 10px 12px 15px; flex: 1; }
.product-card-info h4 {
    margin: 0;
    font-size: 13px;
    color: #1b2a41;
    /* Multi-line clamp: show 2 lines, then ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    line-height: 1.4;
    min-height: 2.8em; /* Reserve space for 2 lines */
}
.product-card-price { 
    color: var(--wa-green); 
    font-weight: 800; 
    font-size: 1.1em; 
    display: block; 
    margin-top: 4px; 
}

/* HIDE DEFAULT WOO ACCOUNT NAV */
.woocommerce-MyAccount-navigation { display: none; }
.woocommerce-MyAccount-content { width: 100% !important; float: none !important; padding: 0 !important; }

/* ACCOUNT PRO: FORMS & SUB-PAGES */
.woocommerce-EditAccountForm, .woocommerce-form-edit-address {
    background: white;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid #f0f3f2;
}
.woocommerce-form-row { margin-bottom: 20px !important; }
.woocommerce-form-row label { 
    display: block; 
    font-size: 13px; 
    font-weight: 700; 
    margin-bottom: 8px; 
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.woocommerce-Input, .input-text {
    width: 100% !important;
    padding: 13px 18px !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8e6 !important;
    background: #fcfdfc !important;
    font-size: 15px !important;
    color: var(--wa-dark-green) !important;
    transition: all 0.2s ease;
}
.woocommerce-Input:focus, .input-text:focus {
    border-color: var(--wa-green) !important;
    box-shadow: 0 0 0 4px rgba(57, 181, 74, 0.1) !important;
    outline: none;
    background: white !important;
}

/* ORDER HISTORY CARDS */
.app-order-card {
    background: white;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #f0f3f2;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    display: block;
    text-decoration: none;
    color: inherit;
}
.order-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.order-number { font-weight: 800; font-size: 1.1em; color: var(--wa-dark-green); }
.order-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.status-completed { background: #e6f7eb; color: #28a745; }
.status-processing { background: #e7f3ff; color: #007bff; }
.status-on-hold { background: #fff8e6; color: #ffc107; }
.status-cancelled { background: #feebeb; color: #dc3545; }

.order-items-summary { font-size: 13px; color: #777; margin-bottom: 15px; line-height: 1.5; }
.order-footer { border-top: 1px solid #f9f9f9; padding-top: 15px; display: flex; justify-content: space-between; align-items: center; }
.order-total-price { font-weight: 800; color: var(--wa-green); font-size: 1.2em; }

/* PAYMENT SELECTION CARDS */
.wc_payment_methods { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.wc_payment_method { margin-bottom: 12px !important; }
.wc_payment_method input[type="radio"] { display: none !important; }
.wc_payment_method label {
    display: block !important;
    padding: 18px 20px !important;
    background: #f8faf9 !important;
    border: 2px solid #eef2f0 !important;
    border-radius: 18px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 700 !important;
    color: #444 !important;
}
.wc_payment_method input[type="radio"]:checked + label {
    border-color: var(--wa-green) !important;
    background: white !important;
    box-shadow: 0 10px 25px rgba(57,181,74,0.1) !important;
    color: var(--wa-dark-green) !important;
}
.wc_payment_method .payment_box {
    padding: 15px !important;
    background: #fff;
    border-radius: 12px;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    border: 1px solid #f0f0f0;
}

/* CART STEPPER REFINEMENT */
.app-cart-qty-stepper {
    display: inline-flex;
    align-items: center;
    background: #f1f5f3;
    border-radius: 12px;
    padding: 2px;
}
.cart-qty-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    font-weight: 800;
    color: var(--wa-green);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.app-cart-qty-stepper input {
    width: 40px !important;
    border: none !important;
    background: transparent !important;
    text-align: center !important;
    font-weight: 800 !important;
    color: var(--wa-dark-green) !important;
    padding: 0 !important;
    font-size: 14px !important;
}

/* CHECKOUT SIMPLIFICATION (STRICT B2B) */
.woocommerce-shipping-fields, .shipping_address { display: none !important; }
.woocommerce-billing-fields__field-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}
.woocommerce-billing-fields__field-wrapper .form-row {
    width: 100% !important;
    margin-bottom: 15px !important;
    float: none !important;
}

/* Ensure classic checkout review section is clean */
.woocommerce-checkout-review-order-table {
    display: none !important; /* We use our custom receipt recap instead */
}

/* High-Density Account & Checkout Overrides */
input::placeholder { color: #ccc; font-size: 13px; }
.select2-container--default .select2-selection--single {
    width: 100% !important;
    height: 50px !important;
    border-radius: 12px !important;
    border-color: #e2e8e6 !important;
    background: #fcfdfc !important;
    padding: 10px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: normal !important;
    color: var(--wa-dark-green) !important;
    font-weight: 700;
}

/* EMPTY CART STATE */
.app-empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 30px;
    text-align: center;
    min-height: 50vh;
}
.app-empty-cart .empty-icon {
    font-size: 4em;
    margin-bottom: 20px;
    display: block;
    animation: bob 2s ease-in-out infinite;
}
.app-empty-cart h3 {
    font-size: 1.4em;
    font-weight: 800;
    color: var(--wa-dark-green);
    margin: 0 0 8px;
}
.app-empty-cart p {
    color: var(--text-muted);
    margin: 0 0 25px;
    font-size: 0.95em;
}
.app-btn-primary {
    display: inline-block;
    background: var(--wa-green);
    color: white;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: 0.95em;
    box-shadow: 0 8px 20px rgba(57, 181, 74, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.app-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(57, 181, 74, 0.4);
    color: white;
}
@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* SIDDHANATH B2B PRODUCT SPECS */
.siddhanath-b2b-specs-card {
    border-radius: var(--radius-md) !important;
    border: 1px solid #edf2f0 !important;
}

.b2b-pricing-stack {
    display: flex;
    flex-direction: column;
}

.b2b-info-grid > div {
    background: #fbfcfb;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #f0f3f2;
}

.b2b-unit-conversion {
    position: relative;
    border-top: 1px dashed #e0e0e0;
}

#unit-calc-result {
    animation: fadeIn 0.3s ease-out;
}

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

/* PREMIUM PRODUCT PAGE TICKET EFFECTS */
.woocommerce-product-details__short-description {
    line-height: 1.6;
    color: #444;
    font-size: 0.95em;
    margin-bottom: 20px;
}

.summary.entry-summary {
    display: flex;
    flex-direction: column;
}

/* QUANTITY FIELD REFINEMENT */
.woocommerce .quantity .qty {
    width: 60px !important;
    height: 45px !important;
    border-radius: 12px !important;
    border: 1px solid #ddd !important;
    background: #fdfdfd !important;
    font-weight: 800 !important;
    margin-right: 10px !important;
}

/* B2B PRICING HIGHLIGHTS */
.b2b-price-badge {
    background: var(--wa-green);
    color: white;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

/* HIDE QUANTITY SPINNER ARROWS (Force Keyboard Typing) */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

/* ============================================================
   ANIMATION KEYFRAMES
   ============================================================ */
@keyframes rotate-3d {
    0% { transform: rotateY(0deg) scale(1); }
    50% { transform: rotateY(180deg) scale(1.1); }
    100% { transform: rotateY(360deg) scale(1); }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes staggered-reveal {
    from { opacity: 0; transform: translateY(15px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   SPLASH SCREEN
   ============================================================ */
#app-splash {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--wa-dark-green);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s var(--transition-smooth), visibility 0.6s;
}

.splash-logo-container {
    width: 120px;
    height: 120px;
    perspective: 1000px;
    margin-bottom: 25px;
}

.splash-logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: rotate-3d 2s infinite var(--transition-smooth);
}

.splash-text {
    color: white;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.8;
}

/* ============================================================
   GRID STAGGERING & ELASTIC FEEL
   ============================================================ */
.product-card, .bulk-item-card, .glass-card, .drawer-item {
    opacity: 0;
    transform: translateY(15px) scale(0.98);
    transition: opacity 0.5s ease, transform 0.5s var(--transition-spring);
}

.product-card.revealed, .bulk-item-card.revealed, .glass-card.revealed, .drawer-item.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ============================================================
   STAYING REVEALED (Intersection Observer Fix)
   ============================================================ */
.revealed { opacity: 1 !important; transform: translateY(0) scale(1) !important; }

/* ============================================================
   POLICY & INFO PAGES SYSTEM
   ============================================================ */
.policy-page {
    padding: var(--spacing-md);
    background: white;
}

.info-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg) 0;
    background: linear-gradient(135deg, #f8faf9 0%, #ffffff 100%);
    border-radius: var(--radius-lg);
    border: 1px solid #eee;
}
.info-header i, .info-header .dashicons {
    font-size: 40px;
    color: var(--wa-green);
    margin-bottom: 15px;
    height: auto; width: auto;
}
.info-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--wa-dark-green);
}

.policy-section {
    margin-bottom: var(--spacing-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s var(--transition-smooth);
}
.policy-section.revealed { opacity: 1; transform: translateY(0); }

.policy-section h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--wa-green);
    border-left: 4px solid var(--wa-green);
    padding-left: 12px;
    margin-bottom: 15px;
}

.policy-text {
    line-height: 1.7;
    color: #444;
    font-size: 14.5px;
}

.policy-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.policy-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
}
.policy-list li::before {
    content: "\f147"; /* dashicons-yes */
    font-family: 'dashicons';
    position: absolute;
    left: 0;
    color: var(--wa-green);
    font-size: 18px;
}

/* BANK DETAILS CARD */
.bank-details-card {
    background: var(--wa-dark-green);
    color: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin-top: var(--spacing-md);
    box-shadow: 0 15px 35px rgba(27, 42, 65, 0.2);
    position: relative;
    overflow: hidden;
}
.bank-details-card::after {
    content: "\f174"; /* dashicons-bank */
    font-family: 'dashicons';
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 120px;
    opacity: 0.05;
}
.bank-meta {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.bank-meta:last-child { border-bottom: none; }
.bank-label { font-size: 11px; text-transform: uppercase; opacity: 0.6; letter-spacing: 1px; }
.bank-value { font-size: 14px; font-weight: 700; }

/* Staggered Delay for first 12 items */
.product-card:nth-child(1), .bulk-item-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2), .bulk-item-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3), .bulk-item-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4), .bulk-item-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5), .bulk-item-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6), .bulk-item-card:nth-child(6) { animation-delay: 0.3s; }
.product-card:nth-child(7), .bulk-item-card:nth-child(7) { animation-delay: 0.35s; }
.product-card:nth-child(8), .bulk-item-card:nth-child(8) { animation-delay: 0.4s; }
.product-card:nth-child(9), .bulk-item-card:nth-child(9) { animation-delay: 0.45s; }
.product-card:nth-child(10), .bulk-item-card:nth-child(10) { animation-delay: 0.5s; }
.product-card:nth-child(11), .bulk-item-card:nth-child(11) { animation-delay: 0.55s; }
.product-card:nth-child(12), .bulk-item-card:nth-child(12) { animation-delay: 0.6s; }

/* Global App Shell Fade In */
#app-shell {
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   SIDE DRAWER (GLASSSMORPHISM)
   ============================================================ */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(27, 42, 65, 0.4);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    justify-content: flex-start;
}

.drawer-content {
    width: 85%;
    max-width: 400px;
    height: 100%;
    background: white;
    box-shadow: 20px 0 50px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    animation: drawer-slide 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes drawer-slide {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.drawer-header {
    padding: 60px 25px 30px;
    background: var(--wa-dark-green);
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.drawer-avatar {
    width: 60px;
    height: 60px;
    background: var(--wa-green);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(57,181,74,0.3);
}

.drawer-user-info h3 { margin: 0; font-size: 18px; font-weight: 700; }
.drawer-user-info .badge { 
    display: inline-block; 
    margin-top: 5px; 
    font-size: 10px; 
    background: rgba(255,255,255,0.15); 
    padding: 2px 8px; 
    border-radius: 99px; 
    text-transform: uppercase; 
    letter-spacing: 1px;
}

.drawer-nav { padding: 20px 0; flex-grow: 1; }
.drawer-nav ul { list-style: none; padding: 0; margin: 0; }

.drawer-menu li a, .drawer-item, .drawer-nav ul li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    text-decoration: none;
    color: #444;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
}

.drawer-menu li a:active, .drawer-item:active, .drawer-nav ul li a:active {
    background: #f1faf3;
    color: var(--wa-green);
}

.drawer-divider { height: 1px; background: #eee; margin: 15px 25px; }
.logout-link { color: #e53935 !important; }

.drawer-footer {
    padding: 25px;
    border-top: 1px solid #f0f0f0;
    font-size: 11px;
    color: #999;
}

@media screen and (min-width: 501px) {
    .drawer-overlay {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }
}
