/* =============================================================================
   DNA SOFTECH SHOP â€” PREMIUM REDESIGN v2.0
   Design System: Clean Â· Minimal Â· Futuristic Â· Human
   Inspired by: Linear, Vercel, Apple Product Pages
   ============================================================================= */

/* â”€â”€â”€ Universal Utility â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hidden {
    display: none !important;
}

/* â”€â”€â”€ Design Tokens â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
:root {
    /* Brand â€” refined single-blue accent (clean, professional) */
    --indigo: #2563eb; /* blue-600  (primary action) */
    --indigo-light: #60a5fa; /* blue-400  (hover tint) */
    --indigo-deep: #1d4ed8; /* blue-700  (active / pressed) */
    --cyan: #0ea5e9; /* sky-500   (kept name; used as subtle accent) */
    --cyan-light: #7dd3fc;
    /* Semantic */
    --primary-color: var(--indigo);
    --primary-light: var(--indigo-light);
    --secondary-color: var(--cyan);
    --accent-color: var(--indigo-deep);
    --danger-color: #dc2626;
    --danger-bg: #fef2f2;
    --success-color: #16a34a;
    --success-bg: #f0fdf4;
    --warning-color: #d97706;
    --dark-navy: #0f172a;
    /* Surfaces */
    --white: #ffffff;
    --bg-light: #f8fafc;
    --bg-page: #f8fafc;
    --surface-1: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #f1f5f9;
    /* Text */
    --text-main: #334155;
    --text-heading: #0f172a;
    --text-sub: #64748b;
    --muted: #94a3b8;
    /* Borders */
    --border-color: #e5e7eb;
    --border-focus: var(--indigo);
    --border-hover: #bfdbfe;
    /* Shadows â€” softer, more refined */
    --shadow-xs: 0 1px 2px rgba(15,23,42,.04);
    --shadow-sm: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
    --shadow-md: 0 4px 10px rgba(15,23,42,.06), 0 2px 4px rgba(15,23,42,.04);
    --shadow-lg: 0 10px 24px rgba(15,23,42,.07), 0 4px 8px rgba(15,23,42,.04);
    --shadow-xl: 0 20px 40px rgba(15,23,42,.08), 0 8px 16px rgba(15,23,42,.05);
    --shadow-card-hover: 0 12px 28px rgba(37,99,235,.10), 0 4px 10px rgba(15,23,42,.06);
    --shadow-btn: 0 2px 8px rgba(37,99,235,.20);
    --shadow-btn-hover: 0 4px 14px rgba(37,99,235,.30);
    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    --radius-full: 9999px;
    /* Transitions */
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
    --t-fast: 0.15s var(--ease);
    --t-base: 0.25s var(--ease);
    --t-slow: 0.4s var(--ease);
}

/* â”€â”€â”€ Reset & Base â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--text-heading);
    line-height: 1.3;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* â”€â”€â”€ Layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.container-fluid {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =============================================================================
   HEADER
   ============================================================================= */
.header {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(15,23,42,.06);
}

.header-top {
    padding: 14px 0;
}

    .header-top .container-fluid {
        display: flex;
        align-items: center;
        gap: 24px;
    }

/* â”€â”€ Logo â”€â”€ */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    text-decoration: none;
}

.brand-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.brand-name {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.4px;
}

/* â”€â”€ Search â”€â”€ */
.search-section {
    flex: 1;
    max-width: 560px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--surface-2);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 3px 3px 3px 18px;
    transition: border-color var(--t-base), box-shadow var(--t-base);
}

    .search-bar:focus-within {
        background: var(--white);
        border-color: var(--border-focus);
        box-shadow: 0 0 0 3px rgba(79,70,229,.12);
    }

    .search-bar input {
        flex: 1;
        border: none;
        background: transparent;
        padding: 9px 0;
        font-size: 14px;
        color: var(--text-heading);
        outline: none;
    }

        .search-bar input::placeholder {
            color: var(--muted);
        }

.search-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--indigo);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: opacity var(--t-fast), transform var(--t-fast);
    flex-shrink: 0;
}

    .search-btn:hover {
        opacity: .88;
        transform: scale(1.05);
    }

/* â”€â”€ Header Actions â”€â”€ */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

/* â”€â”€ Base header button â”€â”€ */
.header-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    height: 38px;
    background: var(--white);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    text-decoration: none;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
    position: relative;
    white-space: nowrap;
    box-shadow: var(--shadow-xs);
}

    .header-btn:hover {
        border-color: var(--indigo-light);
        color: var(--indigo);
        background: #eff6ff;
        box-shadow: 0 2px 8px rgba(37,99,235,.10);
        transform: translateY(-1px);
    }

    .header-btn:active {
        transform: translateY(0);
        box-shadow: var(--shadow-xs);
    }

/* â”€â”€ Icon wrapper inside button â”€â”€ */
.header-icon-wrap {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.header-btn-label {
    font-size: 13px;
    letter-spacing: 0.01em;
}

/* â”€â”€ Badge (count pill) â”€â”€ */
.badge {
    background: var(--indigo);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
    line-height: 1.5;
    box-shadow: 0 1px 4px rgba(79,70,229,.3);
}

/* â”€â”€ Orders button â”€â”€ */
#myOrdersLink.header-btn {
    border-color: #d1fae5;
    background: #f0fdf4;
    color: #065f46;
}

    #myOrdersLink.header-btn:hover {
        border-color: #6ee7b7;
        background: #d1fae5;
        color: #065f46;
        box-shadow: 0 2px 8px rgba(16,185,129,.15);
    }

    #myOrdersLink.header-btn .header-icon-wrap {
        color: #10b981;
    }

/* â”€â”€ Admin button â”€â”€ */
.header-btn--admin {
    border-color: rgba(79,70,229,.3);
    background: linear-gradient(135deg, rgba(79,70,229,.08) 0%, rgba(6,182,212,.06) 100%);
    color: var(--indigo);
}

    .header-btn--admin:hover {
        border-color: var(--indigo);
        background: linear-gradient(135deg, rgba(79,70,229,.14) 0%, rgba(6,182,212,.10) 100%);
        color: var(--indigo-deep);
        box-shadow: 0 2px 10px rgba(79,70,229,.20);
    }

    .header-btn--admin .header-icon-wrap {
        color: var(--indigo);
    }

/* â”€â”€ Wishlist button â”€â”€ */
#wishlistBtn.header-btn {
    border-color: #fce7f3;
    background: #fff0f8;
    color: #9d174d;
}

    #wishlistBtn.header-btn:hover {
        border-color: #f9a8d4;
        background: #fce7f3;
        color: #9d174d;
        box-shadow: 0 2px 8px rgba(236,72,153,.15);
    }

    #wishlistBtn.header-btn .header-icon-wrap {
        color: #ec4899;
    }

    #wishlistBtn.header-btn .badge {
        background: #ec4899;
        box-shadow: 0 1px 4px rgba(236,72,153,.3);
    }

/* â”€â”€ Cart button â”€â”€ */
#cartToggle.header-btn {
    background: var(--indigo);
    border-color: var(--indigo);
    color: #fff;
    box-shadow: 0 2px 8px rgba(79,70,229,.30);
}

    #cartToggle.header-btn:hover {
        background: var(--indigo-deep);
        border-color: var(--indigo-deep);
        color: #fff;
        box-shadow: 0 4px 14px rgba(79,70,229,.45);
    }

    #cartToggle.header-btn .header-icon-wrap {
        color: #fff;
    }

    #cartToggle.header-btn .badge {
        background: #fff;
        color: var(--indigo);
        box-shadow: none;
    }

/* â”€â”€ Admin role badge â”€â”€ */
.badge--admin {
    background: var(--indigo-deep);
    font-size: 9px;
    box-shadow: 0 1px 4px rgba(29,78,216,.3);
}

/* â”€â”€ User / profile button â”€â”€ */
.header-btn--user {
    padding: 0 14px 0 6px;
    gap: 8px;
    border-color: var(--border-color);
    background: var(--white);
}

    .header-btn--user:hover {
        border-color: var(--indigo-light);
        background: #eff6ff;
        color: var(--indigo);
    }

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--indigo);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--t-fast), box-shadow var(--t-fast);
    box-shadow: 0 2px 6px rgba(37,99,235,.25);
    flex-shrink: 0;
}

.header-btn--user:hover .user-avatar {
    transform: scale(1.08);
    box-shadow: 0 3px 10px rgba(79,70,229,.35);
}

/* â”€â”€ Category Nav â”€â”€ */
.category-nav {
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 10px 0;
}

    .category-nav .container-fluid {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

        .category-nav .container-fluid::-webkit-scrollbar {
            display: none;
        }

.cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    height: 36px; /* fixed height so all pills are the same */
    background: var(--white);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sub);
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
    box-shadow: var(--shadow-xs);
}

    .cat-btn i {
        font-size: 12px;
        flex-shrink: 0;
    }

    .cat-btn:hover {
        border-color: var(--indigo-light);
        color: var(--indigo);
        background: #eff6ff;
    }

    .cat-btn.active {
        background: var(--indigo);
        border-color: var(--indigo);
        color: #fff;
        box-shadow: var(--shadow-btn);
    }

/* =============================================================================
   PROMO STRIP  (replaces hero banner)
   ============================================================================= */
.promo-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px 28px;
    margin: 16px 0 0;
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: wrap;
}

    .promo-strip::-webkit-scrollbar {
        display: none;
    }

.promo-strip-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 20px;
    white-space: nowrap;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-sub);
}

    .promo-strip-item i {
        color: var(--indigo);
        font-size: 13px;
        flex-shrink: 0;
    }

.promo-strip-sep {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    flex-shrink: 0;
}

/* =============================================================================
   SHOP HEADER  (breadcrumb + title)
   ============================================================================= */
.shop-header {
    padding: 18px 0 14px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.shop-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

    .shop-breadcrumb a {
        color: var(--indigo);
        font-weight: 600;
        text-decoration: none;
    }

        .shop-breadcrumb a:hover {
            text-decoration: underline;
        }

    .shop-breadcrumb i {
        font-size: 9px;
    }

.shop-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.3px;
    margin-bottom: 2px;
}

.shop-subtitle {
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 500;
}

/* =============================================================================
   MAIN CONTENT LAYOUT
   ============================================================================= */
.main-content {
    padding: 0 0 64px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 24px;
    background: var(--indigo);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .2px;
    box-shadow: 0 4px 14px rgba(79,70,229,.35);
    transition: all var(--t-base);
    cursor: pointer;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(79,70,229,.50);
    }

    .btn-primary:active {
        transform: translateY(0);
    }

.content-wrapper {
    display: grid;
    grid-template-columns: 268px 1fr;
    gap: 28px;
}

/* =============================================================================
   SIDEBAR / FILTERS
   ============================================================================= */
.sidebar {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 22px;
    height: fit-content;
    position: sticky;
    top: 90px;
    box-shadow: var(--shadow-xs);
}

.filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

    .filter-section h3 {
        font-size: 14px;
        font-weight: 700;
        color: var(--text-heading);
        display: flex;
        align-items: center;
        gap: 7px;
        text-transform: uppercase;
        letter-spacing: .5px;
    }

        .filter-section h3 i {
            color: var(--indigo);
            font-size: 13px;
        }

.clear-filters {
    font-size: 12px;
    font-weight: 600;
    color: var(--indigo);
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    transition: background var(--t-fast);
}

    .clear-filters:hover {
        background: rgba(79,70,229,.06);
    }

/* â”€â”€ Filter Groups â”€â”€ */
.filter-group {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.filter-group-toggle {
    width: 100%;
    padding: 11px 14px;
    background: var(--surface-2);
    border: none;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: .6px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background var(--t-fast);
    border-radius: 0; /* keep flush inside its .filter-group container */
}

    .filter-group-toggle:hover {
        background: var(--surface-3);
    }

    .filter-group-toggle .filter-chevron {
        transition: transform var(--t-base);
        font-size: 11px;
        color: var(--muted);
    }

.filter-group.is-open .filter-group-toggle .filter-chevron {
    transform: rotate(180deg);
}

.filter-group-content {
    padding: 12px 14px;
    background: var(--white);
}

.filter-group:not(.is-open) .filter-group-content {
    display: none;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13.5px;
    color: var(--text-main);
    transition: background var(--t-fast), color var(--t-fast);
    user-select: none;
}

    .filter-option:hover {
        background: var(--surface-2);
        color: var(--indigo);
    }

    .filter-option.active {
        background: rgba(79,70,229,.07);
        color: var(--indigo);
    }

    .filter-option input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: var(--indigo);
        cursor: pointer;
        flex-shrink: 0;
    }

.stars-mini {
    color: var(--warning-color);
    font-size: 12px;
    letter-spacing: 1px;
}

/* â”€â”€ Sort Select â”€â”€ */
.sort-select {
    width: 100%;
    padding: 0 36px 0 14px;
    height: 40px; /* fixed height matches other pill controls */
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full); /* pill shape */
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: var(--text-heading);
    background: var(--white);
    cursor: pointer;
    outline: none;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    box-shadow: var(--shadow-xs);
}

    .sort-select:focus {
        border-color: var(--indigo);
        box-shadow: 0 0 0 3px rgba(37,99,235,.12);
    }

    .sort-select:hover {
        border-color: var(--indigo-light);
    }

/* â”€â”€ Price Range â”€â”€ */
.price-range-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--indigo);
    margin-bottom: 10px;
}

.price-slider {
    width: 100%;
    accent-color: var(--indigo);
    cursor: pointer;
    margin-bottom: 12px;
    height: 4px;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.price-input {
    flex: 1;
    padding: 7px 10px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    outline: none;
    color: var(--text-heading);
    transition: border-color var(--t-fast);
    font-family: 'Inter', sans-serif;
}

    .price-input:focus {
        border-color: var(--indigo);
    }

.price-sep {
    font-size: 16px;
    color: var(--muted);
    flex-shrink: 0;
}

.btn-apply-price {
    width: 100%;
    padding: 9px;
    background: var(--indigo);
    color: #fff;
    border: none;
    border-radius: var(--radius-full); /* pill shape, consistent */
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--t-fast);
    box-shadow: var(--shadow-btn);
    height: 40px;
}

    .btn-apply-price:hover {
        background: var(--indigo-deep);
        box-shadow: var(--shadow-btn-hover);
    }

/* =============================================================================
   PRODUCTS SECTION
   ============================================================================= */
.products-section {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-xs);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    gap: 16px;
    flex-wrap: wrap;
}

    .section-header h2 {
        font-size: 18px;
        font-weight: 700;
        color: var(--text-heading);
    }

.results-meta {
    font-size: 13px;
    color: var(--muted);
    margin-top: 3px;
    font-weight: 500;
}

.view-toggle {
    display: flex;
    gap: 6px;
}

.view-btn {
    width: 38px;
    height: 38px;
    background: var(--surface-2);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-sub);
    font-size: 14px;
    transition: all var(--t-fast);
}

    .view-btn:hover {
        border-color: var(--indigo-light);
        color: var(--indigo);
    }

    .view-btn.active {
        background: var(--indigo);
        color: #fff;
        border-color: var(--indigo);
    }

/* =============================================================================
   PRODUCT GRID
   ============================================================================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* =============================================================================
   PRODUCT CARD â€” The star of the show
   ============================================================================= */
.product-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    transition: transform var(--t-slow), box-shadow var(--t-slow), border-color var(--t-slow);
    will-change: transform;
}

    .product-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-card-hover);
        border-color: rgba(129,140,248,.30);
    }

/* â”€â”€ Image Container â”€â”€ */
.product-image-wrapper {
    position: relative;
    background: var(--surface-2);
    padding: 28px 28px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 210px;
    overflow: hidden;
}

    .product-image-wrapper::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(to bottom, transparent 60%, rgba(79,70,229,.04) 100%);
        pointer-events: none;
        opacity: 0;
        transition: opacity var(--t-base);
    }

.product-card:hover .product-image-wrapper::after {
    opacity: 1;
}

.product-image {
    max-width: 100%;
    max-height: 170px;
    object-fit: contain;
    transition: transform 0.5s var(--ease);
    position: relative;
    z-index: 1;
}

.product-card:hover .product-image {
    transform: scale(1.07) translateY(-4px);
}

/* â”€â”€ Badges â”€â”€ */
.product-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

    .product-badges .badge {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        padding: 4px 10px;
        border-radius: var(--radius-full);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .3px;
        text-transform: uppercase;
        line-height: 1;
        box-shadow: 0 2px 6px rgba(0,0,0,.12);
    }

.discount-badge {
    background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
    color: #fff;
}

.stock-badge {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: #fff;
}

/* â”€â”€ Wishlist Heart â”€â”€ */
.wishlist-icon {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(244,63,94,.15);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--muted);
    font-size: 14px;
    transition: all var(--t-fast);
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

    .wishlist-icon:hover {
        color: var(--danger-color);
        border-color: var(--danger-color);
        background: var(--danger-bg);
        transform: scale(1.12);
    }

    .wishlist-icon.active {
        color: var(--danger-color);
        border-color: var(--danger-color);
        background: var(--danger-bg);
    }

/* â”€â”€ Product Body â”€â”€ */
.product-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.product-category {
    font-size: 11px;
    font-weight: 700;
    color: var(--indigo);
    text-transform: uppercase;
    letter-spacing: .8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-title {
    font-family: 'Poppins', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-heading);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 42px;
    transition: color var(--t-fast);
}

.product-card:hover .product-title {
    color: var(--indigo);
}

/* â”€â”€ Rating â”€â”€ */
.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stars {
    display: flex;
    gap: 1px;
    color: var(--warning-color);
    font-size: 12px;
}

.rating-count {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

.product-rating.no-reviews .rating-count {
    font-style: italic;
    font-size: 11.5px;
}

/* â”€â”€ Price Block â”€â”€ */
.product-price-row {
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-top: auto;
}

.price-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.price-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.product-price {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.5px;
    line-height: 1;
}

.product-mrp {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    align-items: center;
}

.product-original-price {
    text-decoration: line-through;
}

.price-benefits {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.save-percent {
    font-size: 11px;
    font-weight: 800;
    color: var(--success-color);
    background: var(--success-bg);
    border: 1px solid rgba(16,185,129,.20);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    letter-spacing: .2px;
}

.save-amount {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--success-color);
}

.price-note {
    font-size: 10.5px;
    color: var(--muted);
    margin-top: 3px;
}

/* â”€â”€ Trust Signals â”€â”€ */
.trust-signals {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stock-indicator {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .stock-indicator.in {
        color: var(--success-color);
    }

    .stock-indicator.out {
        color: var(--danger-color);
    }

    .stock-indicator i {
        font-size: 7px;
        color: currentColor;
    }

.delivery-text {
    font-size: 11.5px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

    .delivery-text i {
        color: var(--indigo);
        font-size: 11px;
    }

/* â”€â”€ Card Footer (CTA) â”€â”€ */
.product-footer {
    display: flex;
    gap: 8px;
    padding: 0 18px 16px;
    align-items: stretch; /* force all children to the same height */
}

/* â”€â”€ Card Quantity Controls â”€â”€ */
.cart-control {
    flex: 1;
    display: flex;
}

.card-qty-controls {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--indigo-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--white);
    flex: 1;
}

    .card-qty-controls .qty-decr,
    .card-qty-controls .qty-incr {
        width: 34px;
        height: 38px;
        border: none;
        background: rgba(79,70,229,.05);
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
        color: var(--indigo);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background var(--t-fast);
    }

        .card-qty-controls .qty-decr:hover,
        .card-qty-controls .qty-incr:hover {
            background: var(--indigo);
            color: #fff;
        }

    .card-qty-controls .card-qty {
        flex: 1;
        text-align: center;
        font-size: 14px;
        font-weight: 800;
        color: var(--text-heading);
        border-left: 1.5px solid rgba(79,70,229,.20);
        border-right: 1.5px solid rgba(79,70,229,.20);
        line-height: 38px;
    }

/* â”€â”€ Add to Cart Button â”€â”€ */
.btn-add-cart {
    flex: 1;
    height: 44px; /* fixed height â€” same as Buy Now */
    padding: 0 14px;
    background: var(--indigo);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap; /* never wrap text */
    transition: all var(--t-base);
    box-shadow: var(--shadow-btn);
    letter-spacing: .2px;
}

    .btn-add-cart:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-btn-hover);
        background: var(--indigo-deep);
    }

    .btn-add-cart:active {
        transform: scale(0.97);
    }

/* â”€â”€ Buy Now / Quick View â”€â”€ */
.btn-quick-view {
    width: 44px;
    height: 44px; /* match Add to Cart / Buy Now */
    background: var(--surface-2);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-sub);
    font-size: 13px;
    transition: all var(--t-fast);
    flex-shrink: 0;
}

    .btn-quick-view:hover {
        background: var(--dark-navy);
        color: #fff;
        border-color: var(--dark-navy);
        transform: translateY(-2px);
    }

/* Buy Now â€” solid amber, refined */
.btn-buy-now {
    flex: 1 !important; /* override btn-quick-view's width:44px */
    width: auto !important;
    min-width: 0;
    height: 44px;
    background: #f59e0b;
    border: none;
    color: #fff;
    gap: 6px;
    padding: 0 12px;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--t-fast);
}

    .btn-buy-now span {
        display: inline;
    }

    .btn-buy-now:hover {
        background: #d97706;
        box-shadow: 0 2px 8px rgba(217,119,6,.25);
        transform: translateY(-1px);
    }

/* â”€â”€ Out-of-Stock Control â”€â”€ */
.out-of-stock-control {
    flex: 1;
    padding: 10px 12px;
    background: var(--surface-3);
    color: var(--muted);
    border-radius: var(--radius-md);
    font-size: 12.5px;
    font-weight: 700;
    text-align: center;
    border: 1.5px solid var(--border-color);
    letter-spacing: .3px;
    text-transform: uppercase;
}

/* =============================================================================
   NO RESULTS / LOADING
   ============================================================================= */
.no-results {
    text-align: center;
    padding: 80px 24px;
    color: var(--muted);
}

    .no-results.hidden {
        display: none;
    }

    .no-results i {
        font-size: 52px;
        color: #cbd5e1;
        margin-bottom: 18px;
        display: block;
    }

    .no-results h3 {
        font-size: 18px;
        font-weight: 700;
        color: var(--text-heading);
        margin-bottom: 8px;
    }

    .no-results p {
        font-size: 14px;
        color: var(--muted);
        margin-bottom: 22px;
    }

/* â”€â”€ Skeleton Loader â”€â”€ */
.loading-spinner {
    margin: 24px 0;
}

    .loading-spinner.hidden {
        display: none;
    }

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.skeleton-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.skeleton-img {
    height: 200px;
}

.skeleton-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-line {
    height: 13px;
    border-radius: 6px;
}

    .skeleton-line.short {
        width: 55%;
    }

.skeleton-pulse {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: -200% center;
    }
}

/* =============================================================================
   MINI TOAST
   ============================================================================= */
.mini-toast {
    position: fixed;
    right: 24px;
    bottom: 90px;
    background: var(--text-heading);
    color: #fff;
    padding: 12px 22px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 13.5px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(10px) scale(0.97);
    transition: all 0.28s var(--ease-out);
    z-index: 4000;
    pointer-events: none;
}

    .mini-toast.show {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

/* â”€â”€ Full toast â”€â”€ */
.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: var(--white);
    color: var(--text-heading);
    padding: 16px 22px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 13.5px;
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--success-color);
    transform: translateX(400px);
    transition: transform 0.35s var(--ease-out);
    z-index: 3000;
    max-width: 320px;
}

    .toast.show {
        transform: translateX(0);
    }

    .toast.error {
        border-left-color: var(--danger-color);
    }

    .toast.success {
        border-left-color: var(--success-color);
    }

/* =============================================================================
   OVERLAY
   ============================================================================= */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    z-index: 1050;
}

    .overlay.active {
        display: block;
        animation: fadeIn .2s ease;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =============================================================================
   SIDE PANELS (CART + WISHLIST)
   ============================================================================= */
.side-panel,
.cart-panel,
.wishlist-panel {
    position: fixed;
    top: 0;
    right: -460px;
    width: 420px;
    height: 100vh;
    background: var(--white);
    box-shadow: -6px 0 40px rgba(15,23,42,.14);
    transition: right var(--t-slow);
    z-index: 1100;
    display: flex;
    flex-direction: column;
}

    .side-panel.open,
    .cart-panel.open,
    .wishlist-panel.open {
        right: 0;
    }

/* â”€â”€ Panel Header â”€â”€ */
.cart-header {
    padding: 22px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
}

    .cart-header h3 {
        font-size: 16px;
        font-weight: 700;
        color: var(--text-heading);
        display: flex;
        align-items: center;
        gap: 9px;
    }

        .cart-header h3 i {
            color: var(--indigo);
        }

.close-cart {
    width: 36px;
    height: 36px;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    color: var(--muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast);
}

    .close-cart:hover {
        background: var(--danger-color);
        color: #fff;
        border-color: var(--danger-color);
    }

/* â”€â”€ Panel Body â”€â”€ */
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 22px;
    background: var(--surface-2);
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

    .cart-body::-webkit-scrollbar {
        width: 4px;
    }

    .cart-body::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 4px;
    }

/* â”€â”€ Empty State â”€â”€ */
.panel-empty-state {
    text-align: center;
    padding: 60px 20px;
}

    .panel-empty-state > i {
        font-size: 48px;
        color: #dde1ea;
        display: block;
        margin-bottom: 16px;
    }

.panel-empty-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-sub);
    margin-bottom: 6px;
}

.panel-empty-sub {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

/* â”€â”€ Cart Items â”€â”€ */
.cart-items {
    list-style: none;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

    .cart-item:first-child {
        padding-top: 0;
    }

    .cart-item:last-child {
        border-bottom: none;
    }

.cart-item-image {
    width: 68px;
    height: 68px;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border: 1px solid var(--border-color);
    padding: 6px;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

    .cart-item-details h4 {
        font-size: 13.5px;
        font-weight: 600;
        color: var(--text-heading);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 4px;
    }

.cart-item-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--indigo);
    margin-bottom: 10px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-controls {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--surface-2);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-heading);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t-fast);
}

    .qty-btn:hover {
        background: var(--indigo);
        color: #fff;
    }

.qty-value {
    min-width: 34px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-heading);
    border-left: 1.5px solid var(--border-color);
    border-right: 1.5px solid var(--border-color);
    line-height: 30px;
}

.btn-remove {
    width: 30px;
    height: 30px;
    background: var(--danger-bg);
    border: 1px solid rgba(244,63,94,.20);
    border-radius: var(--radius-sm);
    color: var(--danger-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all var(--t-fast);
}

    .btn-remove:hover {
        background: var(--danger-color);
        color: #fff;
        border-color: var(--danger-color);
    }

/* â”€â”€ Cart Footer â”€â”€ */
.cart-footer {
    padding: 18px 22px;
    border-top: 1px solid var(--border-color);
    background: var(--white);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
    color: var(--text-sub);
}

.cart-total-row--main {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-heading);
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
    margin-top: 2px;
}

.btn-checkout-cta {
    width: 100%;
    padding: 14px;
    background: var(--indigo);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--t-base);
    box-shadow: var(--shadow-btn);
    margin-top: 4px;
}

    .btn-checkout-cta:hover {
        transform: translateY(-1px);
        background: var(--indigo-deep);
        box-shadow: var(--shadow-btn-hover);
    }

.btn-continue-shopping {
    width: 100%;
    padding: 11px;
    background: transparent;
    color: var(--text-sub);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast);
}

    .btn-continue-shopping:hover {
        border-color: var(--indigo-light);
        color: var(--indigo);
        background: rgba(79,70,229,.03);
    }

/* =============================================================================
   MODAL SYSTEM
   ============================================================================= */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s var(--ease);
}

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

.modal-content {
    background: var(--white);
    border-radius: var(--radius-2xl);
    box-shadow: 0 32px 64px rgba(15,23,42,.20);
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(24px) scale(0.96);
    transition: transform 0.32s var(--ease-out);
    position: relative;
    z-index: 1;
}

.modal.open .modal-content {
    transform: translateY(0) scale(1);
}

.modal-content--sm {
    width: 100%;
    max-width: 460px;
}

.modal-content--lg {
    width: 100%;
    max-width: 860px;
}

.modal-header {
    padding: 22px 28px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 1;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

    .modal-header h3 {
        font-size: 16px;
        font-weight: 700;
        color: var(--text-heading);
    }

.modal-close {
    width: 36px;
    height: 36px;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all var(--t-fast);
}

    .modal-close:hover {
        background: var(--danger-color);
        color: #fff;
        border-color: var(--danger-color);
    }

.modal-body {
    padding: 24px 28px;
}

/* â”€â”€ Product Modal â”€â”€ */
.modal-body--product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 28px;
}

.modal-product-image-wrap {
    background: linear-gradient(145deg, #f8fafc, #eef2ff);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    min-height: 300px;
    border: 1px solid #e0e7ff;
}

.modal-product-image {
    max-width: 100%;
    max-height: 260px;
    object-fit: contain;
}

.modal-product-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 12px;
    line-height: 1.35;
}

.modal-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.modal-price-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border-radius: var(--radius-md);
    border: 1px solid #e0e7ff;
    margin-bottom: 16px;
}

.modal-desc {
    font-size: 13.5px;
    color: var(--text-main);
    line-height: 1.7;
    margin-bottom: 16px;
    max-height: 160px;
    overflow-y: auto;
}

.modal-features {
    list-style: none;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .modal-features li {
        font-size: 13px;
        color: var(--text-main);
        display: flex;
        align-items: flex-start;
        gap: 8px;
    }

        .modal-features li::before {
            content: 'âœ“';
            color: var(--success-color);
            font-weight: 800;
            flex-shrink: 0;
            margin-top: 1px;
        }

.modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-qty {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.qty-btn-modal {
    width: 36px;
    height: 44px;
    border: none;
    background: var(--surface-2);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-heading);
    transition: background var(--t-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .qty-btn-modal:hover {
        background: var(--indigo);
        color: #fff;
    }

.qty-input-modal {
    width: 52px;
    height: 44px;
    text-align: center;
    border: none;
    border-left: 1.5px solid var(--border-color);
    border-right: 1.5px solid var(--border-color);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-heading);
    outline: none;
}

.btn-wishlist {
    width: 46px;
    height: 46px;
    background: var(--danger-bg);
    border: 1.5px solid rgba(244,63,94,.20);
    border-radius: var(--radius-md);
    color: var(--danger-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    transition: all var(--t-fast);
    flex-shrink: 0;
}

    .btn-wishlist:hover,
    .btn-wishlist.active {
        background: var(--danger-color);
        color: #fff;
        border-color: var(--danger-color);
    }

/* =============================================================================
   AUTH FORMS (in User Modal)
   ============================================================================= */
.auth-tabs {
    display: flex;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 22px;
}

.auth-tab {
    flex: 1;
    padding: 11px 14px;
    background: var(--surface-2);
    border: none;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-sub);
    cursor: pointer;
    transition: all var(--t-fast);
}

    .auth-tab.active {
        background: var(--indigo);
        color: #fff;
    }

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

    .auth-form.hidden {
        display: none;
    }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .form-group label {
        font-size: 12.5px;
        font-weight: 700;
        color: var(--text-sub);
        text-transform: uppercase;
        letter-spacing: .5px;
    }

.input-icon-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 13px;
    pointer-events: none;
}

.input-icon-wrap input {
    width: 100%;
    padding: 11px 14px 11px 38px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-family: 'Inter', sans-serif;
    color: var(--text-heading);
    background: var(--surface-2);
    outline: none;
    transition: all var(--t-fast);
}

    .input-icon-wrap input:focus {
        border-color: var(--indigo);
        background: var(--white);
        box-shadow: 0 0 0 3px rgba(79,70,229,.10);
    }

    .input-icon-wrap input::placeholder {
        color: var(--muted);
    }

.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-family: 'Inter', sans-serif;
    color: var(--text-heading);
    background: var(--surface-2);
    outline: none;
    transition: all var(--t-fast);
}

    .form-control:focus {
        border-color: var(--indigo);
        background: var(--white);
        box-shadow: 0 0 0 3px rgba(79,70,229,.10);
    }

.btn-primary.btn-block {
    width: 100%;
    justify-content: center;
    padding: 13px;
    font-size: 14px;
    border-radius: var(--radius-md);
    margin-top: 4px;
}

/* =============================================================================
   PROFILE (inside User Modal)
   ============================================================================= */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: linear-gradient(135deg, var(--surface-2), #eef2ff);
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
    border: 1px solid #e0e7ff;
}

.profile-avatar-lg {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-full);
    background: var(--indigo);
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37,99,235,.25);
}

.profile-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 2px;
}

.profile-email {
    font-size: 12.5px;
    color: var(--muted);
}

.profile-actions {
    display: flex;
    gap: 10px;
}

.btn-outline-primary {
    flex: 1;
    padding: 10px 14px;
    background: transparent;
    border: 1.5px solid var(--indigo);
    color: var(--indigo);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--t-fast);
}

    .btn-outline-primary:hover {
        background: var(--indigo);
        color: #fff;
    }

.btn-danger-outline {
    flex: 1;
    padding: 10px 14px;
    background: transparent;
    border: 1.5px solid rgba(244,63,94,.30);
    color: var(--danger-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--t-fast);
}

    .btn-danger-outline:hover {
        background: var(--danger-color);
        color: #fff;
        border-color: var(--danger-color);
    }

/* =============================================================================
   LIST VIEW
   ============================================================================= */
.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 14px;
}

    .products-grid.list-view .product-card {
        flex-direction: row;
        min-height: 160px;
        height: auto;
        overflow: visible;
    }

    .products-grid.list-view .product-image-wrapper {
        min-height: unset;
        width: 180px;
        flex-shrink: 0;
        border-radius: var(--radius-xl) 0 0 var(--radius-xl);
        padding: 18px;
    }

    .products-grid.list-view .product-image {
        max-height: 130px;
    }

    /* Grid layout for the product body in list view */
    .products-grid.list-view .product-body {
        flex: 1;
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto 1fr auto;
        column-gap: 20px;
        row-gap: 4px;
        padding: 14px 18px 14px 16px;
        min-width: 0;
    }

    /* Column 1 */
    .products-grid.list-view .product-category {
        grid-column: 1;
        grid-row: 1;
    }

    .products-grid.list-view .product-title {
        grid-column: 1;
        grid-row: 2;
        min-height: unset;
        -webkit-line-clamp: 1;
    }

    .products-grid.list-view .product-rating {
        grid-column: 1;
        grid-row: 3;
        align-self: end;
    }

    /* Column 2 â€” price block */
    .products-grid.list-view .product-price-row {
        grid-column: 2;
        grid-row: 1 / 4;
        align-self: start;
        margin-top: 0;
        min-width: 180px;
        max-width: 220px;
    }

    /* Trust signals hidden in list view to keep things tidy */
    .products-grid.list-view .trust-signals {
        grid-column: 1;
        grid-row: 4;
        flex-direction: row;
        gap: 10px;
        align-items: center;
        padding-top: 6px;
    }

    /* Footer spans both columns, sits at the bottom */
    .products-grid.list-view .product-footer {
        grid-column: 1 / 3;
        grid-row: 5;
        padding: 8px 0 0;
        margin-top: 0;
        width: 100%;
        border-top: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* Cart control compact in list view */
    .products-grid.list-view .cart-control {
        flex: 0 0 auto;
    }

    .products-grid.list-view .card-qty-controls {
        flex: 0 0 auto;
        width: auto;
        min-width: 110px;
    }

        .products-grid.list-view .card-qty-controls .card-qty {
            flex: 0 0 36px;
        }

    .products-grid.list-view .btn-add-cart {
        flex: 0 0 auto;
        width: auto;
        padding: 8px 18px;
        font-size: 12.5px;
        white-space: nowrap;
    }

    .products-grid.list-view .btn-buy-now {
        flex: 0 0 auto !important;
        width: auto !important;
        height: 38px;
        padding: 0 18px;
        font-size: 12.5px;
        white-space: nowrap;
    }

    /* Badges position in list view */
    .products-grid.list-view .product-badges {
        top: 10px;
        right: 10px;
    }



/* =============================================================================
   MOBILE FILTER DRAWER
   ============================================================================= */
.filter-fab {
    display: none;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .50);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 200;
    transition: opacity var(--t-base);
}

    .sidebar-overlay.is-open {
        display: block;
    }

.sidebar-close-btn {
    display: none;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

/* â”€â”€ 1200px: 2 columns â”€â”€ */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skeleton-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* â”€â”€ 1024px: collapse sidebar â”€â”€ */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        margin-bottom: 20px;
    }

    .filter-group {
        display: inline-block;
        width: 48%;
        vertical-align: top;
    }
}

/* â”€â”€ 768px: mobile â”€â”€ */
@media (max-width: 768px) {
    /* Row 1: logo (flex:1) + actions (fixed right) â€” never wrap */
    .header-top .container-fluid {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 10px 14px;
        gap: 0;
        row-gap: 8px;
    }

    .logo {
        flex: 1;
        min-width: 0;
        gap: 8px;
    }

    .brand-logo-img {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        padding: 0;
        background: transparent;
    }

    .brand-name {
        font-size: 15px;
        font-weight: 800;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Search drops to its own full-width row */
    .search-section {
        order: 3;
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
        margin-top: 2px;
    }

    /* Actions stay on same row as logo â€” never wrap */
    .header-actions {
        margin-left: auto;
        gap: 7px;
        flex-wrap: nowrap;
        align-items: center;
        flex-shrink: 0;
        overflow: visible;
    }

    .hero-banner {
        flex-direction: column;
        text-align: center;
        padding: 36px 28px;
    }

    .hero-content {
        max-width: 100%;
    }

        .hero-content h1 {
            font-size: 28px;
        }

        .hero-content p {
            margin-left: auto;
            margin-right: auto;
        }

    .hero-actions {
        align-items: center;
    }

    .hero-visual {
        display: none;
    }

    /* â”€â”€ Category nav: tighter pills â”€â”€ */
    .category-nav {
        padding: 8px 0;
    }

        .category-nav .container-fluid {
            padding: 0 14px;
            gap: 6px;
        }

    .cat-btn {
        height: 32px;
        padding: 0 12px;
        font-size: 12px;
        gap: 5px;
    }

        .cat-btn i {
            font-size: 11px;
        }

    /* â”€â”€ Shop header: compact on mobile â”€â”€ */
    .shop-header {
        padding: 10px 0 8px;
        margin-bottom: 12px;
    }

    .shop-title {
        font-size: 15px;
        font-weight: 800;
    }

    .shop-subtitle {
        font-size: 11.5px;
    }

    /* â”€â”€ Filter FAB â”€â”€ */
    .filter-fab {
        margin-bottom: 10px;
        height: 36px;
        font-size: 12.5px;
        font-weight: 700;
        padding: 0 14px;
        gap: 6px;
    }

        .filter-fab i {
            font-size: 12px;
        }

    /* â”€â”€ Products section: no card/border on mobile â”€â”€ */
    .products-section {
        padding: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    .section-header {
        margin-bottom: 8px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--border-color);
    }

        .section-header h2 {
            font-size: 14px;
            font-weight: 700;
        }

    /* Hide view-toggle on mobile â€” always list view */
    .view-toggle {
        display: none;
    }

    .products-grid,
    .products-grid.list-view {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .skeleton-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

        .skeleton-grid .skeleton-card {
            border-left: none;
            border-right: none;
            border-radius: 0;
        }

    /* View toggle is irrelevant on mobile (always list-style) */
    .view-toggle {
        display: none;
    }

    .product-card,
    .products-grid.list-view .product-card {
        flex-direction: row;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        border-bottom: 1px solid var(--border-color);
        background: var(--white);
        min-height: unset;
        height: auto;
        padding: 14px 4px;
        gap: 12px;
        align-items: stretch;
    }

        .product-card:hover,
        .products-grid.list-view .product-card:hover {
            transform: none;
            box-shadow: none;
            border-color: var(--border-color);
            border-bottom-color: var(--border-color);
        }

        .product-card:first-child {
            padding-top: 4px;
        }

        .product-card:last-child {
            border-bottom: none;
            padding-bottom: 4px;
        }

    /* Image â€” fixed-size square on the left */
    .product-image-wrapper,
    .products-grid.list-view .product-image-wrapper {
        width: 130px;
        min-width: 130px;
        min-height: unset;
        height: 150px;
        padding: 8px;
        border-radius: var(--radius-md);
        background: var(--white);
        border: 1px solid var(--border-color);
        flex-shrink: 0;
        overflow: visible; /* allow badges at edge to render without clipping */
    }

    .product-image,
    .products-grid.list-view .product-image {
        max-height: 100%;
    }

    .product-card:hover .product-image {
        transform: none;
    }

    /* Wishlist heart sits inside image area */
    .wishlist-icon {
        top: 6px;
        left: 6px;
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    /* Badges: anchored to top-right of the image wrapper (always on the image) */
    .product-badges {
        top: 6px;
        right: 6px;
    }

    /* Body â€” title, rating, price, CTA stacked vertically */
    .product-body,
    .products-grid.list-view .product-body {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 0;
    }

    .product-category {
        font-size: 10px;
        letter-spacing: .6px;
    }

    .product-title,
    .products-grid.list-view .product-title {
        font-size: 14px;
        font-weight: 600;
        color: var(--text-heading);
        line-height: 1.35;
        min-height: unset;
        -webkit-line-clamp: 2;
        margin-bottom: 2px;
    }

    .product-rating {
        margin-bottom: 2px;
    }

    /* Price â€” Amazon-style inline, no boxed background */
    .product-price-row,
    .products-grid.list-view .product-price-row {
        background: transparent;
        border: none;
        padding: 0;
        margin: 2px 0 4px;
        min-width: unset;
        max-width: unset;
    }

    .price-line {
        gap: 6px;
        align-items: baseline;
    }

    .product-price {
        font-size: 18px;
    }

    .product-mrp {
        font-size: 12px;
    }

    .save-percent {
        font-size: 10px;
        padding: 1px 6px;
    }

    .save-amount {
        font-size: 11px;
    }

    .price-note {
        font-size: 10px;
    }

    .trust-signals,
    .products-grid.list-view .trust-signals {
        flex-direction: column;
        gap: 2px;
        padding-top: 2px;
    }

    .stock-indicator {
        font-size: 11.5px;
    }

    .delivery-text {
        font-size: 11px;
    }

    /* Footer â€” single full-width yellow/orange-ish CTA like Amazon */
    .product-footer,
    .products-grid.list-view .product-footer {
        padding: 6px 0 0;
        margin-top: 4px;
        border-top: none;
        gap: 8px;
        flex-wrap: wrap;
    }

    .cart-control,
    .products-grid.list-view .cart-control {
        flex: 1 1 100%;
        min-width: 0;
    }

    .btn-add-cart,
    .products-grid.list-view .btn-add-cart {
        flex: 1 1 auto;
        width: 100%;
        padding: 10px 14px;
        font-size: 13px;
        border-radius: var(--radius-full);
    }

    .btn-buy-now,
    .products-grid.list-view .btn-buy-now {
        display: none;
    }

    .btn-quick-view {
        display: none;
    }

    .card-qty-controls,
    .products-grid.list-view .card-qty-controls {
        flex: 1 1 100%;
        width: 100%;
        min-width: unset;
        border-radius: var(--radius-full);
    }

    .out-of-stock-control {
        flex: 1 1 100%;
        padding: 9px 12px;
        font-size: 11.5px;
    }

    .side-panel, .cart-panel, .wishlist-panel {
        width: 100%;
        right: 0;
        top: auto;
        bottom: -100vh;
        height: 92dvh;
    }

    /* â”€â”€ Mobile header: clean app-style icon buttons â”€â”€ */
    .header-btn-label {
        display: none; /* hide labels â€” icons are self-explanatory on mobile */
    }

    .header-actions {
        gap: 8px;
        align-items: center;
        flex-wrap: nowrap;
        margin-left: auto;
        flex-shrink: 0;
    }

    .header-btn {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: row;
        padding: 0;
        width: 42px;
        height: 42px;
        min-width: unset;
        min-height: unset;
        gap: 0;
        border-radius: 12px;
        border: 1.5px solid var(--border-color);
        background: var(--white);
        box-shadow: 0 1px 4px rgba(15,23,42,.06);
        flex-shrink: 0;
        transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    }

        .header-btn:active {
            transform: scale(0.94);
        }

    /* User button: force same 42x42 square, hide all text/labels */
    .header-btn--user {
        width: 42px !important;
        height: 42px !important;
        padding: 0 !important;
        gap: 0;
        overflow: visible;
    }

    /* Admin badge on user button: tiny amber dot -- no text on mobile */
    #adminBadge {
        font-size: 0 !important;
        width: 10px;
        min-width: 10px;
        height: 10px;
        padding: 0;
        top: -4px;
        right: -4px;
        background: #f59e0b;
        border-color: #fff;
        box-shadow: 0 1px 4px rgba(245,158,11,.5);
    }

    /* Icon fills the button â€” no inner background box */
    .header-icon-wrap {
        width: auto;
        height: auto;
        background: transparent !important;
        border-radius: 0;
        font-size: 18px;
        color: var(--text-heading);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    /* Wishlist: heart accent on hover */
    #wishlistBtn.header-btn:hover {
        border-color: #fca5a5;
        background: #fff1f2;
    }

        #wishlistBtn.header-btn:hover .header-icon-wrap {
            color: #ef4444;
        }

    /* Cart: vibrant gradient â€” the primary CTA */
    #cartToggle.header-btn {
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
        border-color: transparent;
        box-shadow: 0 4px 14px rgba(37,99,235,.40);
    }

        #cartToggle.header-btn .header-icon-wrap {
            color: #fff;
            font-size: 18px;
        }

        #cartToggle.header-btn:hover {
            box-shadow: 0 6px 18px rgba(37,99,235,.50);
            background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
        }

    /* Header button badges ONLY: floating pip anchored top-right of button */
    .header-btn .badge {
        position: absolute;
        top: -7px;
        right: -7px;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        font-size: 10px;
        font-weight: 800;
        line-height: 1;
        border: 2px solid #fff;
        border-radius: 9px;
        background: #ef4444;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(239,68,68,.40);
    }

    /* Cart badge: white against blue background */
    #cartToggle .badge {
        background: #fff;
        color: #1d4ed8;
        border-color: transparent;
        box-shadow: 0 2px 6px rgba(0,0,0,.18);
    }

    /* Wishlist badge */
    #wishlistBtn .badge {
        background: #ef4444;
    }

    /* Product card discount / stock badges: NOT absolute — rendered inside .product-badges wrapper */
    .product-badges .badge {
        position: static;
        display: inline-flex;
        align-items: center;
        padding: 3px 8px;
        font-size: 9px;
        font-weight: 800;
        border: none;
        border-radius: var(--radius-full);
        line-height: 1.4;
        box-shadow: 0 2px 6px rgba(0,0,0,.18);
    }

    /* Admin / Orders: subtle teal accent */
    #adminLink.header-btn,
    #myOrdersLink.header-btn {
        border-color: #99f6e4;
        background: #f0fdfa;
    }

        #adminLink.header-btn .header-icon-wrap,
        #myOrdersLink.header-btn .header-icon-wrap {
            color: #0d9488;
        }

    .modal-body--product {
        grid-template-columns: 1fr;
    }

    .filter-group {
        display: block;
        width: 100%;
    }

    /* Mobile filter FAB */
    .filter-fab {
        display: inline-flex;
        align-items: center;
        gap: .45rem;
        padding: 9px 18px;
        background: var(--white);
        border: 1.5px solid var(--border-color);
        border-radius: var(--radius-full);
        font-size: 13px;
        font-weight: 700;
        color: var(--text-heading);
        cursor: pointer;
        font-family: inherit;
        box-shadow: var(--shadow-sm);
        transition: all var(--t-fast);
        margin-bottom: 14px;
    }

        .filter-fab:hover {
            border-color: var(--indigo-light);
            color: var(--indigo);
        }

        .filter-fab i {
            color: var(--indigo);
            font-size: 13px;
        }

    /* Sidebar becomes a fixed drawer */
    .sidebar {
        position: fixed !important;
        top: 0;
        left: -320px;
        width: 288px;
        height: 100vh;
        z-index: 250;
        border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transition: left var(--t-base);
        box-shadow: var(--shadow-xl);
        margin: 0;
        padding-top: 12px;
    }

        .sidebar.is-open {
            left: 0;
        }

    .sidebar-close-btn {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 4px 12px;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 8px;
    }

        .sidebar-close-btn span {
            font-size: 13px;
            font-weight: 700;
            color: var(--text-heading);
            display: flex;
            align-items: center;
            gap: 6px;
        }

            .sidebar-close-btn span i {
                color: var(--indigo);
            }

        .sidebar-close-btn button {
            background: none;
            border: none;
            font-size: 1rem;
            color: var(--text-sub);
            cursor: pointer;
            padding: 4px 8px;
            border-radius: var(--radius-sm);
            transition: background var(--t-fast);
        }

            .sidebar-close-btn button:hover {
                background: var(--surface-3);
            }

    /* Prevent body scroll when drawer is open */
    body.filter-open {
        overflow: hidden;
    }

    /* iOS input zoom prevention */
    .search-bar input,
    .price-input,
    .sort-select {
        font-size: 16px;
    }

    .modal input, .modal select, .modal textarea {
        font-size: 16px !important;
    }
}

/* â”€â”€ 480px: single column â”€â”€ */
@media (max-width: 480px) {
    .container-fluid {
        padding: 0 12px;
    }

    /* Keep horizontal Amazon/Flipkart-style cards on the smallest screens too,
       just slightly more compact. */
    .product-card,
    .products-grid.list-view .product-card {
        gap: 10px;
        padding: 12px 2px;
    }

    .product-image-wrapper,
    .products-grid.list-view .product-image-wrapper {
        width: 110px;
        min-width: 110px;
        height: 130px;
        padding: 6px;
    }

    .product-title,
    .products-grid.list-view .product-title {
        font-size: 13.5px;
    }

    .product-price {
        font-size: 17px;
    }

    .btn-add-cart,
    .products-grid.list-view .btn-add-cart {
        padding: 9px 12px;
        font-size: 12.5px;
    }

    .hero-stat-row {
        flex-wrap: wrap;
        gap: 14px;
    }

    .modal-content--lg,
    .modal-content--sm {
        margin: 0;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        max-height: 96vh;
    }

    .modal {
        align-items: flex-end;
        padding: 0;
    }

    .brand-name {
        font-size: 15px;
    }

    /* Compact header buttons at very small screens */
    .header-btn {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .header-icon-wrap {
        font-size: 16px;
    }

    /* Promo strip wraps gracefully */
    .promo-strip {
        padding: 10px 14px;
        gap: 6px;
    }

    .promo-strip-item {
        padding: 4px 10px;
        font-size: 12px;
    }

    .promo-strip-sep {
        display: none;
    }

    /* Cart / wishlist panels */
    .cart-footer {
        padding: 16px;
    }

    .btn-checkout-cta {
        font-size: 14px;
        padding: 14px;
    }

    /* User modal â€” keep Logout/Edit Profile buttons above the fold */
    .modal-body {
        padding: 16px;
    }

    .modal-header {
        padding: 16px 16px 14px;
    }

    .profile-hero {
        padding: 12px 14px;
        margin-bottom: 12px;
        gap: 12px;
    }

    .profile-avatar-lg {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .profile-name {
        font-size: 14px;
    }

    .profile-email {
        font-size: 11.5px;
    }

    .profile-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

        .profile-actions .btn-outline-primary,
        .profile-actions .btn-danger-outline {
            flex: 1 1 120px;
            font-size: 12.5px;
            padding: 9px 10px;
        }

    .auth-tabs {
        gap: 4px;
    }

    .auth-tab {
        font-size: 13px;
        padding: 8px 14px;
    }
}

/* =============================================================================
   MOBILE POLISH — comprehensive pass for clean, professional mobile experience
   ============================================================================= */

/* ── Cart / Wishlist panels: full-height slide-in from bottom on mobile ── */
@media (max-width: 768px) {
    /* Panels slide up from bottom instead of sliding from right */
    .side-panel,
    .cart-panel,
    .wishlist-panel {
        top: auto;
        bottom: -100vh;
        right: 0;
        width: 100%;
        height: 92dvh;
        max-height: 92dvh;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 40px rgba(15,23,42,.18);
        transition: bottom 0.3s cubic-bezier(0.4,0,0.2,1);
    }

        .side-panel.open,
        .cart-panel.open,
        .wishlist-panel.open {
            bottom: 0;
            right: 0;
        }

    /* Drag handle indicator */
    .cart-header::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: var(--border-color);
        border-radius: 2px;
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
    }

    .cart-header {
        position: relative;
        padding: 24px 18px 16px;
    }

        .cart-header h3 {
            font-size: 15px;
        }

    .cart-body {
        padding: 14px 16px;
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .cart-item-details h4 {
        font-size: 13px;
        white-space: normal;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .qty-btn {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .qty-value {
        min-width: 36px;
        font-size: 14px;
        line-height: 34px;
    }

    .btn-remove {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .cart-footer {
        padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
        gap: 8px;
    }

    .btn-checkout-cta {
        padding: 15px;
        font-size: 15px;
        font-weight: 800;
        border-radius: var(--radius-full);
        letter-spacing: .2px;
    }

    .btn-continue-shopping {
        padding: 12px;
        font-size: 13px;
        border-radius: var(--radius-full);
    }

    /* ── Modals: bottom sheet on mobile ── */
    .modal {
        align-items: flex-end;
        padding: 0;
    }

    .modal-content,
    .modal-content--lg,
    .modal-content--sm {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 20px 20px 0 0;
        max-height: 94dvh;
        overflow-y: auto;
    }

    .modal-header {
        padding: 20px 18px 14px;
        position: relative;
    }

        /* drag handle on modal */
        .modal-header::before {
            content: '';
            display: block;
            width: 40px;
            height: 4px;
            background: var(--border-color);
            border-radius: 2px;
            position: absolute;
            top: 10px;
            left: 50%;
            transform: translateX(-50%);
        }

    .modal-body--product {
        grid-template-columns: 1fr;
        padding: 14px 18px;
    }

    .modal-product-image-wrap {
        max-height: 220px;
    }

    .modal-product-image {
        max-height: 200px;
    }

    /* ── No results: compact on mobile ── */
    .no-results {
        padding: 40px 16px;
    }

        .no-results i {
            font-size: 36px;
        }

        .no-results h3 {
            font-size: 16px;
        }

        .no-results p {
            font-size: 13px;
        }

    /* ── Toast: bottom-center, above safe area ── */
    .toast {
        bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(80px);
        min-width: 240px;
        max-width: calc(100vw - 32px);
        text-align: center;
        font-size: 13.5px;
        padding: 12px 18px;
        border-radius: var(--radius-full);
        box-shadow: 0 4px 20px rgba(15,23,42,.18);
    }

        .toast.show {
            transform: translateX(-50%) translateY(0);
        }

    /* ── Overall page padding ── */
    .main-content {
        padding-bottom: 32px;
    }

    .container-fluid {
        padding: 0 14px;
    }

    /* ── Overlay: allow tap to dismiss panels ── */
    .overlay {
        z-index: 1050;
    }

    /* ── User modal profile section ── */
    .profile-hero {
        flex-direction: row;
        align-items: center;
        gap: 14px;
        padding: 14px;
    }

    .profile-avatar-lg {
        width: 48px;
        height: 48px;
        font-size: 20px;
        flex-shrink: 0;
    }
}

/* ── 480px: final tightening ── */
@media (max-width: 480px) {
    /* Panels: nearly full height */
    .side-panel,
    .cart-panel,
    .wishlist-panel {
        height: 96dvh;
        max-height: 96dvh;
    }

    .cart-footer {
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .cart-header {
        padding: 22px 14px 12px;
    }

    .cart-body {
        padding: 10px 12px;
    }

    .cart-item-image {
        width: 52px;
        height: 52px;
    }

    .btn-checkout-cta {
        font-size: 14px;
        padding: 14px;
    }

    /* Toast */
    .toast {
        font-size: 13px;
        padding: 11px 16px;
    }
}
