/* ==========================================================================
   Digital Products Store — Design System
   Modern, colorful, professional theme layered on top of Bootstrap 5.
   Every view already uses standard Bootstrap classes (.card, .btn, .badge,
   .table, .form-control, etc.) so this file transforms the whole app
   without needing to touch individual CRUD screens.
   ========================================================================== */

:root {
    --brand-primary: #6366f1;
    --brand-primary-dark: #4338ca;
    --brand-primary-light: #818cf8;
    --brand-accent: #ec4899;
    --brand-teal: #06b6d4;
    --brand-success: #10b981;
    --brand-warning: #f59e0b;
    --brand-danger: #ef4444;

    --ink-900: #0f172a;
    --ink-700: #334155;
    --ink-500: #64748b;
    --ink-300: #cbd5e1;
    --ink-100: #f1f5f9;

    --surface: #ffffff;
    --surface-muted: #f8fafc;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12), 0 4px 8px rgba(15, 23, 42, 0.06);

    --gradient-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-brand-soft: linear-gradient(135deg, #eef2ff 0%, #fdf2f8 100%);
    --gradient-dark: linear-gradient(180deg, #1e1b4b 0%, #312e81 55%, #4c1d95 100%);
    --gradient-teal: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
}

* { box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--surface-muted);
    color: var(--ink-900);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.01em; color: var(--ink-900); }

a { color: var(--brand-primary); text-decoration: none; }
a:hover { color: var(--brand-primary-dark); }

/* ---- Buttons ---------------------------------------------------------- */

.btn { border-radius: var(--radius-sm); font-weight: 600; padding: 0.5rem 1.15rem; transition: all .18s ease; border-width: 1.5px; }
.btn-sm { border-radius: 8px; padding: 0.3rem 0.75rem; }

.btn-primary {
    background: var(--gradient-brand);
    border: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover, .btn-primary:focus {
    filter: brightness(1.08);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline-primary { color: var(--brand-primary); border-color: var(--brand-primary); }
.btn-outline-primary:hover { background: var(--brand-primary); border-color: var(--brand-primary); transform: translateY(-1px); }

.btn-outline-secondary { border-color: var(--ink-300); color: var(--ink-700); }
.btn-outline-secondary:hover { background: var(--ink-700); border-color: var(--ink-700); transform: translateY(-1px); }

.btn-success { background: var(--brand-success); border-color: var(--brand-success); }
.btn-outline-success { color: var(--brand-success); border-color: var(--brand-success); }
.btn-outline-success:hover { background: var(--brand-success); border-color: var(--brand-success); }

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

.btn-warning { background: var(--brand-warning); border-color: var(--brand-warning); color: #fff; }
.btn-outline-warning { color: #b45309; border-color: var(--brand-warning); }

/* ---- Cards -------------------------------------------------------------- */

.card {
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
    background: var(--surface);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    font-weight: 700;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
    padding: 0.9rem 1.25rem;
}
.card-body { padding: 1.25rem; }

/* Stat cards (dashboards) — add .stat-card + .stat-card-{color} */
.stat-card { border: none; color: #fff; overflow: hidden; position: relative; }
.stat-card .card-body { position: relative; z-index: 1; }
.stat-card::after {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(circle at 100% 0%, rgba(255,255,255,0.18), transparent 55%);
}
.stat-card-indigo { background: linear-gradient(135deg, #6366f1, #4338ca); }
.stat-card-teal { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.stat-card-pink { background: linear-gradient(135deg, #ec4899, #db2777); }
.stat-card-amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-card-emerald { background: linear-gradient(135deg, #10b981, #059669); }
.stat-card-slate { background: linear-gradient(135deg, #475569, #1e293b); }
.stat-card .stat-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; font-weight: 700; }
.stat-card .stat-value { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.stat-card .stat-icon { font-size: 1.75rem; opacity: 0.9; }

/* ---- Badges --------------------------------------------------------- */

.badge { font-weight: 600; padding: 0.4em 0.75em; border-radius: 999px; letter-spacing: 0.01em; }
.badge.bg-success { background: var(--brand-success) !important; }
.badge.bg-warning { background: var(--brand-warning) !important; color: #fff !important; }
.badge.bg-danger { background: var(--brand-danger) !important; }
.badge.bg-secondary { background: var(--ink-500) !important; }
.badge.bg-primary { background: var(--brand-primary) !important; }

/* ---- Tables --------------------------------------------------------- */

.table { --bs-table-hover-bg: #f5f3ff; }
.table thead th {
    background: var(--surface-muted);
    border-bottom: 2px solid rgba(15,23,42,0.08);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--ink-500);
    font-weight: 700;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}
.table td { vertical-align: middle; }

/* ---- Forms ------------------------------------------------------------ */

.form-control, .form-select {
    border-radius: var(--radius-sm);
    border-color: var(--ink-300);
    padding: 0.55rem 0.85rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand-primary-light);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.18);
}
.form-label { font-weight: 600; font-size: 0.88rem; color: var(--ink-700); }

/* ---- Alerts ------------------------------------------------------------ */

.alert { border: none; border-radius: var(--radius-sm); font-weight: 500; }
.alert-success { background: #ecfdf5; color: #065f46; }
.alert-danger { background: #fef2f2; color: #991b1b; }
.alert-info { background: #eff6ff; color: #1e40af; }
.alert-secondary { background: var(--ink-100); color: var(--ink-700); }

/* ---- Nav pills / tabs --------------------------------------------------- */

.nav-pills .nav-link.active { background: var(--gradient-brand); }
.nav-tabs .nav-link { border: none; color: var(--ink-500); font-weight: 600; border-bottom: 2px solid transparent; }
.nav-tabs .nav-link.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); background: none; }

/* ---- Pagination --------------------------------------------------------- */
.page-link { color: var(--brand-primary); border-radius: 8px; margin: 0 2px; border-color: transparent; }
.page-item.active .page-link { background: var(--gradient-brand); border: none; }

/* ==========================================================================
   Admin Portal
   ========================================================================== */

.admin-shell { min-height: 100vh; }

.admin-sidebar {
    width: 268px;
    flex-shrink: 0;
    background: var(--gradient-dark);
    color: #e0e7ff;
    padding: 1.5rem 1.1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.admin-sidebar .brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    font-size: 1.05rem;
    color: #fff;
    padding: 0.4rem 0.6rem 1.4rem;
}
.admin-sidebar .brand .brand-icon {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    font-size: 1.05rem;
}
.admin-sidebar .nav-section-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #a5b4fc;
    font-weight: 700;
    padding: 0.9rem 0.7rem 0.3rem;
}
.admin-sidebar .nav-link {
    color: #c7d2fe;
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    font-size: 0.89rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 2px;
    transition: all .15s ease;
}
.admin-sidebar .nav-link i { font-size: 1.02rem; width: 18px; text-align: center; }
.admin-sidebar .nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-sidebar .nav-link.active { background: rgba(255,255,255,0.16); color: #fff; box-shadow: inset 3px 0 0 var(--brand-accent); }
.admin-sidebar .logout-btn {
    color: #fecaca;
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.06);
}
.admin-sidebar .logout-btn:hover { background: rgba(239,68,68,0.25); border-color: rgba(239,68,68,0.4); color: #fff; }

.admin-content { flex-grow: 1; padding: 1.75rem; background: var(--surface-muted); min-height: 100vh; }
.admin-content h3 { margin-bottom: 1.25rem; }

/* ==========================================================================
   Customer Portal
   ========================================================================== */

.customer-navbar {
    background: var(--gradient-brand) !important;
    box-shadow: var(--shadow-md);
}
.customer-navbar .navbar-brand { font-weight: 800; letter-spacing: -0.01em; }
.customer-navbar .nav-link { font-weight: 600; color: rgba(255,255,255,0.88) !important; }
.customer-navbar .nav-link:hover { color: #fff !important; }
.customer-navbar .btn-outline-light { border-width: 1.5px; font-weight: 600; }

/* ==========================================================================
   Public Site
   ========================================================================== */

.public-navbar {
    background: rgba(255,255,255,0.9) !important;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(15,23,42,0.06);
}
.public-navbar .navbar-brand {
    font-weight: 800;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Category mega menu (public + customer navbars) ----------------------- */

.mega-menu-nav { align-items: stretch; }

.mega-dropdown { position: relative; }

.mega-trigger { display: flex; align-items: stretch; }
.mega-trigger .nav-link { padding-right: 0.3rem; }
.mega-caret {
    background: none;
    border: none;
    padding: 0 0.6rem;
    display: flex;
    align-items: center;
    color: inherit;
    opacity: 0.75;
    cursor: pointer;
    font-size: 0.72rem;
    transition: transform .18s ease, opacity .18s ease;
}
.mega-caret:hover { opacity: 1; }
.mega-caret[aria-expanded="true"] { transform: rotate(180deg); opacity: 1; }

/* Panel sits flush against the bottom of the nav item (no gap) so a mouse
   moving from the link straight down onto the panel never crosses dead
   space; open/close is class-toggled (not display:none) so it can fade
   in/out smoothly and JS controls timing (see the partial's <script>). */
.mega-panel {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;

    background: var(--surface);
    border: 1px solid rgba(15,23,42,0.08);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 1.1rem 1.25rem 0.4rem;
    width: max-content;
    max-width: min(720px, 92vw);
}
.mega-panel.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity .16s ease, transform .16s ease;
}
.mega-panel-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.5rem 1.75rem;
}
.mega-col { padding-bottom: 0.75rem; }
.mega-col-title {
    display: block;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--ink-900, #0f172a);
    margin-bottom: 0.4rem;
    text-decoration: none;
}
.mega-col-title:hover { color: var(--brand-primary); }
.mega-col-list { list-style: none; padding: 0; margin: 0; }
.mega-col-list li { margin-bottom: 0.3rem; }
.mega-col-list a {
    font-size: 0.82rem;
    color: var(--ink-500);
    text-decoration: none;
}
.mega-col-list a:hover { color: var(--brand-primary); }
.mega-panel-footer {
    border-top: 1px solid rgba(15,23,42,0.06);
    margin-top: 0.25rem;
    padding: 0.65rem 0;
}
.mega-panel-footer a {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brand-primary);
    text-decoration: none;
}

.customer-navbar .mega-panel { color: var(--ink-700); }
.customer-navbar .mega-caret { color: rgba(255,255,255,0.88); }

@media (max-width: 991.98px) {
    .mega-panel {
        position: static;
        display: none;
        width: 100%;
        max-width: none;
        box-shadow: none;
        border: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        transition: none;
        border-left: 2px solid rgba(15,23,42,0.08);
        margin: 0.35rem 0 0.5rem 0.75rem;
        padding: 0.5rem 0 0.5rem 0.75rem;
    }
    .mega-panel.show { display: block; }
    .mega-panel-inner { grid-template-columns: 1fr; }
}

.hero-section {
    background: var(--gradient-brand);
    border-radius: var(--radius-lg);
    color: #fff;
    padding: 4rem 2.5rem;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(circle at 85% 20%, rgba(255,255,255,0.25), transparent 45%);
}
.hero-section h1 { color: #fff; position: relative; z-index: 1; }
.hero-section p { color: rgba(255,255,255,0.9); position: relative; z-index: 1; font-size: 1.1rem; }
.hero-section .btn-light { font-weight: 700; box-shadow: var(--shadow-md); position: relative; z-index: 1; }

.product-card { height: 100%; overflow: hidden; }
.product-card img { transition: transform .3s ease; }
.product-card:hover img { transform: scale(1.04); }
.product-card .price-badge { font-weight: 800; }

.site-footer {
    background: var(--gradient-dark);
    color: #c7d2fe;
}
.site-footer a { color: #e0e7ff; }

/* ---- Auth pages ---------------------------------------------------------- */

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-brand);
    padding: 2rem 1rem;
}
.auth-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}
.auth-card .auth-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: var(--gradient-brand);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.5rem;
    margin: 0 auto 1rem;
}

/* ---- Misc ---------------------------------------------------------------- */

.text-gradient {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-300); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-500); }

/* ==========================================================================
   Storefront search — navbar bar + hero search
   ========================================================================== */

.nav-search-form { flex: 1 1 360px; max-width: 420px; }
.nav-search-form .input-group {
    background: var(--ink-100);
    border-radius: 999px;
    padding: 3px;
    border: 1.5px solid transparent;
    transition: border-color .18s ease, background .18s ease;
}
.nav-search-form .input-group:focus-within {
    background: var(--surface);
    border-color: var(--brand-primary-light);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.14);
}
.nav-search-form .form-control {
    border: none;
    background: transparent;
    border-radius: 999px;
    padding: 0.4rem 0.25rem 0.4rem 1rem;
    font-size: 0.92rem;
    box-shadow: none !important;
}
.nav-search-form .btn-search {
    border: none;
    border-radius: 999px;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: var(--gradient-brand);
    color: #fff;
    flex-shrink: 0;
}
.nav-search-form .btn-search:hover { filter: brightness(1.08); }

/* ---- Hero photo slider (homepage) ----------------------------------------- */

.hero-slider { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-slide {
    height: 420px;
    background-size: cover;
    background-position: center;
    background-color: var(--ink-900);
    position: relative;
}
.hero-slide-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(15,23,42,0.82) 0%, rgba(15,23,42,0.55) 45%, rgba(15,23,42,0.15) 100%);
    display: flex;
    align-items: center;
}
.hero-slide-content { max-width: 560px; padding: 0 3rem; color: #fff; }
.hero-slide-content h2 { color: #fff; font-size: 2rem; margin-bottom: 0.6rem; }
.hero-slide-content p { color: rgba(255,255,255,0.85); margin-bottom: 1.25rem; }
.hero-slider .carousel-control-prev, .hero-slider .carousel-control-next { width: 5%; }
.hero-slider .carousel-control-prev-icon, .hero-slider .carousel-control-next-icon {
    background-color: rgba(255,255,255,0.18);
    border-radius: 50%;
    padding: 1.35rem;
    background-size: 50%;
}
.hero-slider .carousel-indicators [data-bs-target] {
    width: 9px; height: 9px; border-radius: 50%;
    background-color: rgba(255,255,255,0.55);
    border: none;
}
.hero-slider .carousel-indicators .active { background-color: #fff; }
@media (max-width: 767.98px) {
    .hero-slide { height: 320px; }
    .hero-slide-content { padding: 0 1.5rem; max-width: 100%; }
    .hero-slide-content h2 { font-size: 1.4rem; }
}

/* ---- Product gallery slider (product detail pages) ------------------------ */

.product-gallery .carousel-item img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    background: var(--surface-muted);
}
.product-gallery { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid rgba(15,23,42,0.06); }
.product-gallery .carousel-control-prev, .product-gallery .carousel-control-next { width: 12%; }
.product-gallery .carousel-control-prev-icon, .product-gallery .carousel-control-next-icon {
    background-color: rgba(15,23,42,0.35);
    border-radius: 50%;
    padding: 1.1rem;
    background-size: 45%;
}
.product-gallery-thumbs { display: flex; gap: 0.5rem; margin-top: 0.6rem; flex-wrap: wrap; }
.product-gallery-thumbs img {
    width: 62px; height: 50px; object-fit: cover; border-radius: 8px;
    cursor: pointer; border: 2px solid transparent; opacity: 0.7; transition: all .15s ease;
}
.product-gallery-thumbs img:hover, .product-gallery-thumbs img.active { opacity: 1; border-color: var(--brand-primary); }

.hero-search {
    max-width: 560px;
    margin: 1.75rem auto 0;
    position: relative;
    z-index: 1;
}
.hero-search .input-group {
    background: rgba(255,255,255,0.98);
    border-radius: 999px;
    padding: 5px;
    box-shadow: var(--shadow-lg);
}
.hero-search .form-control {
    border: none;
    border-radius: 999px;
    padding: 0.7rem 0.5rem 0.7rem 1.25rem;
    font-size: 1rem;
    box-shadow: none !important;
}
.hero-search .btn {
    border-radius: 999px;
    padding: 0.65rem 1.5rem;
    font-weight: 700;
    background: var(--ink-900);
    border: none;
    color: #fff;
}
.hero-search .btn:hover { background: #000; }

.hero-stats { position: relative; z-index: 1; display: flex; gap: 2.5rem; justify-content: center; margin-top: 2.25rem; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-size: 1.5rem; font-weight: 800; color: #fff; }
.hero-stats .stat span { font-size: 0.78rem; color: rgba(255,255,255,0.75); text-transform: uppercase; letter-spacing: 0.07em; }

/* ---- Category pills ------------------------------------------------------ */

.category-scroller { display: flex; gap: 0.6rem; overflow-x: auto; padding-bottom: 0.35rem; }
.category-scroller::-webkit-scrollbar { height: 6px; }
.category-pill {
    flex: 0 0 auto;
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1.5px solid rgba(15,23,42,0.08);
    font-weight: 600; font-size: 0.85rem;
    color: var(--ink-700);
    white-space: nowrap;
    transition: all .15s ease;
}
.category-pill i { color: var(--brand-primary); }
.category-pill:hover, .category-pill.active {
    background: var(--gradient-brand);
    border-color: transparent;
    color: #fff;
    transform: translateY(-1px);
}
.category-pill:hover i, .category-pill.active i { color: #fff; }

/* ---- Section headings ----------------------------------------------------- */

.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.1rem; }
.section-heading h4 { margin: 0; }
.section-heading .see-all { font-size: 0.85rem; font-weight: 700; }
.section-heading .see-all i { font-size: 0.75rem; }

/* ---- Filter panel (guest + customer search) ------------------------------- */

.filter-panel { position: sticky; top: 84px; }
.filter-panel .card-body { padding: 1.4rem; }
.filter-panel h6 {
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--ink-500); font-weight: 700; margin-bottom: 0.75rem;
}
.filter-group + .filter-group { margin-top: 1.35rem; padding-top: 1.1rem; border-top: 1px solid rgba(15,23,42,0.06); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.filter-chip {
    display: inline-flex; align-items: center;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1.5px solid var(--ink-300);
    background: var(--surface);
    color: var(--ink-700);
    font-size: 0.82rem; font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}
.filter-chip:hover { border-color: var(--brand-primary-light); color: var(--brand-primary); }
.filter-chip.active { background: var(--gradient-brand); border-color: transparent; color: #fff; }
.filter-chip input { display: none; }

.cat-tree { display: flex; flex-direction: column; gap: 0.3rem; }
.cat-tree-chip {
    display: flex; align-items: center;
    border-radius: 8px;
    justify-content: flex-start;
    width: 100%;
}
.cat-tree-depth-1 { margin-left: 0.9rem; font-weight: 500; font-size: 0.79rem; }
.cat-tree-depth-2 { margin-left: 1.8rem; font-weight: 500; font-size: 0.77rem; }

.search-toolbar {
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(15,23,42,0.06);
    padding: 1rem 1.25rem;
}
.results-count { font-size: 0.88rem; color: var(--ink-500); font-weight: 600; }
.results-count b { color: var(--ink-900); }

/* ---- Product card (storefront) -------------------------------------------- */

.storefront-card { height: 100%; overflow: hidden; border-radius: var(--radius-md); }
.storefront-card .thumb-wrap { position: relative; overflow: hidden; background: var(--surface-muted); }
.storefront-card .thumb-wrap img { width: 100%; height: 175px; object-fit: cover; transition: transform .35s ease; }
.storefront-card:hover .thumb-wrap img { transform: scale(1.06); }
.storefront-card .price-tag {
    position: absolute; top: 0.65rem; left: 0.65rem;
    font-size: 0.72rem; font-weight: 800; padding: 0.32rem 0.7rem;
    border-radius: 999px; color: #fff; box-shadow: var(--shadow-sm);
}
.storefront-card .price-tag.is-free { background: var(--brand-success); }
.storefront-card .price-tag.is-paid { background: var(--gradient-brand); }
.storefront-card .wish-btn {
    position: absolute; top: 0.6rem; right: 0.6rem;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.92);
    display: flex; align-items: center; justify-content: center;
    border: none; color: var(--ink-500);
    box-shadow: var(--shadow-sm);
    transition: all .15s ease;
}
.storefront-card .wish-btn:hover { color: var(--brand-accent); transform: scale(1.08); }
.storefront-card .wish-btn.is-active { color: var(--brand-accent); }
.storefront-card .card-body { padding: 1rem 1.1rem 1.1rem; }
.storefront-card .card-title { font-size: 0.96rem; font-weight: 700; margin-bottom: 0.2rem; }
.storefront-card .card-cat { font-size: 0.72rem; color: var(--brand-primary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.storefront-card .rating-line { font-size: 0.76rem; color: var(--ink-500); }
.storefront-card .rating-line .bi-star-fill { color: var(--brand-warning); }

/* ---- Empty states ---------------------------------------------------------- */

.empty-state { text-align: center; padding: 3.5rem 1.5rem; }
.empty-state .empty-icon {
    width: 68px; height: 68px; margin: 0 auto 1.1rem;
    border-radius: 50%; background: var(--gradient-brand-soft);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem; color: var(--brand-primary);
}
.empty-state h6 { margin-bottom: 0.35rem; }
.empty-state p { color: var(--ink-500); font-size: 0.9rem; margin-bottom: 1rem; }

/* ==========================================================================
   Customer portal — refreshed panel
   ========================================================================== */

.customer-navbar .nav-link.active-link { color: #fff !important; position: relative; }
.customer-navbar .nav-link.active-link::after {
    content: ""; position: absolute; left: 0.75rem; right: 0.75rem; bottom: -2px;
    height: 2px; background: #fff; border-radius: 2px;
}
.customer-navbar .cart-badge {
    position: absolute; top: -6px; right: -6px;
    background: var(--brand-accent); color: #fff;
    font-size: 0.65rem; font-weight: 800;
    border-radius: 999px; min-width: 17px; height: 17px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
}
.cart-btn-wrap { position: relative; }

.account-hero {
    background: var(--gradient-brand);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.75rem;
}
.account-hero::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 90% 15%, rgba(255,255,255,0.22), transparent 50%);
}
.account-hero * { position: relative; z-index: 1; }
.account-hero h3 { color: #fff; margin-bottom: 0.2rem; }
.account-hero p { color: rgba(255,255,255,0.85); margin: 0; font-size: 0.92rem; }

.metric-card { border: none; border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.metric-card .card-body { display: flex; align-items: center; gap: 0.9rem; padding: 1.15rem 1.25rem; }
.metric-card .metric-icon {
    width: 46px; height: 46px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: #fff; flex-shrink: 0;
}
.metric-card .metric-label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-500); font-weight: 700; }
.metric-card .metric-value { font-size: 1.45rem; font-weight: 800; color: var(--ink-900); line-height: 1.15; }

.timeline-list { list-style: none; margin: 0; padding: 0; }
.timeline-list li {
    display: flex; align-items: center; gap: 0.8rem;
    padding: 0.8rem 0; border-bottom: 1px solid rgba(15,23,42,0.06);
}
.timeline-list li:last-child { border-bottom: none; }
.timeline-list .t-icon {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    background: var(--gradient-brand-soft); color: var(--brand-primary);
    display: flex; align-items: center; justify-content: center;
}
