/* ===========================================================
   kamart — design system
   A B2B wholesale marketplace: dense, scannable, trade-oriented.
   Primary palette: Vibrant Radiant Orange & Crisp Sunlight Gold.
   Crisp, modern, high-contrast, energetic trade experience.
   =========================================================== */

/* Fonts are self-hosted (see static/vendor/fonts/) rather than pulled from
   Google's CDN — avoids an external dependency that's blocked in some
   regions, which matters for a marketplace with global suppliers/buyers. */

:root {
    /* Ink & neutrals — crisp modern slate */
    --ink: #0f172a;
    --brand-ink: #1e293b;
    --brand-ink-light: #334155;
    --ink-soft: #334155;
    --muted: #64748b;
    --border: #e2e8f0;
    --border-subtle: #f8fafc;
    --surface: #ffffff;
    --bg: #f8fafc;
    --bg-muted: #f1f5f9;

    /* Bright vibrant primary brand palette */
    --orange: #ff6000;
    --orange-bright: #ff781f;
    --orange-dark: #e64a00;
    --orange-deep: #cc3d00;
    --orange-light: #fff3e8;
    --orange-subtle: #fff9f5;
    --orange-glow: rgba(255, 96, 0, 0.35);

    /* Mappings for components using sky/blue variables to stay bright */
    --sky: #ff6000;
    --sky-light: #fff3e8;
    --sky-subtle: #fff9f5;
    --sky-dark: #e64a00;
    --sky-deep: #cc3d00;
    --sky-glow: rgba(255, 96, 0, 0.35);

    --blue-primary: #ff6000;
    --blue-hover: #e64a00;
    --blue-dark: #cc3d00;
    --price-blue: #ff4500;
    --price-orange: #ff4500;

    --green: #10b981;
    --green-bg: #ecfdf5;
    --gold: #f59e0b;
    --gold-bg: #fffbeb;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-elevated: 0 12px 32px rgba(15, 23, 42, 0.08);

    /* Backward compatibility mappings for any template references */
    --rust: #d9480f;
    --km-orange: #ff6000;
    --km-red: #ff4500;
    --km-dark: var(--brand-ink);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

.km-page {
    width: 100%;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 8px;
    padding-right: 8px;
}
@media (min-width: 768px) {
    .km-page {
        padding-left: 12px;
        padding-right: 12px;
    }
}
.km-main {
    padding-top: 12px;
    padding-bottom: 24px;
}

body {
    background-color: var(--bg);
    color: var(--ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6, .km-logo {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    letter-spacing: -0.015em;
    font-weight: 700;
    color: var(--ink);
}
/* Headings on dark surfaces (footer, hero, mega-menu bar) need to stay light —
   the rule above sets a direct color so it wins over inherited text-light. */
footer h1, footer h2, footer h3, footer h4, footer h5, footer h6,
.km-hero h1, .km-hero h2 {
    color: #fff;
}

a { color: var(--sky-dark); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--sky-deep); }

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, .km-variant-swatch:focus-visible {
    outline: 2px solid var(--sky);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

.km-choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.km-choice-grid-2 { grid-template-columns: 1fr 1fr; }
@media (min-width: 768px) {
    .km-choice-grid-2 { grid-template-columns: 1fr 1fr; }
}
.km-choice-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding: 14px;
    cursor: pointer;
    margin: 0;
    transition: all 0.2s ease;
}
.km-choice-card:hover {
    border-color: var(--sky);
    transform: translateY(-1px);
}
.km-choice-card:has(input:checked) {
    border-color: var(--sky);
    background: var(--sky-subtle);
    box-shadow: 0 0 0 1px var(--sky);
}
.km-choice-card input { margin-top: 4px; flex: 0 0 auto; accent-color: var(--sky); }
.km-choice-body { display: flex; flex-direction: column; gap: 2px; }
.km-choice-body i { color: var(--sky-dark); font-size: 1.2rem; }
.km-checkout-step { margin-bottom: 1.5rem; }
.km-checkout-step h5 { margin-bottom: 0.35rem; }
.km-nested-choices {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
    padding: 12px;
    margin-top: 8px;
}
.km-nested-choices h6 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 8px;
}

/* ---------- Buttons — real components, not inline styles ---------- */
.btn-km-primary {
    background: linear-gradient(135deg, #ff7a00 0%, #ff5000 100%);
    border: 1px solid #ff5000;
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-sm);
    box-shadow: 0 3px 12px rgba(255, 96, 0, 0.32);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-km-primary:hover, .btn-km-primary:focus {
    background: linear-gradient(135deg, #ff5000 0%, #e64200 100%);
    border-color: #e64200;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(255, 96, 0, 0.45);
}
.btn-km-outline {
    background: transparent;
    border: 1.5px solid var(--orange);
    color: var(--orange-dark);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-km-outline:hover {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 96, 0, 0.25);
}

/* ---------- Top utility bar ---------- */
.km-topbar {
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
    color: #94a3b8;
    font-size: 12.5px;
    letter-spacing: 0.01em;
}
.km-topbar a { color: #cbd5e1; transition: color 0.15s ease; }
.km-topbar a:hover { color: #ff9800; }
.km-topbar .dropdown-toggle { color: #cbd5e1; font-size: 12.5px; }

/* ---------- Main navbar ---------- */
.km-navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.km-logo {
    font-size: 1.6rem;
    letter-spacing: -0.025em;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    color: var(--ink) !important;
    display: inline-flex;
    align-items: center;
}
.km-logo .accent {
    background: linear-gradient(135deg, #ff9100 0%, #ff5e00 50%, #ff3838 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.km-search-form {
    display: flex;
    border: 2px solid #ff6000;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.km-search-form:focus-within {
    border-color: #ff5000;
    box-shadow: 0 0 0 3px rgba(255, 96, 0, 0.22);
}
.km-search-form input {
    border: none;
    padding: 0.55rem 1rem;
    flex: 1;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    background: transparent;
    color: var(--ink);
}
.km-search-form button {
    background: linear-gradient(135deg, #ff7a00 0%, #ff5000 100%);
    color: #fff;
    border: none;
    padding: 0 1.35rem;
    font-weight: 600;
    transition: background 0.2s ease;
}
.km-search-form button:hover { background: linear-gradient(135deg, #ff5000 0%, #e64200 100%); }

.km-icon-link {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    transition: color 0.15s ease, transform 0.15s ease;
}
.km-icon-link i { font-size: 1.25rem; display: block; }
.km-icon-link:hover { color: var(--orange); transform: translateY(-1px); }

/* ---------- "All Categories" flyout (left rail + right sub-panel) ---------- */
.km-allcat-wrapper { position: relative; }
.km-allcat-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: linear-gradient(135deg, #ff7a00 0%, #ff5000 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(255, 90, 0, 0.25);
    transition: all 0.2s ease;
}
.km-allcat-btn:hover { background: linear-gradient(135deg, #ff5000 0%, #e64200 100%); color: #fff; box-shadow: 0 4px 14px rgba(255, 90, 0, 0.4); }
.km-allcat-panel {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 16px 36px rgba(11, 19, 41, 0.14);
    z-index: 1060;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    overflow: hidden;
}
@media (hover: hover) {
    .km-allcat-wrapper:hover .km-allcat-panel { display: flex; }
}
.km-allcat-list {
    width: 240px;
    max-height: 480px;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    background: var(--bg);
}
.km-allcat-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    color: var(--ink-soft);
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}
.km-allcat-list-item.active, .km-allcat-list-item:hover {
    background: var(--sky-subtle);
    color: var(--sky-dark);
    font-weight: 600;
    border-left-color: var(--sky);
}
.km-allcat-subwrap {
    width: 620px;
    max-height: 480px;
    overflow-y: auto;
    position: relative;
    background: var(--surface);
}
.km-allcat-sub {
    display: none;
    padding: 1.25rem;
}
.km-allcat-sub.active { display: block; }
.km-allcat-sub h6 {
    color: var(--sky-dark);
    font-size: 0.95rem;
    font-weight: 700;
    border-bottom: 2px solid var(--border-subtle);
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}
.km-allcat-sub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.45rem 1.25rem;
}
.km-allcat-sub-grid a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.2rem 0;
    transition: color 0.15s ease;
}
.km-allcat-sub-grid a:hover { color: var(--sky-dark); font-weight: 500; }

/* ---------- Secondary quick-links row ---------- */
.km-catbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.km-catbar-inner { position: relative; }
.km-catbar .nav::-webkit-scrollbar { height: 3px; }
.km-catbar .nav::-webkit-scrollbar-track { background: var(--bg-muted); }
.km-catbar .nav::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.15); }
.km-catbar .nav-link {
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.65rem 0.95rem;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.km-catbar .nav-link:hover, .km-catbar .nav-item.show .nav-link {
    background: var(--orange-light);
    color: var(--orange-dark);
    border-radius: var(--radius-sm);
}

/* ---------- Hero Carousel ---------- */
#kmHeroCarousel {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
#kmHeroCarousel .carousel-inner,
#kmHeroCarousel .carousel-item {
    height: 100%;
}
.km-hero {
    position: relative;
    color: #fff;
    border-radius: var(--radius-md);
    padding: 2.25rem 2.5rem 2.75rem 2.5rem;
    min-height: 330px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

/* Subtle micro-grid pattern for technical B2B feel */
.km-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    opacity: 0.55;
    z-index: 0;
}

.km-hero > * {
    position: relative;
    z-index: 1;
}

/* Distinct bright & luminous slide backgrounds */
.km-hero-slide-1 {
    background:
        radial-gradient(ellipse 65% 75% at 85% 20%, rgba(255, 122, 0, 0.45), transparent 70%),
        radial-gradient(circle at 15% 90%, rgba(255, 82, 0, 0.35), transparent 55%),
        linear-gradient(135deg, #c2410c 0%, #ea580c 50%, #f97316 100%);
}
.km-hero-slide-2 {
    background:
        radial-gradient(ellipse 65% 75% at 85% 20%, rgba(14, 165, 233, 0.45), transparent 70%),
        radial-gradient(circle at 15% 85%, rgba(255, 106, 0, 0.35), transparent 55%),
        linear-gradient(135deg, #0369a1 0%, #0284c7 50%, #38bdf8 100%);
}
.km-hero-slide-3 {
    background:
        radial-gradient(ellipse 65% 75% at 85% 20%, rgba(16, 185, 129, 0.45), transparent 70%),
        radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.35), transparent 55%),
        linear-gradient(135deg, #047857 0%, #059669 50%, #10b981 100%);
}
.km-hero-slide-4 {
    background:
        radial-gradient(ellipse 65% 75% at 85% 20%, rgba(168, 85, 247, 0.45), transparent 70%),
        radial-gradient(circle at 15% 85%, rgba(255, 106, 0, 0.35), transparent 55%),
        linear-gradient(135deg, #6d28d9 0%, #7c3aed 50%, #a855f7 100%);
}

/* Backward compatibility classes */
.km-hero-alt {
    background:
        radial-gradient(ellipse 65% 75% at 85% 20%, rgba(14, 165, 233, 0.28), transparent 70%),
        linear-gradient(135deg, #0e1726 0%, #121c32 50%, #1a2744 100%);
}
.km-hero-alt2 {
    background:
        radial-gradient(ellipse 65% 75% at 85% 20%, rgba(16, 185, 129, 0.3), transparent 70%),
        linear-gradient(135deg, #061c15 0%, #0b281f 50%, #12382c 100%);
}

/* Pill badge above title */
.km-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.85rem;
}

/* Hero Typography */
.km-hero h1 {
    color: #fff;
    font-weight: 700;
    font-size: clamp(1.45rem, 2.6vw, 2.15rem);
    line-height: 1.22;
    margin-bottom: 0.65rem;
    letter-spacing: -0.015em;
}
.km-hero p.lead {
    color: #e0f2fe;
    font-size: clamp(0.92rem, 1.2vw, 1.02rem);
    line-height: 1.45;
    margin-bottom: 0.9rem;
    max-width: 54ch;
}

/* Hero Perks / Trust Highlights */
.km-hero-perks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
    margin-bottom: 1.35rem;
}
.km-hero-perk {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.65rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.km-hero-perk i {
    color: var(--sky);
    font-size: 0.85rem;
}

/* Hero Action Buttons */
.km-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}
.km-hero-actions .btn {
    padding: 0.55rem 1.25rem;
    font-size: 0.92rem;
    border-radius: var(--radius-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.km-hero-actions .btn-km-primary {
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.35);
}
.km-hero-actions .btn-km-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
}
.km-hero-actions .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
}
.km-hero-actions .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
    transform: translateY(-2px);
}

/* Glassmorphism Showcase Card in right column */
.km-hero-card {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.35rem;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.km-hero-card:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.45);
}
.km-hero-metric {
    margin-bottom: 0.75rem;
}
.km-hero-metric-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
}
.km-hero-metric-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.2rem;
}
.km-hero-divider {
    border-color: rgba(255, 255, 255, 0.15);
    margin: 0.75rem 0;
}

/* Modern Pill Indicators */
#kmHeroCarousel .carousel-indicators {
    bottom: 0.85rem;
    margin-bottom: 0;
    gap: 0.45rem;
    z-index: 5;
}
#kmHeroCarousel .carousel-indicators button {
    width: 24px;
    height: 5px;
    border-radius: 999px;
    border: none;
    background-color: rgba(255, 255, 255, 0.32);
    opacity: 1;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
    margin: 0;
}
#kmHeroCarousel .carousel-indicators button:hover {
    background-color: rgba(255, 255, 255, 0.7);
}
#kmHeroCarousel .carousel-indicators button.active {
    width: 44px;
    background-color: var(--orange);
    box-shadow: 0 0 12px rgba(255, 96, 0, 0.75);
}

/* Sleek Floating Circular Control Arrows */
#kmHeroCarousel .km-hero-control {
    width: 40px;
    height: 40px;
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    opacity: 0;
    transition: all 0.25s ease;
    z-index: 5;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
#kmHeroCarousel:hover .km-hero-control {
    opacity: 0.85;
}
#kmHeroCarousel .carousel-control-prev {
    left: 0.85rem;
}
#kmHeroCarousel .carousel-control-next {
    right: 0.85rem;
}
#kmHeroCarousel .km-hero-control:hover {
    opacity: 1;
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 16px rgba(255, 96, 0, 0.45);
}

/* Slide Element Entry Animations */
.carousel-item.active .km-hero-tag {
    animation: kmSlideFadeUp 0.4s ease-out 0.05s both;
}
.carousel-item.active .km-hero h1 {
    animation: kmSlideFadeUp 0.45s ease-out 0.12s both;
}
.carousel-item.active .km-hero p.lead {
    animation: kmSlideFadeUp 0.45s ease-out 0.2s both;
}
.carousel-item.active .km-hero-perks {
    animation: kmSlideFadeUp 0.45s ease-out 0.27s both;
}
.carousel-item.active .km-hero-actions {
    animation: kmSlideFadeUp 0.45s ease-out 0.34s both;
}
.carousel-item.active .km-hero-card {
    animation: kmSlideFadeUp 0.5s ease-out 0.2s both;
}
@keyframes kmSlideFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile & Tablet Responsiveness for Hero */
@media (max-width: 991.98px) {
    .km-hero {
        padding: 1.75rem 1.5rem 2.25rem 1.5rem;
        min-height: 290px;
    }
    #kmHeroCarousel .km-hero-control {
        opacity: 0.75;
        width: 34px;
        height: 34px;
    }
}
@media (max-width: 575.98px) {
    .km-hero {
        padding: 1.5rem 1rem 2.25rem 1rem;
        min-height: 270px;
    }
    .km-hero h1 {
        font-size: 1.35rem;
    }
    .km-hero-perks {
        display: none;
    }
    #kmHeroCarousel .carousel-control-prev {
        left: 0.35rem;
    }
    #kmHeroCarousel .carousel-control-next {
        right: 0.35rem;
    }
}

/* ---------- Product cards — flat/bordered, dense grid ---------- */
.km-product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.km-product-card:hover {
    border-color: var(--sky);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.12);
}
.km-product-thumb {
    height: 180px;
    object-fit: cover;
    width: 100%;
    background: var(--bg);
    transition: transform 0.3s ease;
}
.km-product-card:hover .km-product-thumb {
    transform: scale(1.03);
}
.km-badge-verified {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #10b981;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}
.km-price {
    color: var(--price-blue);
    font-weight: 700;
    font-size: 1.05rem;
    font-family: 'Space Grotesk', sans-serif;
}
.km-price small { color: var(--muted); font-weight: 500; font-size: 0.72rem; font-family: 'Inter', sans-serif; }
.km-moq-row {
    color: var(--muted);
    font-size: 0.72rem;
}
.km-supplier-row { font-size: 0.72rem; color: var(--muted); }
.km-supplier-row .bi-patch-check-fill { color: var(--sky-dark); }

/* ---------- Product detail: gallery ---------- */
.km-gallery-wrapper {
    position: relative;
}
.km-thumb-rail {
    width: 68px;
    max-height: 440px;
    overflow-y: auto;
    scrollbar-width: thin;
}
.km-thumb-rail::-webkit-scrollbar {
    width: 3px;
}
.km-thumb-rail::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
.km-thumb {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-muted);
}
.km-thumb:hover {
    border-color: var(--sky);
    transform: scale(1.03);
}
.km-thumb.active {
    border-color: var(--sky);
    border-width: 2px;
    box-shadow: 0 0 8px rgba(14, 165, 233, 0.4);
}
.km-main-image-container {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
.km-main-image {
    width: 100%;
    height: 440px;
    object-fit: contain;
    background: var(--surface);
    display: block;
    transition: opacity 0.2s ease;
}
.km-image-zoom-trigger {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(11, 19, 41, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 3;
}
.km-image-zoom-trigger:hover {
    background: var(--sky);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.45);
}
.km-gallery-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
}

/* ---------- Product detail: buy box ---------- */
.km-buybox {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.35rem 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}
.km-price-bar {
    background: var(--bg-muted);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.15rem;
    border: 1px solid var(--border);
}
.km-tier-pills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
    gap: 0.6rem;
}
.km-tier-pill {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.65rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    user-select: none;
}
.km-tier-pill:hover {
    border-color: var(--sky);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.12);
}
.km-tier-pill.active-tier {
    border-color: var(--sky);
    background: var(--sky-subtle);
    box-shadow: 0 0 0 1px var(--sky), 0 4px 12px rgba(14, 165, 233, 0.2);
}
.km-tier-pill.active-tier .km-tier-pill-qty {
    color: var(--sky-dark);
    font-weight: 700;
}
.km-tier-pill-qty {
    font-size: 0.76rem;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 0.15rem;
}
.km-tier-pill-price {
    font-weight: 700;
    color: var(--price-blue);
    font-size: 1.05rem;
    font-family: 'Space Grotesk', sans-serif;
}

/* Subtotal Panel */
.km-subtotal-panel {
    background: var(--bg-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.15rem;
}
.km-subtotal-price {
    color: var(--price-blue);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

/* Stepper Quantity Control */
.km-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface);
}
.km-qty-control button {
    border: none;
    background: transparent;
    padding: 0.5rem 0.9rem;
    color: var(--ink);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.km-qty-control button:hover {
    background: var(--sky-subtle);
    color: var(--sky-dark);
}
.km-qty-control input {
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: center;
    width: 75px;
    padding: 0.5rem 0.35rem;
    font-weight: 600;
    color: var(--ink);
    background: var(--surface);
    outline: none;
}

/* B2B Assurance Card */
.km-assurance-card {
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
}

.km-spec-mini { width: 100%; font-size: 0.85rem; }
.km-spec-mini th { color: var(--muted); font-weight: 500; text-align: left; padding: 0.3rem 0; width: 42%; }
.km-spec-mini td { padding: 0.3rem 0; }

/* ---------- Product detail: supplier sidebar ---------- */
.km-supplier-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
.km-supplier-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    font-size: 1.35rem;
    color: var(--muted);
    border: 1px solid var(--border);
    background: var(--bg-muted);
}
.km-supplier-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin: 0.85rem 0;
}
.km-supplier-stat-item {
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.55rem;
    text-align: center;
}
.km-supplier-stat-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
    font-family: 'Space Grotesk', sans-serif;
}
.km-supplier-stat-label {
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: 0.1rem;
}

/* Detail Tabs & Tab Panes */
.km-detail-tabs {
    border-bottom: 2px solid var(--border);
}
.km-detail-tabs .nav-link {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--muted);
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 1.25rem;
    margin-bottom: -2px;
    background: transparent;
    transition: all 0.2s ease;
}
.km-detail-tabs .nav-link:hover {
    color: var(--sky-dark);
    border-bottom-color: rgba(14, 165, 233, 0.4);
}
.km-detail-tabs .nav-link.active {
    color: var(--sky-dark);
    border-bottom-color: var(--sky);
    background: transparent;
}
.km-detail-tab-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 1.75rem;
    color: var(--ink);
}
.km-spec-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.km-spec-table th, .km-spec-table td {
    padding: 0.65rem 1.15rem;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
}
.km-spec-table tr:last-child th, .km-spec-table tr:last-child td {
    border-bottom: none;
}
.km-spec-table th {
    background: var(--bg-muted);
    color: var(--muted);
    font-weight: 500;
    width: 35%;
}
.km-spec-table td {
    color: var(--ink);
    background: var(--surface);
}

/* Reviews */
.km-review-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.km-review-item:last-child {
    border-bottom: none;
}
.km-avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.88rem;
}


/* ---------- Homepage: quick-action tiles ---------- */
.km-quick-tile {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.25rem;
    color: var(--ink);
    text-decoration: none;
    flex: 1;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.km-quick-tile:hover {
    border-color: var(--sky);
    color: var(--ink);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.1);
}
.km-quick-tile i {
    font-size: 1.65rem;
    color: var(--sky-dark);
    transition: transform 0.2s ease;
}
.km-quick-tile:hover i {
    transform: scale(1.12);
}

/* ---------- Homepage: category icon grid ("Categories for you") ---------- */
.km-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.75rem;
}
.km-category-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding: 1rem 0.6rem;
    border-radius: var(--radius-md);
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.25;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}
.km-category-tile:hover {
    border-color: var(--sky);
    background: var(--sky-subtle);
    color: var(--sky-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.08);
}
.km-category-tile i { font-size: 1.6rem; color: var(--sky-dark); transition: transform 0.2s ease; }
.km-category-tile:hover i { transform: scale(1.1); }

/* ---------- Homepage: frequently-searched chips ---------- */
.km-search-chip {
    display: inline-block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.35rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ink-soft);
    transition: all 0.2s ease;
}
.km-search-chip:hover {
    border-color: var(--sky);
    color: var(--sky-dark);
    background: var(--sky-subtle);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.12);
}

/* ---------- Homepage: guarantee strip ---------- */
.km-guarantee-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 0.75rem;
    transition: all 0.2s ease;
    height: 100%;
}
.km-guarantee-tile:hover {
    border-color: var(--sky);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.08);
}
.km-guarantee-tile i { font-size: 1.85rem; color: var(--sky-dark); }

/* ---------- Product grids: 5-up on homepage, 4-up on listing/filter pages ---------- */
.km-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}
.km-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
@media (max-width: 1200px) {
    .km-grid-5 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 992px) {
    .km-grid-5, .km-grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .km-grid-5, .km-grid-4 { grid-template-columns: repeat(2, 1fr); }
}


/* ---------- Filter sidebar ---------- */
.km-filter-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    position: sticky;
    top: 8px;
    align-self: start;
    max-height: calc(100vh - 16px);
    overflow-y: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}
.km-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
}
.km-filter-section {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
}
.km-filter-section:last-child { border-bottom: none; }
.km-filter-section h6 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    margin-bottom: 0.6rem;
}
.km-filter-cat-list { list-style: none; padding: 0; margin: 0; }
.km-filter-cat-list li { margin-bottom: 0.1rem; }
.km-filter-cat-list a {
    display: block;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--ink-soft);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.15s ease;
}
.km-filter-cat-list a:hover { background: var(--bg-muted); }
.km-filter-anc a { color: var(--muted); font-size: 0.8rem; }
.km-filter-child a { padding-left: 1.1rem; }
.km-filter-cat-list a.active {
    background: var(--sky-subtle);
    color: var(--sky-dark);
    font-weight: 600;
}
.km-filter-count { color: var(--muted); font-size: 0.78rem; }
.km-filter-scroll-list {
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    padding-right: 2px;
}
.km-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--sky-subtle);
    color: var(--sky-dark);
    border: 1px solid #bae6fd;
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.15s ease;
}
.km-filter-chip:hover { background: var(--sky-light); color: var(--sky-dark); }

.km-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--sky-subtle);
    border: 1px solid #bae6fd;
    color: var(--sky-dark);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
}
.km-trust-badge.gold { background: #fffbe6; color: #7a5b00; border-color: #f0dca0; }

/* ---------- Category pills ---------- */
.km-breadcrumb {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}
.km-breadcrumb a { color: var(--muted); }
.km-breadcrumb a:hover { color: var(--sky-dark); }
.km-bc-sep { margin: 0 0.3rem; color: #c9c9c9; }
.km-cat-heading {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}
.km-cat-heading h1 {
    font-size: 1.35rem;
    margin: 0;
}
.km-related-strip {
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 8px 10px;
    margin-bottom: 12px;
}
.km-related-strip-label {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}
.km-related-cats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.km-related-chip {
    display: inline-block;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink-soft);
    border-radius: 2px;
    padding: 0.2rem 0.65rem;
    font-size: 0.8rem;
    transition: all 0.15s ease;
}
.km-related-chip:hover, .km-related-chip.is-current {
    border-color: var(--sky);
    color: var(--sky-dark);
    background: var(--sky-subtle);
}
.km-cat-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}
@media (min-width: 1400px) {
    .km-cat-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 992px) {
    .km-cat-layout { grid-template-columns: 1fr; }
    .km-filter-panel { position: static; max-height: none; }
}
.km-cat-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
    margin-bottom: 8px;
}
.km-cat-count { font-size: 0.88rem; }
.km-sort-tabs {
    display: flex;
    gap: 2px;
    font-size: 0.85rem;
}
.km-sort-tabs a {
    padding: 0.25rem 0.7rem;
    color: var(--ink-soft);
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
}
.km-sort-tabs a:hover { color: var(--sky-dark); }
.km-sort-tabs a.is-on {
    color: var(--sky-dark);
    font-weight: 600;
    border-bottom-color: var(--sky);
}
.km-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.km-quick-pill {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 0.8rem;
    padding: 0.2rem 0.7rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}
.km-quick-pill.is-on, .km-quick-pill:hover {
    border-color: var(--sky);
    color: var(--sky-dark);
    background: var(--sky-subtle);
}
.km-filter-section summary {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    cursor: pointer;
    list-style: none;
    margin-bottom: 0.45rem;
}
.km-filter-section summary::-webkit-details-marker { display: none; }
.km-price-form { margin-top: 0.15rem; }

.km-category-pill {
    white-space: nowrap;
    border: 1px solid var(--border) !important;
    color: var(--ink-soft) !important;
    background: var(--surface) !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.85rem;
}
.km-category-pill:hover {
    border-color: var(--sky) !important;
    color: var(--sky-dark) !important;
}

/* ---------- Variant swatches ---------- */
.km-variant-swatch {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s ease;
    user-select: none;
}
.km-variant-swatch:hover {
    border-color: var(--sky);
    transform: translateY(-1px);
}
.km-variant-swatch.active {
    border-color: var(--sky);
    background: var(--sky-subtle);
    color: var(--sky-dark);
    font-weight: 600;
    box-shadow: 0 0 0 1px var(--sky);
}

/* ---------- Price tier ladder ---------- */
.km-tier-table th {
    background: var(--bg);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-soft);
}
.km-tier-table td { font-size: 0.85rem; }
.km-tier-table tr:last-child td:last-child { color: var(--price-blue); font-weight: 700; }

/* ---------- Status timeline ---------- */
.km-timeline { list-style: none; padding-left: 0; }
.km-timeline li {
    position: relative;
    padding-left: 28px;
    padding-bottom: 1.2rem;
    border-left: 2px solid var(--border);
    margin-left: 8px;
}
.km-timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.km-timeline li::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--sky);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--sky);
}
.km-timeline li.pending::before { background: var(--muted); box-shadow: 0 0 0 2px var(--muted); }

/* ---------- Status badges ---------- */
.km-status-pending { background: #6c757d; }
.km-status-confirmed { background: var(--sky-dark); }
.km-status-processing { background: #6366f1; }
.km-status-shipped { background: var(--sky); color: #fff; }
.km-status-delivered { background: #10b981; }
.km-status-completed { background: var(--green); }
.km-status-cancelled { background: #ef4444; }
.km-status-refunded { background: #94a3b8; color: #fff; }

/* ---------- Elevated surfaces ---------- */
.km-elevated {
    background: var(--surface);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-elevated);
}

.store-badge { background: var(--gold-bg); color: var(--gold); }

/* ---------- Forms ---------- */
.form-control:focus, .form-select:focus {
    border-color: var(--sky);
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.2);
}

.km-product-name { color: var(--ink); }
.km-product-name:hover { color: var(--sky-dark); }

.km-theme-toggle {
    background: transparent;
    border: none;
    color: #cbd5e1;
    padding: 0 4px;
    line-height: 1;
    font-size: 1rem;
    transition: color 0.15s ease;
}
.km-theme-toggle:hover { color: #38bdf8; }

.km-auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-elevated);
    padding: 2rem 1.75rem;
}

.km-footer {
    background: #0f172a !important;
    border-top: 1px solid #1e293b;
}
.km-footer a {
    color: #94a3b8;
    transition: color 0.15s ease;
}
.km-footer a:hover {
    color: #ff9800 !important;
}

/* ---------- Dark / auto (OS dark) tokens ---------- */
html[data-theme="dark"] {
    --ink: #f1f5f9;
    --brand-ink: #070d1d;
    --brand-ink-light: #0d162e;
    --ink-soft: #cbd5e1;
    --muted: #94a3b8;
    --border: #1e293b;
    --surface: #0f172a;
    --bg: #0b0f19;
    --bg-muted: #131d33;
    --gold-bg: #291e05;
    --sky-subtle: #241608;
    --sky-light: #36200a;
    --shadow-elevated: 0 14px 36px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
    :root {
        --ink: #f1f5f9;
        --brand-ink: #070d1d;
        --brand-ink-light: #0d162e;
        --ink-soft: #cbd5e1;
        --muted: #94a3b8;
        --border: #1e293b;
        --surface: #0f172a;
        --bg: #0b0f19;
        --bg-muted: #131d33;
        --gold-bg: #291e05;
        --sky-subtle: #241608;
        --sky-light: #36200a;
        --shadow-elevated: 0 14px 36px rgba(0, 0, 0, 0.6);
        color-scheme: dark;
    }
}
html[data-theme="light"] {
    --ink: #0f172a;
    --brand-ink: #1e293b;
    --brand-ink-light: #334155;
    --ink-soft: #334155;
    --muted: #64748b;
    --border: #e2e8f0;
    --surface: #ffffff;
    --bg: #f8fafc;
    --bg-muted: #f1f5f9;
    --gold-bg: #fffbeb;
    --shadow-elevated: 0 12px 32px rgba(15, 23, 42, 0.08);
    color-scheme: light;
}

/* Bootstrap utilities that are not theme-aware */
[data-bs-theme="dark"] .text-dark { color: var(--ink) !important; }
[data-bs-theme="dark"] .bg-white { background-color: var(--surface) !important; }
[data-bs-theme="dark"] .btn-outline-dark {
    --bs-btn-color: var(--ink);
    --bs-btn-border-color: var(--border);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--ink);
    --bs-btn-hover-border-color: var(--ink);
    color: var(--ink);
    border-color: var(--border);
}

/* ---------- Seller Hub & Seller Management Area ---------- */
.km-seller-hub {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem 0 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.km-seller-avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 2px solid var(--border);
    background: var(--bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--orange);
    flex-shrink: 0;
}
.km-seller-nav {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-top: 1rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.km-seller-nav::-webkit-scrollbar { display: none; }
.km-seller-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 1rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2.5px solid transparent;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.km-seller-tab:hover {
    color: var(--ink);
    border-bottom-color: var(--border);
}
.km-seller-tab.active {
    color: var(--orange-dark);
    border-bottom-color: var(--orange);
}
.km-seller-tab .badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
}

.km-seller-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.km-seller-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: rgba(255, 96, 0, 0.4);
}
.km-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}
.km-stat-icon.revenue { background: #ecfdf5; color: #10b981; }
.km-stat-icon.orders { background: #fff3e8; color: #ff6000; }
.km-stat-icon.products { background: #e0f2fe; color: #0284c7; }
.km-stat-icon.inquiries { background: #f5f3ff; color: #8b5cf6; }

.km-stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.1;
}

/* Order visual progress pipeline */
.km-pipeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
}
.km-pipeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    position: relative;
    z-index: 2;
    flex: 1;
    text-align: center;
}
.km-pipeline-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--muted);
    transition: all 0.2s ease;
}
.km-pipeline-step.completed .km-pipeline-circle {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}
.km-pipeline-step.active .km-pipeline-circle {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(255, 96, 0, 0.2);
}
.km-pipeline-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
}
.km-pipeline-step.completed .km-pipeline-label,
.km-pipeline-step.active .km-pipeline-label {
    color: var(--ink);
}
.km-pipeline-bar {
    position: absolute;
    top: 28px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--border);
    z-index: 1;
}
.km-pipeline-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, var(--orange));
    transition: width 0.3s ease;
}

.km-stock-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.km-stock-pill.in-stock { background: #ecfdf5; color: #047857; }
.km-stock-pill.low-stock { background: #fffbeb; color: #b45309; }
.km-stock-pill.out-of-stock { background: #fef2f2; color: #b91c1c; }

.km-table-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border);
    background: var(--bg-muted);
}

/* ---------- Filter Autocomplete ---------- */
.km-filter-autocomplete-box {
    margin-top: 0.4rem;
    margin-bottom: 0.5rem;
}
.km-filter-autocomplete-box .input-group-text {
    background: var(--bg-muted);
    border-color: var(--border);
    color: var(--muted);
    padding: 0.25rem 0.5rem;
}
.km-filter-autocomplete-input {
    font-size: 0.8rem;
    background: var(--surface);
    color: var(--ink);
    border-color: var(--border);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}
.km-filter-autocomplete-input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 2px rgba(255, 96, 0, 0.15);
}

/* ---------- Support Chat Area Widget ---------- */
.km-support-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1070;
    font-family: inherit;
}
.km-support-launcher {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    box-shadow: 0 4px 18px rgba(255, 96, 0, 0.35);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}
.km-support-launcher:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 24px rgba(255, 96, 0, 0.45);
    color: #fff;
}
.km-support-launcher-icon {
    font-size: 1.15rem;
}
.km-support-unread-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border: 2px solid #fff;
    border-radius: 50%;
}
.km-support-chat-box {
    position: fixed;
    bottom: 84px;
    right: 24px;
    width: 360px;
    max-width: calc(100vw - 32px);
    height: 500px;
    max-height: calc(100vh - 120px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1075;
    animation: kmChatSlideIn 0.25s ease-out;
}
@keyframes kmChatSlideIn {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.km-support-chat-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.km-support-avatar {
    width: 34px;
    height: 34px;
    background: var(--orange);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.km-support-online-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 9px;
    height: 9px;
    background: #10b981;
    border: 2px solid #0f172a;
    border-radius: 50%;
}
.km-support-status-text {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.65);
}
.km-support-chat-actions .btn-link {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}
.km-support-chat-actions .btn-link:hover {
    color: #fff;
}
.km-support-chat-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--bg);
}
.km-support-msg {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    max-width: 90%;
}
.km-support-msg-bot {
    align-self: flex-start;
}
.km-support-msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.km-support-msg-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.km-support-msg-content {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 12px;
    border-top-left-radius: 4px;
    padding: 0.6rem 0.85rem;
    font-size: 0.84rem;
    line-height: 1.4;
    word-break: break-word;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.km-support-msg-user .km-support-msg-content {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange);
    border-top-left-radius: 12px;
    border-top-right-radius: 4px;
}
.km-support-msg-user .km-support-msg-content a {
    color: #fff;
    text-decoration: underline;
}
.km-support-msg-bot .km-support-msg-content a {
    color: var(--orange);
    font-weight: 600;
}
.km-support-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.25rem;
}
.km-support-chip {
    background: var(--surface);
    color: var(--ink-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}
.km-support-chip:hover {
    background: var(--bg-muted);
    border-color: var(--orange);
    color: var(--orange);
}
.km-support-chat-footer {
    padding: 0.75rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
}
.km-support-input {
    border-radius: 20px;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    background: var(--bg);
    color: var(--ink);
    border-color: var(--border);
}
.km-support-input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 2px rgba(255, 96, 0, 0.15);
}
.km-support-send-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--orange);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: transform 0.1s ease;
}
.km-support-send-btn:hover {
    background: var(--orange-dark);
    color: #fff;
    transform: scale(1.05);
}

@media print {
    .km-navbar, .km-catbar, .km-topbar, footer, .km-seller-nav, .km-support-widget, .no-print { display: none !important; }
}
