:root {
    --primary-color: #F39200; /* Branded Orange - Absolut EL */
    --primary-hover: #fa9d14;
    --primary-pressed: #dc8300;
    --secondary-color: #475569; /* Slate 600 */
    --dark-bg: #0F172A; /* Slate 900 - Deeper dark */
    --light-bg: #F1F5F9; /* Slate 100 - Slightly cleaner light */
    --white: #ffffff;
    --accent-color: #FFB74D; /* Light Orange */
    --header-border: #E2E8F0;
    --neon-orange: rgba(243, 146, 0, 0.5); /* Stronger glow */
    --card-glow: rgba(71, 85, 105, 0.08);
    --text-main: #334155; /* Slate 700 */
    --text-muted: #64748B; /* Slate 500 */

    /* Surfaces (light) */
    --surface-page: var(--light-bg);
    --surface-card: #ffffff;
    --surface-raised: #f8fafc;
    --surface-input: #f8fafc;
    --surface-overlay: rgba(255, 255, 255, 0.94);
    --surface-glass: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.95));

    /* Radius scale */
    --radius-sm: 0.625rem;
    --radius-md: 0.875rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-pill: 999px;

    /* Scrollbar */
    --scrollbar-track: var(--surface-page);
    --scrollbar-thumb: #cbd5e1;
    --scrollbar-thumb-hover: #94a3b8;

    /* Spacing (8px grid) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-7: 2rem;
    
    --shadow-sm: 0 10px 24px -18px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 18px 38px -24px rgba(15, 23, 42, 0.24), 0 10px 18px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 28px 56px -32px rgba(15, 23, 42, 0.28), 0 14px 28px rgba(15, 23, 42, 0.1);
    --shadow-neon: 0 0 15px var(--neon-orange);

    /* Typography scale */
    --font-size-body: 0.95rem;
    --font-size-caption: 0.78rem;
    --font-size-label: 0.84rem;
    --font-size-h1: clamp(1.9rem, 2.1vw + 1.25rem, 2.75rem);
    --font-size-h2: clamp(1.55rem, 1.3vw + 1.1rem, 2.1rem);
    --font-size-h3: clamp(1.28rem, 0.9vw + 1rem, 1.6rem);
    --font-size-h4: 1.18rem;
    --font-size-h5: 1.02rem;
    --font-size-h6: 0.92rem;
    --mobile-bottom-nav-height: 64px;
    --mobile-floating-gap: 12px;
    --mobile-sticky-cta-height: 112px;
    --mobile-checkout-bar-height: 84px;

    /* B2B Density — smaller base font */
    --bs-body-font-size: 0.9rem;

    /* Bootstrap Overrides */
    --bs-primary: #F39200;
    --bs-primary-rgb: 243, 146, 0;
    --bs-link-color: var(--secondary-color);
    --bs-link-hover-color: var(--primary-color);
    --bs-btn-primary-bg: var(--primary-color);
    --bs-btn-primary-border-color: var(--primary-color);
    --bs-btn-primary-hover-bg: var(--primary-hover);
    --bs-btn-primary-hover-border-color: var(--primary-hover);

    /* ── Dark theme token palette (warm charcoal) ── */
    --dk-body-bg:       #141414; /* near-black, slight warmth */
    --dk-surface-1:     #1d1d1d; /* card / sidebar bg */
    --dk-surface-2:     #252525; /* raised elements */
    --dk-surface-3:     #2e2e2e; /* hover states */
    --dk-border:        #3a3a3a; /* borders */
    --dk-border-muted:  #2a2a2a; /* subtle dividers */
    --dk-text:          #efefef; /* primary text */
    --dk-text-muted:    #adadad; /* secondary text — WCAG-friendly on surfaces */
    --dk-text-faint:    #8c8c8c; /* placeholders */
    --dk-orange-glow:   rgba(243, 146, 0, 0.18);
    --dk-orange-border: rgba(243, 146, 0, 0.35);
}

/* =============================================
   Bootstrap Blue → Orange Override
   Повне перевизначення всіх Bootstrap-компонентів,
   що використовують стандартний синій (#0d6efd).
   ============================================= */

/* --- .btn-primary --- */
.btn-primary {
    --bs-btn-bg: #F39200;
    --bs-btn-border-color: #F39200;
    --bs-btn-hover-bg: #e08700;
    --bs-btn-hover-border-color: #d07e00;
    --bs-btn-active-bg: #d07e00;
    --bs-btn-active-border-color: #c07400;
    --bs-btn-disabled-bg: #F39200;
    --bs-btn-disabled-border-color: #F39200;
    --bs-btn-focus-shadow-rgb: 243, 146, 0;
}

/* --- .btn-outline-primary --- */
.btn-outline-primary {
    --bs-btn-color: #F39200;
    --bs-btn-border-color: #F39200;
    --bs-btn-hover-bg: #F39200;
    --bs-btn-hover-border-color: #F39200;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #e08700;
    --bs-btn-active-border-color: #e08700;
    --bs-btn-active-color: #fff;
    --bs-btn-disabled-color: #F39200;
    --bs-btn-disabled-border-color: #F39200;
    --bs-btn-focus-shadow-rgb: 243, 146, 0;
}

/* --- .text-primary --- */
.text-primary {
    color: #F39200 !important;
}

/* --- .bg-primary --- */
.bg-primary {
    background-color: #F39200 !important;
}

/* --- .border-primary --- */
.border-primary {
    border-color: #F39200 !important;
}

/* --- Links --- */
a {
    color: var(--secondary-color);
    transition: color 0.2s;
}
a:hover {
    color: var(--primary-color);
}

/* --- Pagination --- */
.page-link {
    color: var(--secondary-color);
}
.page-link:hover {
    color: var(--primary-color);
}
.page-item.active .page-link {
    background-color: #F39200;
    border-color: #F39200;
    color: #fff;
}
.page-link:focus {
    box-shadow: 0 0 0 0.25rem rgba(243, 146, 0, 0.25);
}

.touch-target-control {
    min-width: 44px;
    min-height: 44px;
}

/* --- Form focus states --- */
.form-control:focus,
.form-select:focus {
    border-color: #F39200;
    box-shadow: 0 0 0 0.25rem rgba(243, 146, 0, 0.25);
}

/* --- Checkboxes & Radios --- */
.form-check-input:checked {
    background-color: #F39200;
    border-color: #F39200;
}
.form-check-input:focus {
    border-color: #F39200;
    box-shadow: 0 0 0 0.25rem rgba(243, 146, 0, 0.25);
}

/* --- Nav tabs --- */
.nav-tabs .nav-link.active {
    border-bottom-color: #F39200;
    color: #F39200;
}
.nav-tabs .nav-link:hover {
    color: #F39200;
}
.nav-link:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(243, 146, 0, 0.25);
}

/* --- Shadow primary (login) --- */
.shadow-primary {
    box-shadow: 0 4px 15px rgba(243, 146, 0, 0.35) !important;
}

/* --- Focus-visible ring --- */
.btn:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(243, 146, 0, 0.5);
}

/* Skip link — поверх прелоадера при фокусі (разом із .visually-hidden-focusable) */
.skip-link:focus,
.skip-link:focus-visible {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10050;
}

#main-content:focus {
    outline: none;
}
#main-content:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(243, 146, 0, 0.45);
    border-radius: 0.25rem;
}

/* Менеджер: компактний рядок + згортається форма */
.manager-client-panel {
    position: sticky;
    top: 0;
    z-index: 1010;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    background-color: var(--surface-raised) !important;
}

[data-theme="dark"] .manager-client-panel {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
    background-color: var(--surface-raised) !important;
}

.system-state {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-main);
}

.system-state__badge,
.system-pill__label,
.checkout-system-status__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
}

.system-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 30px;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.94);
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 600;
}

.system-state--info,
.system-pill--info {
    border-color: rgba(13, 110, 253, 0.3);
    background: rgba(13, 110, 253, 0.1);
    color: #0b4aa8;
}

.system-state--warning,
.system-pill--warning {
    border-color: rgba(180, 116, 0, 0.32);
    background: rgba(255, 193, 7, 0.16);
    color: #6f4700;
}

.system-state--success,
.system-pill--success {
    border-color: rgba(25, 135, 84, 0.3);
    background: rgba(25, 135, 84, 0.12);
    color: #0f5c38;
}

.system-state--blocker,
.system-pill--blocker {
    border-color: rgba(176, 42, 55, 0.32);
    background: rgba(220, 53, 69, 0.12);
    color: #8f1d2c;
}

.system-state--secondary,
.system-pill--secondary {
    border-color: rgba(100, 116, 139, 0.24);
    background: rgba(148, 163, 184, 0.1);
    color: #475569;
}

.manager-client-panel__summary,
.manager-client-panel__feedback {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

/* Узгоджені порожні стани (кошик / збережені / порівняння) */
.empty-state-card {
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}
.empty-state-card .empty-state-icon {
    font-size: 3.5rem;
    line-height: 1;
    opacity: 0.55;
}

/* Quick view — скелетон завантаження */
.quick-view-skeleton {
    min-height: 220px;
}
.quick-view-skeleton__media {
    height: 180px;
    border-radius: 0.5rem;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.06) 25%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.06) 75%);
    background-size: 200% 100%;
    animation: quick-view-shimmer 1.2s ease-in-out infinite;
}
[data-theme="dark"] .quick-view-skeleton__media {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.06) 75%);
    background-size: 200% 100%;
}
@keyframes quick-view-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
.quick-view-skeleton__line {
    height: 0.85rem;
    border-radius: 0.25rem;
    background: rgba(0, 0, 0, 0.08);
    margin-bottom: 0.6rem;
}
[data-theme="dark"] .quick-view-skeleton__line {
    background: rgba(255, 255, 255, 0.1);
}
.quick-view-skeleton__line--short {
    width: 45%;
}
.quick-view-skeleton__line--medium {
    width: 70%;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }
    #page-loader {
        transition: none;
    }
    .loader-logo {
        animation: none;
        border-top-color: var(--primary-color);
    }
    .fade-out {
        transition: none;
    }
    .quick-view-skeleton__media {
        animation: none;
        background: rgba(0, 0, 0, 0.08);
    }
    [data-theme="dark"] .quick-view-skeleton__media {
        background: rgba(255, 255, 255, 0.08);
    }
}

.product-card-action-btn:focus-visible,
.mobile-filter-btn:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(243, 146, 0, 0.45);
    outline: none;
}

/* --- Dropdown active --- */
.dropdown-item.active,
.dropdown-item:active {
    background-color: #F39200;
}

/* --- Progress bar --- */
.progress-bar {
    background-color: #F39200;
}

/* --- Badge primary --- */
.badge.bg-primary {
    background-color: #F39200 !important;
}

/* --- List group active --- */
.list-group-item.active {
    background-color: #F39200;
    border-color: #F39200;
}

/* Branded Loader */
#page-loader {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}
.loader-logo {
    width: 80px;
    height: 80px;
    border: 4px solid #eee;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: var(--shadow-neon);
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Hide number input spinners */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

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

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--surface-page);
    color: var(--text-main);
    font-size: var(--font-size-body);
    line-height: 1.55;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    font-optical-sizing: auto;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark-bg);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }
h5 { font-size: var(--font-size-h5); }
h6 { font-size: var(--font-size-h6); letter-spacing: -0.02em; }

.small,
small {
    font-size: var(--font-size-caption);
}

@media (max-width: 991.98px) {
    body {
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); /* reserve space for bottom nav and safe area */
    }
}

/* Glassmorphism Utilities */
.glass-card {
    background: var(--surface-glass);
    border: 1px solid var(--header-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}
.glass-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(148, 163, 184, 0.28);
}

.rounded-3 {
    border-radius: var(--radius-md) !important;
}

.rounded-4 {
    border-radius: var(--radius-xl) !important;
}

.card,
.modal-content,
.offcanvas,
.dropdown-menu {
    border-radius: var(--radius-lg);
}

/* Сторінка входу — одна колонка по центру */
.auth-page-outer {
    min-height: calc(100vh - 200px);
}
.auth-page-column {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* Top Header */
.header-top {
    background-color: var(--dark-bg);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.78rem;
    padding: 3px 0;
}
.header-top-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.header-utility,
.header-top-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
.header-utility {
    flex-wrap: wrap;
}
.header-utility-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.72);
}
.header-utility-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    opacity: 0.82;
}
.header-utility-identity {
    color: #fff;
    font-weight: 700;
}
.header-utility-link {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.84);
    text-decoration: none;
    margin-right: 0 !important;
}
.exchange-rate-pill {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(84, 214, 101, 0.18);
    color: #92ffae;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.15;
    box-shadow: inset 0 0 0 1px rgba(146, 255, 174, 0.22);
    white-space: nowrap;
}
.header-top a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-right: 15px;
    transition: color 0.2s;
}
.header-top a:hover {
    color: var(--primary-color);
}

/* Middle Header */
.header-middle {
    background-color: var(--surface-card);
    padding: 8px 0;
    border-bottom: 1px solid var(--header-border);
}
.header-shell {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}
.header-branding {
    flex-shrink: 0;
    min-width: 0;
}
.header-primary-nav {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.header-secondary-nav {
    flex-shrink: 0;
    align-items: center;
    gap: 0.75rem;
}
.header-touch-target {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-block: 0.25rem;
}
.navbar-brand img {
    max-height: 38px;
    transition: max-height 0.3s ease;
}
@media (max-width: 991.98px) {
    .navbar-brand img {
        max-height: 32px;
    }
}
.search-form .form-control {
    border-radius: 5px 0 0 5px;
    border: 2px solid var(--header-border);
    border-right: none;
    padding-left: 14px;
    min-height: 44px;
    background: var(--surface-input);
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.search-form .form-control:focus {
    background: var(--surface-card);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--neon-orange);
    outline: none;
}
.search-form .btn {
    border-radius: 0 5px 5px 0;
    background-color: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: white;
    width: 48px;
    min-width: 48px;
    padding: 0;
    font-weight: 600;
    transition: all 0.3s ease;
}
.search-form .btn i {
    font-size: 1rem;
    line-height: 1;
}
.search-form .btn:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}
.header-search-form {
    position: relative;
}
.header-search-input[type="search"] {
    appearance: none;
    -webkit-appearance: none;
}
.header-search-input::-webkit-search-decoration,
.header-search-input::-webkit-search-cancel-button,
.header-search-input::-webkit-search-results-button,
.header-search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}
.header-search-reset-btn {
    width: 44px !important;
    min-width: 44px !important;
    border-radius: 0 !important;
    border: 2px solid var(--header-border) !important;
    border-left: none !important;
    border-right: none !important;
    background: var(--surface-input) !important;
    color: var(--text-muted) !important;
}
.header-search-reset-btn:hover,
.header-search-reset-btn:focus-visible {
    background: var(--surface-card) !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}
.header-search-reset-btn[hidden] {
    display: none !important;
}
.search-submit-btn {
    flex-shrink: 0;
}
/* Header layout tweaks: center search and evenly space actions */
.header-middle .search-form {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
}
.header-middle-row {
    align-items: center;
}

.header-search-col {
    min-width: 0;
    flex: 1 1 460px;
    display: flex;
    align-items: center;
}

.header-actions {
    gap: 0.75rem; /* slightly tighter than gap-3 */
    display: flex;
    align-items: center;
}
@media (min-width: 992px) {
    .header-shell {
        flex-wrap: nowrap;
    }

    .header-primary-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .header-search-col {
        flex: 1 1 auto;
        align-self: center;
    }

    .header-middle .search-form {
        max-width: none;
        width: 100%;
    }

    .header-secondary-nav {
        margin-left: auto;
    }

    .header-actions {
        flex-shrink: 0;
        flex-wrap: nowrap;
        white-space: nowrap;
    }
}

@media (max-width: 991.98px) {
    .header-top-content {
        gap: 0.5rem;
    }

    .header-top-meta {
        margin-left: auto;
    }

    .exchange-rate-pill {
        justify-content: center;
        font-size: 0.72rem;
        padding-inline: 0.6rem;
    }

    .header-utility {
        gap: 0.5rem;
    }

    .header-shell {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .header-primary-nav {
        flex: 1 1 auto;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.5rem;
        min-width: 0;
    }

    .header-search-col {
        flex-basis: 100%;
        order: 10;
    }

    .header-actions {
        gap: 0.5rem;
    }
    .header-middle .search-form {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 767.98px) {
    .header-top {
        padding: 4px 0;
    }

    .header-top-content {
        flex-wrap: wrap;
        align-items: center;
        gap: 0.4rem;
    }

    .header-utility,
    .header-top-meta {
        min-width: 0;
    }

    .header-utility {
        flex: 1 1 auto;
        flex-wrap: wrap;
        overflow: visible;
    }

    .header-utility-link {
        min-width: 0;
        margin-right: 0 !important;
        flex: 0 1 auto;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .header-top-meta {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .exchange-rate-pill {
        max-width: 100%;
    }

    .header-shell {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.75rem;
    }

    .header-branding {
        display: flex;
        align-items: center;
        min-width: 0;
    }

    .header-touch-target {
        min-width: 0;
        padding-block: 0;
    }

    .brand-logo--header,
    .navbar-brand img {
        max-height: 46px;
        width: auto;
        max-width: 100%;
    }

    .header-primary-nav {
        display: contents;
    }

    .btn-catalog-trigger {
        grid-column: 2;
        justify-self: end;
        align-self: center;
        min-width: clamp(9rem, 34vw, 12rem);
        justify-content: center;
        padding-inline: 1rem !important;
    }

    .header-search-col {
        grid-column: 1 / -1;
        order: initial;
        min-width: 0;
    }
}

.header-actions-quick {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
}
@media (min-width: 992px) {
    .header-actions-quick {
        margin-left: var(--space-2);
        padding-left: var(--space-4);
        border-left: 1px solid var(--header-border);
    }
}

.header-actions a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all 0.2s;
}
.header-actions a:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
}
.header-actions .badge {
    /* Position handled by Bootstrap classes */
    font-size: 0.75rem;
    box-shadow: 0 2px 5px rgba(243, 146, 0, 0.3);
    z-index: 10;
}
.header-cart-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 46px;
    border-radius: 999px;
    padding-inline: 1rem;
    flex-shrink: 0;
}
.header-cart-cta__label {
    white-space: nowrap;
}
.header-cart-cta .header-cart-count,
.header-cart-cta [data-cart-badge="header"] {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    min-width: 22px;
    min-height: 22px;
    padding: 0.2rem 0.42rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 0.68rem;
}
.header-profile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 46px;
    border-radius: 999px;
    padding-inline: 0.75rem 0.95rem;
    border-color: var(--header-border);
    background: var(--surface-raised);
    color: var(--text-main);
}
.header-profile-toggle::after {
    margin-left: 0.15rem;
}
.header-profile-toggle__avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(243, 146, 0, 0.12);
    color: var(--primary-color);
    flex-shrink: 0;
}
.header-profile-toggle__avatar i {
    font-size: 1rem;
    line-height: 1;
}
.header-profile-toggle__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    line-height: 1.1;
}
.header-profile-toggle__label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}
.header-profile-toggle__value {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-main);
}
.header-profile-menu {
    width: min(320px, calc(100vw - 2rem));
    padding: 0.5rem;
    border-radius: 1rem;
    background: var(--surface-card);
    border: 1px solid var(--header-border) !important;
}
.header-profile-menu__section {
    display: grid;
    gap: 0.2rem;
    padding: 0.25rem;
}
.header-profile-menu__section--meta {
    gap: 0.35rem;
}
.header-profile-menu__eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.35rem 0.6rem 0.15rem;
}
.header-profile-menu__action {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 42px;
    border-radius: 0.75rem;
    color: var(--text-main);
    padding: 0.65rem 0.75rem;
}
.header-profile-menu__action i {
    color: var(--text-muted);
}
.header-profile-menu__action:hover,
.header-profile-menu__action:focus-visible {
    background: rgba(243, 146, 0, 0.1);
    color: var(--primary-color);
}
.header-profile-menu__action:hover i,
.header-profile-menu__action:focus-visible i {
    color: var(--primary-color);
}
.header-profile-menu__meta-name {
    padding: 0 0.6rem;
    font-weight: 700;
    color: var(--text-main);
}
.header-profile-menu__meta-link {
    display: inline-flex;
    align-items: center;
    padding: 0 0.6rem;
    color: var(--text-muted);
    text-decoration: none;
}
.header-profile-menu__meta-link:hover {
    color: var(--primary-color);
}
.cart-count-badge {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(243, 146, 0, 0.28);
}
.badge-sm {
    padding: 0.35em 0.65em;
}

/* Bottom Header / Nav */
.header-bottom {
    background-color: var(--surface-card);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    z-index: 1000;
}
.header-bottom.sticky-active {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 5px 0;
    background: rgba(var(--glass-bg-rgb, 255, 255, 255), 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.main-nav .nav-link {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--secondary-color);
    padding: 15px 20px !important;
    transition: color 0.2s;
}
.main-nav .nav-link:hover {
    color: var(--primary-color);
}

.btn-primary {
    background: var(--primary-color) !important;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 0.52rem 1rem;
    box-shadow: 0 12px 22px -18px rgba(243, 146, 0, 0.55), 0 4px 10px rgba(243, 146, 0, 0.16);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn-primary:active {
    transform: translateY(0);
    background: var(--primary-pressed) !important;
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 18px 28px -20px rgba(243, 146, 0, 0.62), 0 8px 14px rgba(243, 146, 0, 0.2);
}

.btn {
    min-height: 42px;
    border-radius: var(--radius-md);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.btn-sm {
    min-height: 36px;
    padding: 0.38rem 0.8rem;
}

.btn-lg {
    min-height: 50px;
    padding: 0.7rem 1.15rem;
    border-radius: var(--radius-lg);
}

.btn-outline-secondary {
    border-color: rgba(148, 163, 184, 0.32);
    background: var(--surface-overlay);
    color: var(--text-main);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus-visible {
    border-color: rgba(243, 146, 0, 0.34);
    background: rgba(243, 146, 0, 0.08);
    color: var(--primary-color);
}

.card-product {
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: var(--radius-lg);
    transition: transform 0.22s cubic-bezier(.25,.8,.25,1), box-shadow 0.22s ease, border-color 0.22s ease;
    overflow: hidden;
    background: var(--surface-glass);
    box-shadow: var(--shadow-sm);
}
.card-product .card-body {
    line-height: 1.55;
    padding: 0.95rem;
}
.card-product:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(243, 146, 0, 0.2);
}
.card-product:hover .product-overlay {
    opacity: 1;
    transform: translateY(0);
}
.card-product:hover img {
    transform: scale(1.05);
}
.product-overlay {
    transition: all 0.3s ease;
    transform: translateY(20px);
}
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Product Card Specifics */
.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--radius-md);
}
.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-image-container:hover .main-img {
    opacity: 0;
    transform: scale(1.05);
}
.product-image-container:hover .hover-img {
    opacity: 1 !important;
    transform: scale(1.05);
}

.product-overlay {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(20px);
    opacity: 0;
}
.card-product:hover .product-overlay {
    opacity: 1;
    transform: translateY(0);
}

.cart-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}
.cart-btn.success {
    background-color: #22c55e !important; /* Green-500 */
    border-color: #22c55e !important;
}
.product-inactive {
    filter: grayscale(1);
    opacity: 0.7;
}
.product-inactive:hover {
    transform: none !important;
}
.hover-translate-y {
    transition: transform 0.3s ease;
}
.hover-translate-y:hover {
    transform: translateY(-5px);
}

.breadcrumb-item a {
    color: #b46700;
    text-decoration: none;
}
.breadcrumb-item.active {
    color: #4f5c68;
    font-weight: 600;
}
/* Dropdown Theme */
[data-theme="dark"] .dropdown-menu {
    background-color: var(--dk-surface-2);
    border-color: var(--dk-border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
[data-theme="dark"] .dropdown-item {
    color: var(--dk-text);
}
[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background-color: var(--dk-orange-glow);
    color: var(--primary-color);
}
[data-theme="dark"] .dropdown-divider {
    border-color: var(--dk-border);
}

/* Footer */
.footer {
    background-color: var(--dark-bg);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 0;
    border-top: 1px solid var(--header-border);
    font-size: 0.78rem;
}
.footer h5 {
    color: var(--white);
    margin-bottom: 2px;
    font-weight: 700;
    font-size: 0.78rem;
}
.footer ul {
    list-style: none;
    padding: 0;
    margin-bottom: 0;
}
.footer ul li {
    margin-bottom: 2px;
}
.footer a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}
.footer a:hover {
    color: var(--primary-color);
}

.chevron-toggle {
    transition: transform 0.3s ease;
}
[aria-expanded="false"] .chevron-toggle {
    transform: rotate(-90deg);
}

/* Sticky Sidebar */
@media (min-width: 992px) {
    .sticky-sidebar {
        position: sticky;
        top: 52px; /* Offset for compact header */
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        padding-right: 5px;
    }
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 28px;
    right: 20px;
    width: 42px;
    height: 42px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(29, 35, 42, 0.22);
    transition: all 0.25s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}
#backToTop.show {
    opacity: 1;
    visibility: visible;
}
#backToTop:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
}
@media (max-width: 991.98px) {
    #backToTop {
        bottom: calc(92px + env(safe-area-inset-bottom, 0px));
        right: 16px;
        width: 48px;
        height: 48px;
    }
}

/* Product Detail Page */
.product-tech-data {
    column-gap: 1rem;
    row-gap: 0.45rem;
    line-height: 1.25;
}

@media (max-width: 991.98px) {
    .product-tech-data {
        column-gap: 0.85rem;
        row-gap: 0.25rem;
        line-height: 1.2;
    }
}

@media (max-width: 575.98px) {
    .product-tech-data {
        row-gap: 0.18rem;
    }
}

.gallery-thumb {
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.gallery-thumb:hover, .gallery-thumb.active {
    opacity: 1;
    border-color: var(--primary-color);
}
.nav-tabs {
    border-bottom: 2px solid var(--header-border);
}
.nav-tabs .nav-link {
    color: var(--secondary-color);
    font-weight: 500;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 1rem 1.5rem;
    transition: all 0.3s;
}
.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    border-bottom-color: rgba(243, 146, 0, 0.3);
}
.nav-tabs .nav-link.active {
    color: var(--primary-color);
    font-weight: 700;
    border-bottom: 3px solid var(--primary-color) !important;
    background: transparent;
}

/* Skeleton Loading */
/* Product Detail Tabs Override */
.product-tabs-container .nav-tabs {
    border-bottom: none;
}
.product-tabs-container .nav-tabs .nav-link {
    color: var(--secondary-color);
    opacity: 0.8;
    transition: all 0.2s;
    border: 1px solid transparent;
    padding: 6px 16px;
    font-size: 0.9rem;
    border-radius: 8px;
    margin-right: 5px;
}
.product-tabs-container .nav-tabs .nav-link:hover {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
}
.product-tabs-container .nav-tabs .nav-link.active {
    background: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 4px 10px var(--neon-orange);
    opacity: 1;
    border: none;
}

.tab-content .glass-card {
    padding: 1.5rem !important;
}
.description-content, 
.description-content * {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.description-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
    word-break: break-word;
    white-space: normal;
}

.description-content p {
    margin-bottom: 1.2rem;
}

.description-content ul, .description-content ol {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}

.description-content li {
    margin-bottom: 0.5rem;
}

/* Hide potential external "Read More" links from scraped content */
.description-content a[href*="javascript:void(0)"],
.description-content a[href*="#"],
.description-content .read-more,
.description-content .show-more,
.description-content .more-link,
.description-content [class*="read-more"],
.description-content [class*="show-more"] {
    display: none !important;
}

/* Specific fix for "Читати більше" link (common in some scrapers) */
.description-content a:contains("Читати більше"),
.description-content a:contains("Скрыть"),
.description-content a:contains("Показать все") {
    display: none !important;
}

/* Note: :contains is not standard CSS, but we can target by text if needed via JS or keep it as comments for reference. 
   Instead, we use more aggressive attribute and class selectors above. */

/* Utilities */
.ls-1 { letter-spacing: 1px; }
.rotate-180 { transform: rotate(180deg); }
/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.hover-bg-light:hover {
    background-color: rgba(0,0,0,0.03) !important;
    transform: translateX(3px);
}
.transition-all {
    transition: all 0.2s ease-in-out;
}
.hover-translate-y:hover {
    transform: translateY(-2px);
}

/* Mobile Filter Toggle */
.mobile-filter-btn {
    position: fixed;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    right: 18px;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 14px 26px rgba(29, 35, 42, 0.22);
    z-index: 998;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}
@media (max-width: 991.98px) {
    .mobile-filter-btn {
        display: flex;
    }
}
.mobile-filter-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px) scale(1.03);
}

/* Mobile Bottom Navigation */
.mobile-more-offcanvas {
    height: min(70vh, 420px);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overscroll-behavior: contain;
}
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--header-border);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    /* Below Bootstrap offcanvas (1045) so «Ще» та фільтри не перекриваються */
    z-index: 1030;
    box-shadow: 0 -18px 34px -28px rgba(15, 23, 42, 0.35);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transition: transform 0.22s ease, opacity 0.22s ease;
}
.mobile-bottom-nav .nav-action {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    height: 100%;
    /* Скидання стилів для <button> */
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    box-shadow: none;
    position: relative;
    justify-self: stretch;
    align-self: center;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    min-height: 48px;
    margin: 6px;
    border-radius: var(--radius-lg);
    transition: background-color 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.mobile-bottom-nav .nav-action span {
    line-height: 1.1;
}
.mobile-bottom-nav .nav-action i {
    font-size: 1.35rem;
    line-height: 1;
}
.mobile-bottom-nav .nav-action:focus-visible,
.mobile-bottom-nav .nav-action:hover {
    color: var(--primary-color);
    background: rgba(243, 146, 0, 0.08);
    box-shadow: inset 0 0 0 1px rgba(243, 146, 0, 0.16);
}
.mobile-bottom-nav .nav-action.is-active {
    color: #fff;
    background: var(--primary-color);
    box-shadow: 0 16px 26px -18px rgba(243, 146, 0, 0.48), inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}
.mobile-bottom-nav .nav-action.is-active:focus-visible,
.mobile-bottom-nav .nav-action.is-active:hover {
    color: #fff;
    background: var(--primary-hover);
}
.mobile-bottom-nav .cart-badge {
    position: absolute;
    top: 8px;
    right: 14px;
    font-size: 0.65rem;
    min-width: 20px;
    padding: 0.2rem 0.42rem;
}

/* .mobile-sticky-cta is defined below (product detail page sticky bar) */

@media (max-width: 420px) {
    .mobile-bottom-nav {
        height: calc(58px + env(safe-area-inset-bottom, 0px));
    }
    .mobile-bottom-nav .nav-action {
        font-size: 0.78rem;
    }
}

/* Tech World: Sidebar & Components */
.tech-nav-link {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 4px;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.88rem;
    line-height: 1.2;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0;
}
.tech-nav-link:hover, .tech-nav-link.active {
    background: rgba(255, 165, 0, 0.1);
    color: var(--primary-color);
}
.tech-nav-link i {
    margin-right: 6px; /* smaller gap between icon (dash) and name */
    font-size: 1.1rem;
    opacity: 0.7;
}
.tech-nav-link.active::after {
    /* removed visual bar indicator; kept empty to override other styles if needed */
    content: none;
}
/* Layout for category item: left part (icon+name) and right column for counts */
.tech-nav-link .cat-left {
    display: flex;
    align-items: center;
    gap: 6px; /* reduced gap between dash and title */
    overflow: hidden;
    flex: 1 1 auto;
    min-width: 0;
}
.tech-nav-link .cat-left .cat-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tech-nav-link .cat-count {
    flex: 0 0 48px;
    text-align: right;
    color: var(--secondary-color);
    font-size: 0.85rem;
}
/* Make expanded arrow more visible (orange + bolder) */
.btn-tree-toggle.expanded i,
.btn-tree-toggle[aria-expanded="true"] i {
    color: var(--primary-color);
    font-weight: 700;
    opacity: 1;
    font-size: 1.05rem;
}
.tech-nav-link.has-children i {
    color: var(--primary-color);
}
.tech-tree-line {
    border-left: 1px solid var(--header-border);
    margin-left: 5px;
    padding-left: 8px;
}

.sidebar-tree-controls .btn {
    padding: 4px 8px;
    border-radius: 10px;
}
.sidebar-tree-controls .btn:hover,
.sidebar-tree-controls .btn:focus-visible {
    color: var(--primary-color);
}

/* Tree Toggle Button */
.btn-tree-toggle {
    background: none;
    border: none;
    color: var(--secondary-color);
    opacity: 0.5;
    padding: 4px 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-tree-toggle:hover {
    opacity: 1;
    color: var(--primary-color);
}
.btn-tree-toggle i {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}
.btn-tree-toggle:not(.collapsed) i {
    transform: rotate(90deg);
}
.category-node {
    position: relative;
}

.category-node-row {
    position: relative;
}

/* Align toggle arrows and counts in fixed right columns */
.category-node-row .cat-count {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: right;
    white-space: nowrap;
    color: var(--secondary-color);
    font-size: 0.76rem;
    background: rgba(148, 163, 184, 0.12);
    border-radius: 10px;
    padding: 3px 6px;
}
.category-node-row .btn-tree-toggle {
    position: absolute;
    right: 0; /* minimal offset from the right edge of the block */
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}
.tech-nav-link {
    padding-right: 64px; /* reserve space for count */
    min-width: 0;
}
/* Keep link content from overlapping the absolute controls */
.tech-nav-link.has-children {
    padding-right: 72px; /* extra reserve only when toggle button exists */
}

/* First level: maximize room for category title while keeping controls safe */
.category-node[aria-level="1"] > .category-node-row > .tech-nav-link.has-children {
    padding-right: 68px;
}

/* Second level: keep spacing visually symmetric and preserve title width */
.category-node[aria-level="2"] > .category-node-row > .tech-nav-link {
    padding-right: 62px;
}
.category-node[aria-level="2"] > .category-node-row > .tech-nav-link.has-children {
    padding-right: 70px;
}

/* Mobile: compact controls to give category titles more visible width */
@media (max-width: 767.98px) {
    .category-node-row .cat-count {
        right: 0;
        font-size: 0.74rem;
    }

    .category-node-row .btn-tree-toggle {
        width: 26px;
        height: 26px;
    }

    .tech-nav-link {
        padding-right: 58px;
    }

    .tech-nav-link.has-children {
        padding-right: 66px;
    }

    .category-node[aria-level="1"] > .category-node-row > .tech-nav-link.has-children {
        padding-right: 62px;
    }

    .category-node[aria-level="2"] > .category-node-row > .tech-nav-link {
        padding-right: 56px;
    }

    .category-node[aria-level="2"] > .category-node-row > .tech-nav-link.has-children {
        padding-right: 64px;
    }
}

/* Ultra narrow screens: maximize title room without breaking count/toggle alignment */
@media (max-width: 360px) {
    .category-node-row .cat-count {
        right: 0;
        font-size: 0.72rem;
    }

    .category-node-row .btn-tree-toggle {
        width: 24px;
        height: 24px;
    }

    .tech-nav-link {
        padding-right: 54px;
        font-size: 0.84rem;
    }

    .tech-nav-link.has-children {
        padding-right: 60px;
    }

    .category-node[aria-level="1"] > .category-node-row > .tech-nav-link.has-children {
        padding-right: 58px;
    }

    .category-node[aria-level="2"] > .category-node-row > .tech-nav-link {
        padding-right: 52px;
    }

    .category-node[aria-level="2"] > .category-node-row > .tech-nav-link.has-children {
        padding-right: 58px;
    }
}
/* Cyber Form Controls */
.cyber-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.cyber-checkbox {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    user-select: none;
    padding: 1px 0;
    line-height: 1.2;
    transition: color 0.2s;
}
.cyber-checkbox:hover {
    color: var(--primary-color);
}

/* Active filter chips */
.active-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--surface-card);
    border: 1px solid var(--header-border);
    border-radius: 999px;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.85rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}
.filter-chip .chip-label {
    font-weight: 600;
    color: var(--text-main);
}
.filter-chip i {
    font-size: 0.95rem;
    color: var(--text-muted);
}
.filter-chip:hover,
.filter-chip:focus-visible {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 6px 12px rgba(243, 146, 0, 0.15);
}
.filter-chip.clear {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    font-weight: 700;
}
.filter-chip.clear:hover,
.filter-chip.clear:focus-visible {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
}

.catalog-layout {
    max-width: min(100%, 1560px);
    margin-left: auto;
    margin-right: auto;
}

.catalog-mode-panel {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5);
    margin-bottom: var(--space-4);
    border: 1px solid var(--header-border);
    border-radius: 1rem;
    background: var(--surface-card);
    box-shadow: var(--shadow-sm);
}

.catalog-mode-panel--browse {
    background: linear-gradient(135deg, rgba(243, 146, 0, 0.08), rgba(255, 255, 255, 0.98));
}

.catalog-mode-panel__copy {
    min-width: 0;
    display: grid;
    gap: var(--space-2);
}

.catalog-mode-kicker {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(243, 146, 0, 0.12);
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.catalog-mode-title {
    font-size: clamp(1.35rem, 2.8vw, 2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.catalog-mode-description {
    color: var(--text-muted);
    max-width: 60ch;
    line-height: 1.55;
}

.catalog-mode-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: flex-end;
    flex-shrink: 0;
}

.catalog-mode-action-btn {
    min-height: 44px;
    border-radius: 999px;
    padding-inline: 1rem;
}

.catalog-mode-context {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.catalog-mode-context__item {
    padding: var(--space-4);
    border-radius: 0.9rem;
    border: 1px solid var(--header-border);
    background: var(--surface-card);
}

.catalog-mode-context__label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.catalog-mode-context__value {
    display: block;
    color: var(--text-main);
    font-weight: 600;
    line-height: 1.45;
}

.catalog-toolbar {
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding: var(--space-5);
    border: 1px solid var(--header-border);
    border-radius: 1rem;
    background: var(--surface-card);
    box-shadow: var(--shadow-sm);
}
.catalog-toolbar-heading {
    min-width: 0;
    display: grid;
    gap: var(--space-2);
}
.catalog-toolbar-heading .active-filter-chips {
    margin-top: var(--space-2);
}
.catalog-toolbar-title {
    font-size: clamp(1.2rem, 2.6vw, 1.7rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.catalog-toolbar-product-count {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.45;
}
.catalog-toolbar-controls {
    flex-shrink: 0;
    column-gap: var(--space-3) !important;
    row-gap: var(--space-2) !important;
    align-self: flex-start;
}
.catalog-toolbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: var(--space-3);
    min-width: 0;
}
.catalog-toolbar-btn,
.catalog-toolbar-controls .dropdown > .btn,
.catalog-view-toggle .btn {
    min-height: 2.75rem;
}
.catalog-toolbar-btn,
.catalog-toolbar-controls .dropdown > .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}
.catalog-toolbar-action-label,
.catalog-toolbar-sort-label {
    white-space: nowrap;
}
#catalog-view-container {
    padding-top: var(--space-3);
}
.catalog-view-toggle .btn.active {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
    box-shadow: 0 10px 18px rgba(243, 146, 0, 0.18);
}
.catalog-view-toggle .btn:hover,
.catalog-view-toggle .btn:focus-visible {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.catalog-pagination-nav {
    margin-bottom: clamp(1.5rem, 5vw, 3rem);
}
.order-history-card__row + .order-history-card__row {
    margin-top: 0.6rem;
}
.order-history-workbench {
    display: grid;
    gap: var(--space-4);
    padding: var(--space-5);
}

.order-history-workbench__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.order-history-workbench__copy {
    min-width: 0;
    display: grid;
    gap: var(--space-2);
}

.order-history-workbench__eyebrow,
.order-history-workbench__summary-label,
.order-history-erp__label,
.order-history-composition__count,
.product-heading-block__eyebrow {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.order-history-workbench__title {
    font-size: clamp(1.55rem, 1.6vw + 1.1rem, 2.1rem);
    line-height: 1.08;
}

.order-history-workbench__lead {
    max-width: 64ch;
    color: var(--text-muted);
}

.order-history-workbench__summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
    min-width: min(100%, 18rem);
}

.order-history-workbench__summary-item {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: var(--surface-overlay);
    box-shadow: var(--shadow-sm);
}

.order-history-workbench__summary-item strong {
    display: block;
    margin-top: 0.25rem;
    color: var(--dark-bg);
}

.order-history-table-wrap {
    border-radius: var(--radius-xl);
}

.order-history-table thead th {
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.order-history-table tbody td {
    padding-top: 1rem;
    padding-bottom: 1rem;
    vertical-align: middle;
}

.order-history-erp {
    display: grid;
    gap: 0.25rem;
}

.order-history-erp strong {
    color: var(--dark-bg);
}

.order-history-status-block {
    display: grid;
    gap: 0.45rem;
}

.order-history-status-block__note {
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.order-history-composition {
    display: grid;
    gap: 0.35rem;
}

.order-history-composition__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--text-main);
}

.order-history-composition__dot,
.order-history-composition__more {
    color: var(--text-muted);
}

.order-history-primary-action {
    min-width: 0;
}

.order-history-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}
.order-history-card__total {
    color: var(--primary-color);
}
.order-history-card__actions {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.order-history-empty-state {
    border-radius: var(--radius-xl);
}

.product-card-title {
    font-size: 0.82rem;
    line-height: 1.25;
}
.product-title-link {
    color: var(--text-main);
}
.stock-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.32rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(110, 118, 129, 0.16);
    background: #eef1f4;
    color: #54606d;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}
.stock-pill--default {
    background: #eef1f4;
    color: #576270;
}
.stock-pill--low {
    background: #fff4cf;
    border-color: #f2d983;
    color: #8a6700;
}
.stock-pill--empty {
    background: #fde8e8;
    border-color: #efb1b1;
    color: #a63b3b;
}

/* Mobile sticky CTA on product page — positioned ABOVE bottom nav (64px) */
.mobile-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--mobile-bottom-nav-height) + var(--mobile-floating-gap) + env(safe-area-inset-bottom, 0px));
    min-height: var(--mobile-sticky-cta-height);
    padding: 12px 14px 14px;
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.10);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1099;
    border-top: 1px solid var(--header-border);
    opacity: 0;
    transform: translate3d(0, 110%, 0);
    will-change: transform, opacity;
    backface-visibility: hidden;
    contain: paint;
    pointer-events: none;
    transition: transform 0.24s ease, opacity 0.24s ease;
}
.mobile-sticky-cta.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
}
.mobile-sticky-cta .btn {
    height: 52px;
    box-shadow: 0 4px 12px rgba(243, 146, 0, 0.25);
}
@media (min-width: 992px) {
    .mobile-sticky-cta { display: none !important; }
}
/* Extra body padding on pages with sticky CTA (added via .has-sticky-cta body class) */
@media (max-width: 991.98px) {
    body.mobile-shell-safe {
        scroll-padding-bottom: calc(var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 18px);
    }
    body.mobile-form-safe :is(input, select, textarea, button, .btn, .checkout-step-card, .product-detail-tabs-shell) {
        scroll-margin-bottom: calc(var(--mobile-bottom-nav-height) + var(--mobile-sticky-cta-height) + var(--mobile-checkout-bar-height) + env(safe-area-inset-bottom, 0px) + 24px);
    }
    body.product-detail-page,
    body.has-sticky-cta-visible {
        padding-bottom: calc(var(--mobile-bottom-nav-height) + var(--mobile-sticky-cta-height) + var(--mobile-floating-gap) + env(safe-area-inset-bottom, 0px) + 24px);
    }
    body.has-mobile-checkout-bar {
        padding-bottom: calc(var(--mobile-bottom-nav-height) + var(--mobile-checkout-bar-height) + var(--mobile-floating-gap) + env(safe-area-inset-bottom, 0px) + 24px);
    }
}
.cyber-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.checkmark {
    height: 14px;
    width: 14px;
    background-color: transparent;
    border: 2px solid #ccc;
    border-radius: 3px;
    margin-right: 8px;
    position: relative;
    transition: all 0.2s;
}
.cyber-checkbox:hover input ~ .checkmark {
    border-color: var(--primary-color);
}
.cyber-checkbox input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--neon-orange);
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 3px;
    top: 0;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.cyber-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.tech-nav-link.filter-group-title,
.tech-nav-link.filter-group-title.has-children {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding-right: 10px; /* override all tech-nav-link padding-right variants */
}

/* Chevron rotation when collapse is open */
.filter-chevron {
    flex-shrink: 0;
    transition: transform 0.2s ease;
    font-size: 0.75rem;
    opacity: 0.6;
}
.filter-group-title[aria-expanded="true"] .filter-chevron {
    transform: rotate(90deg);
    opacity: 1;
}

.filter-group-title .cat-name {
    font-size: 0.88rem;
}

.filter-values-wrap {
    margin-left: 5px;
    padding-left: 8px;
}

.filter-value-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.cyber-checkbox {
    min-width: 0;
}

.cyber-input {
    background: rgba(var(--glass-bg-rgb, 255, 255, 255), 0.5);
    border: 1px solid var(--header-border);
    border-radius: 6px;
    padding: 4px 10px;
    color: var(--secondary-color);
    font-size: 0.85rem;
    width: 100%;
    transition: all 0.2s;
}
.cyber-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px var(--neon-orange);
    background: var(--surface-card);
}

/* Mini Product Card */
.mini-card {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.mini-card:hover {
    background: var(--surface-card);
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.mini-card img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 4px;
    margin-right: 12px;
    flex-shrink: 0;
}
.mini-card .details {
    min-width: 0;
}
.mini-card .name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.mini-card .price {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* Skeleton Shimmer Animation - Repeated to ensure coverage */
.skeleton-shimmer {
    background: linear-gradient(90deg, 
        rgba(255, 165, 0, 0.05) 25%, 
        rgba(255, 165, 0, 0.1) 50%, 
        rgba(255, 165, 0, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.opacity-50 { opacity: 0.5; transition: opacity 0.3s; }

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: white;
    border: 1px solid #ddd;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin-top: 0.35rem;
    max-height: min(420px, 58vh);
    overflow-y: auto;
    display: none;
}

/* Search History Section */
.search-history-section,
.search-suggestions-section,
.search-quick-jump-section {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.5rem;
    margin-bottom: 0.25rem;
}

.search-history-section:last-child,
.search-suggestions-section:last-child,
.search-quick-jump-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.search-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem 0.25rem;
}

.search-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.search-history-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
}

.search-history-item {
    cursor: pointer;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
}

.search-history-item:hover {
    background: #f8f9fa;
}

.history-remove-btn {
    opacity: 0;
    transition: opacity 0.2s;
    align-self: center;
    margin-right: 0.75rem;
}

.search-history-row:hover .history-remove-btn,
.search-history-row:focus-within .history-remove-btn {
    opacity: 1;
}

.history-remove-btn:focus-visible {
    opacity: 1;
    border-radius: 999px;
    box-shadow: 0 0 0 0.2rem rgba(243, 146, 0, 0.24);
}

/* Search Suggestions (Categories) */
.search-suggestion-item:hover {
    background: rgba(243, 146, 0, 0.08);
}

.search-result-item--quick-jump {
    background: linear-gradient(135deg, rgba(243, 146, 0, 0.09), rgba(255, 255, 255, 0.96));
}

.search-quick-jump-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: rgba(243, 146, 0, 0.14);
    color: var(--primary-color);
    flex-shrink: 0;
}

.search-quick-jump-cta {
    margin-left: auto;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

/* Did You Mean */
.search-did-you-mean {
    padding: 0.6rem 0.9rem;
    background: #fff8e6;
    border-bottom: 1px solid #f0e8d0;
    font-size: 0.85rem;
    color: #8a6700;
}

.did-you-mean-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.did-you-mean-link:hover {
    text-decoration: underline;
}

/* Dark mode for search dropdown */
[data-theme="dark"] .search-history-section,
[data-theme="dark"] .search-suggestions-section,
[data-theme="dark"] .search-quick-jump-section {
    border-bottom-color: var(--dk-border);
}

[data-theme="dark"] .search-section-title {
    color: var(--dk-text-muted);
}

[data-theme="dark"] .search-history-item:hover {
    background: var(--dk-surface-2);
}

[data-theme="dark"] .search-history-row:focus-within .history-remove-btn {
    opacity: 1;
}

[data-theme="dark"] .search-suggestion-item:hover {
    background: var(--dk-orange-glow);
}

[data-theme="dark"] .search-result-item--quick-jump {
    background: linear-gradient(135deg, rgba(243, 146, 0, 0.14), rgba(15, 23, 42, 0.94));
}

[data-theme="dark"] .search-quick-jump-icon {
    background: rgba(243, 146, 0, 0.18);
}

[data-theme="dark"] .search-did-you-mean {
    background: rgba(243, 146, 0, 0.12);
    border-bottom-color: var(--dk-orange-border);
    color: #fbbf24;
}
.search-result-item {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}
.search-result-item:not(a) {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
}
.search-result-item:last-child {
    border-bottom: 0;
}
.search-result-item:hover {
    background: #f8f9fa;
}
.search-result-item.search-result-item-active {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
    background: rgba(243, 146, 0, 0.12);
}
.search-result-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}
.search-result-item .details {
    flex: 1 1 auto;
    min-width: 0;
}
.search-result-item .name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
}
.search-result-item .meta {
    font-size: 0.75rem;
    color: #777;
    display: block;
    margin-top: 0.15rem;
}
.search-result-item .price {
    font-weight: 700;
    color: var(--primary-color);
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
}
.search-result-item--summary {
    justify-content: center;
    text-align: center;
    font-size: 0.84rem;
    font-weight: 600;
}

/* Modal Close Button */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1060;
    padding: 10px;
    background-color: rgba(255,255,255,0.8);
    border-radius: 50%;
}

/* Catalog View Styles */
.text-orange { color: #f39200 !important; }

/* Grid View specific tweaks */
#product-grid:not(.list-view) .d-grid-only,
.catalog-card-grid .d-grid-only { display: block !important; }
#product-grid:not(.list-view) .d-list-only,
.catalog-card-grid .d-list-only { display: none !important; }
#product-grid:not(.list-view) .d-list-flex,
.catalog-card-grid .d-list-flex { display: none !important; }

/* Show/hide helpers for list/grid toggles */
#product-grid.list-view .d-list-only { display: block !important; }
#product-grid.list-view .d-list-flex { display: flex !important; }
#product-grid.list-view .d-list-block { display: block !important; }

#product-grid:not(.list-view) .card-product,
.catalog-card-grid .card-product {
    border: 1px solid rgba(0,0,0,0.05) !important;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

#product-grid:not(.list-view) .card-product:hover,
.catalog-card-grid .card-product:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.07) !important;
}

/* Position badges relative to the card to avoid being clipped by
   product-media overflow-hidden. */
.card-product { position: relative; }
.card-product .badge-new,
.card-product .badge-out-of-stock {
    position: absolute;
    top: 8px;
    z-index: 30;
    padding: 0.25rem 0.5rem;
    font-size: 0.72rem;
    line-height: 1;
    white-space: nowrap;
    border-radius: 0.45rem;
    display: inline-block;
    max-width: calc(100% - 16px);
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-product .badge-new { left: 8px; right: auto; }
.card-product .badge-out-of-stock { right: 8px; left: auto; }

@media (max-width: 576px) {
    .card-product .badge-new,
    .card-product .badge-out-of-stock {
        font-size: 0.65rem;
        padding: 0.18rem 0.4rem;
        top: 6px;
    }
}


#product-grid:not(.list-view) .card-body,
.catalog-card-grid .card-body {
    text-align: center;
    padding: 0.7rem 0.7rem 0.8rem !important;
    gap: 0.45rem;
    line-height: 1.35;
}

#product-grid:not(.list-view) .product-media,
.catalog-card-grid .product-media {
    padding: 0.45rem !important;
}

#product-grid:not(.list-view) .product-info-top,
.catalog-card-grid .product-info-top {
    margin-bottom: 0.2rem !important;
}

#product-grid:not(.list-view) .card-title,
.catalog-card-grid .card-title {
    font-size: 0.84rem !important;
    line-height: 1.25 !important;
    min-height: 2.1em;
    margin-bottom: 0.35rem !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
}

#product-grid:not(.list-view) .product-codes,
.catalog-card-grid .product-codes {
    gap: 0.2rem 0.45rem !important;
    font-size: 0.6rem !important;
}

#product-grid:not(.list-view) .product-info-bottom,
.catalog-card-grid .product-info-bottom {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.45rem !important;
}

#product-grid:not(.list-view) .price-wrapper,
.catalog-card-grid .price-wrapper {
    margin-bottom: 0.2rem;
    width: 100%;
}

#product-grid:not(.list-view) .price-current,
.catalog-card-grid .price-current {
    font-size: 0.98rem !important;
    line-height: 1.15;
}

#product-grid:not(.list-view) .stock-pill,
.catalog-card-grid .stock-pill {
    font-size: 0.68rem;
    padding: 0.28rem 0.5rem;
}

#product-grid:not(.list-view) .actions-wrapper,
.catalog-card-grid .actions-wrapper {
    width: 100%;
    justify-content: center !important;
    gap: 0.45rem !important;
}

#product-grid:not(.list-view) .add-to-cart-form,
.catalog-card-grid .add-to-cart-form {
    justify-content: center;
    width: 100%;
}

#product-grid:not(.list-view) .quantity-selector,
.catalog-card-grid .quantity-selector {
    max-width: 140px; /* Increased from 110px to fit larger buttons */
    flex-wrap: nowrap !important;
}
@media (max-width: 767.98px) {
    #product-grid:not(.list-view) .quantity-selector,
    .catalog-card-grid .quantity-selector {
        max-width: 120px;
    }
}

/* ==================================================================
   LIST VIEW — Strip layout
   Desktop ≥576px : [img 72px] [title flex:1] [ціна 130px] [залишок 155px] [qty+cart]
   Mobile  ≤575px : [img 56px] [column: title / (ціна · залишок · кошик)]
   ================================================================== */

/* --- grid container --- */
#product-grid.list-view {
    display: flex !important;
    flex-direction: column !important;
    gap: 0;
}
#product-grid.list-view .col {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

/* --- strip card --- */
#product-grid.list-view .card-product {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    height: auto !important;
    min-height: 68px !important;
    padding: 6px 12px !important;
    gap: 12px !important;
    border: 0 !important;
    border-bottom: 1px solid #eee !important;
    border-radius: 0 !important;
    background: #fff;
}
#product-grid.list-view .card-product:hover { background: #f9f9f9; }

/* --- image column --- */
#product-grid.list-view .product-media {
    flex: 0 0 72px !important;
    width: 72px !important;
    height: 72px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    flex-shrink: 0 !important;
}
#product-grid.list-view .product-image-container {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
#product-grid.list-view .product-image-container img,
#product-grid.list-view .product-image-container .main-img,
#product-grid.list-view .product-image-container .hover-img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}

/* --- card-body: flat row [title] [right-block] --- */
#product-grid.list-view .card-body {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 0 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    gap: 12px !important;
}

/* --- title column (takes all remaining space) --- */
#product-grid.list-view .product-info-top {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    margin-bottom: 0 !important;
}
#product-grid.list-view .card-title {
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    margin-bottom: 3px !important;
    text-align: left !important;
    white-space: normal !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
}
#product-grid.list-view .product-codes {
    font-size: 0.72rem !important;
    color: #87909c !important;
    margin-top: 2px !important;
    margin-bottom: 0 !important;
    justify-content: flex-start !important;
}

/* --- right-side block: price + stock + actions --- */
#product-grid.list-view .product-info-bottom {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    margin-top: 0 !important;
    flex-wrap: nowrap !important;
}

/* hide grid-only elements */
#product-grid.list-view .d-grid-only { display: none !important; }

/* --- price --- */
#product-grid.list-view .price-wrapper {
    flex: 0 0 130px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    min-width: 0 !important;
}
#product-grid.list-view .price-current {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

/* --- stock (status-wrapper) — десктоп: «В наявності: X шт.» + «Новинка» --- */
#product-grid.list-view .status-wrapper {
    flex: 0 0 155px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    margin: 0 !important;
}
#product-grid.list-view .status-wrapper .stock-info {
    font-size: 0.74rem !important;
    white-space: nowrap !important;
}
#product-grid.list-view .status-wrapper .text-danger {
    font-size: 0.78rem !important;
    color: #ff0000 !important;
    letter-spacing: 0.5px;
}
/* stock-summary — used only on mobile (hidden on desktop) */
#product-grid.list-view .stock-summary { display: none !important; }

/* --- actions: qty + cart --- */
#product-grid.list-view .actions-wrapper {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
}
#product-grid.list-view .quantity-selector {
    width: 110px !important;
    flex-wrap: nowrap !important;
}
#product-grid.list-view .cart-submit-btn { line-height: 0; display: flex; align-items: center; }
#product-grid.list-view .cart-submit-btn i { font-size: 1.4rem !important; }

/* out-of-stock badge above image */
.card-product .badge-out-of-stock-list {
    position: absolute;
    top: 6px;
    left: 6px;
    transform: none;
    z-index: 40;
    padding: 0.18rem 0.48rem;
    font-size: 0.65rem;
    border-radius: 0.4rem;
    white-space: nowrap;
    max-width: calc(100% - 12px);
    overflow: hidden;
    text-overflow: ellipsis;
}
#product-grid.list-view .badge-out-of-stock { display: none !important; }
#product-grid.list-view .badge.bg-success { display: none !important; }

/* --- tablet 576–991px --- */
@media (min-width: 576px) and (max-width: 991.98px) {
    #product-grid.list-view .product-media {
        flex: 0 0 60px !important;
        width: 60px !important;
        height: 60px !important;
    }
    #product-grid.list-view .price-wrapper  { flex: 0 0 110px !important; }
    #product-grid.list-view .status-wrapper { flex: 0 0 130px !important; }
    #product-grid.list-view .quantity-selector { width: 95px !important; }
}

/* ==========================================================
   MOBILE ≤575px: 2-tier strip  [img] | [title / (price · stock · cart)]
   ========================================================== */
@media (max-width: 575.98px) {
    #product-grid.list-view .card-product {
        padding: 6px 8px !important;
        min-height: auto !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    #product-grid.list-view .product-media {
        flex: 0 0 56px !important;
        width: 56px !important;
        height: 56px !important;
        align-self: center !important;
    }
    /* card-body: column */
    #product-grid.list-view .card-body {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
        padding: 2px 0 !important;
    }
    #product-grid.list-view .product-info-top {
        width: 100% !important;
    }
    #product-grid.list-view .card-title {
        font-size: 0.8rem !important;
        -webkit-line-clamp: 3 !important;
    }
    #product-grid.list-view .product-codes {
        font-size: 0.62rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
        max-width: 100% !important;
    }
    /* bottom row */
    #product-grid.list-view .product-info-bottom {
        width: 100% !important;
        justify-content: space-between !important;
        gap: 4px !important;
    }
    #product-grid.list-view .price-wrapper {
        flex: 0 0 auto !important;
        justify-content: flex-start !important;
        text-align: left !important;
    }
    #product-grid.list-view .price-current { font-size: 0.88rem !important; }
    /* show stock-summary (compact), hide full status-wrapper */
    #product-grid.list-view .status-wrapper { display: none !important; }
    #product-grid.list-view .stock-summary {
        display: flex !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        align-items: center !important;
        justify-content: flex-start !important;
        font-size: 0.68rem !important;
        color: #6b7280 !important;
        margin: 0 !important;
        overflow: hidden !important;
        white-space: nowrap !important;
    }
    #product-grid.list-view .actions-wrapper { flex: 0 0 auto !important; }
    /* cart icon only */
    #product-grid.list-view .quantity-selector { display: none !important; }
    /* hide inline bookmark/compare on mobile to keep strip compact */
    #product-grid.list-view .list-quick-actions { display: none !important; }
    #product-grid.list-view .cart-submit-btn i { font-size: 1.4rem !important; }
    #product-grid.list-view .badge-new {
        font-size: 0.6rem !important;
        padding: 0.15rem 0.35rem !important;
    }
}
/* Product codes: flex row, no wrap, overflow hidden */
.product-codes {
    flex-wrap: nowrap !important;
    width: 100%;
    overflow: hidden;
    font-size: 0.62rem;
    color: #95a0ab;
}
.product-codes .code-item {
    flex: 0 0 auto;
    white-space: nowrap;
}
.product-codes .sku-item {
    flex: 1 1 auto;
    min-width: 0;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Selector Buttons Styling */
.quantity-selector {
    border: 1px solid #d8dee4;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.quantity-selector.is-disabled {
    opacity: 0.58;
}
.quantity-selector .btn {
    padding: 2px 12px;
    line-height: 1.5;
    font-size: 1.1rem;
    min-width: 42px;
    min-height: 42px;
    border: 0;
    background: #fff;
.search-result-match {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.search-result-match-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: rgba(243, 146, 0, 0.12);
    color: var(--primary-color);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.search-result-match-badge--strength {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-muted);
}

.search-result-match-value {
    color: var(--text-body);
}

[data-theme="dark"] .search-result-match-badge--strength {
    background: rgba(255, 255, 255, 0.08);
    color: var(--dk-text-muted);
}

.search-workbench {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.95rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(243, 146, 0, 0.14);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(243, 146, 0, 0.06), rgba(255, 255, 255, 0.96));
}

.search-workbench__summary,
.search-workbench__group {
    display: grid;
    gap: 0.45rem;
}

.search-workbench__chip {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: var(--text-main);
    font-size: 0.74rem;
    font-weight: 700;
}

.search-workbench__chip.is-identifier {
    background: rgba(243, 146, 0, 0.14);
    color: var(--primary-color);
}

.search-workbench__text,
.search-workbench__label {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.search-workbench__label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.search-workbench__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.search-workbench-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
}

.search-workbench-chip:hover,
.search-workbench-chip:focus-visible {
    border-color: rgba(243, 146, 0, 0.3);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.search-workbench-chip.is-active {
    background: rgba(243, 146, 0, 0.12);
    border-color: rgba(243, 146, 0, 0.22);
    color: var(--primary-color);
}

.search-workbench-chip__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.07);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
}
    color: #5f6b76;
    box-shadow: none !important;
}
@media (max-width: 767.98px) {
    .quantity-selector .btn {
        padding: 4px 10px; /* Reduced from 6px 14px to fit better */
    }
    .quantity-selector .form-control {
        width: 35px !important; /* Slightly narrower input on mobile */
        min-width: 35px !important;
    }
    .add-to-cart-form {
        flex-wrap: nowrap !important; /* Prevent cart button from wrapping alone */
    }
}

.quantity-selector .form-control {
    border-left: 1px solid #d8dee4;
    border-right: 1px solid #d8dee4;
    padding: 0;
    font-weight: 500;
    min-height: 42px;
    text-align: center !important;
    background: #fff;
}

.quantity-selector .btn:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.cart-submit-btn {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0 !important;
    border-radius: 12px !important;
    border: 1px solid var(--primary-color) !important;
    background: var(--primary-color) !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 18px rgba(243, 146, 0, 0.2);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.cart-submit-btn i {
    color: currentColor !important;
    font-size: 1.2rem !important;
}
.cart-submit-btn:hover:not(:disabled),
.cart-submit-btn:focus-visible:not(:disabled) {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    transform: translateY(-1px);
}
.cart-submit-btn:disabled,
.cart-submit-btn.is-disabled {
    background: #c9d0d8 !important;
    border-color: #c9d0d8 !important;
    color: #fff !important;
    box-shadow: none;
    cursor: not-allowed;
}

/* Touch Target for Cart Button */
@media (max-width: 767.98px) {
    .cart-submit-btn i {
        font-size: 1.2rem !important;
        padding: 0;
    }
    .header-actions i {
        font-size: 1.6rem !important;
    }
    .header-actions .btn-logout i {
        font-size: inherit !important;
    }
}

/* ========== FOOTER (#1) ========== */
.footer {
    background-color: #1a1a2e;
    color: #a0a0b8;
    padding: 40px 0 20px;
    margin-top: 60px;
}
.footer h5 {
    color: #fff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer ul li { margin-bottom: 6px; font-size: 0.85rem; }
.footer a {
    color: #a0a0b8;
    text-decoration: none;
    transition: color 0.2s;
}
.footer a:hover { color: var(--primary-color); }

/* ========== PRODUCT CARD HOVER IMAGE (#6) ========== */
.product-image-container {
    position: relative;
    overflow: hidden;
}
.product-image-container .hover-img {
    transition: opacity 0.35s ease;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-image-container:hover .hover-img {
    opacity: 1 !important;
}
.product-image-container:hover .main-img {
    opacity: 0;
}

/* ========== DARK MODE (#15) — Warm Charcoal Redesign ========== */

/* Тема на <html> — токени тут, щоб ::-webkit-scrollbar на viewport бачив змінні */
html[data-theme="dark"] {
    --surface-page: var(--dk-body-bg);
    --surface-card: var(--dk-surface-1);
    --surface-raised: var(--dk-surface-2);
    --surface-input: var(--dk-surface-2);
    --scrollbar-track: var(--dk-surface-1);
    --scrollbar-thumb: #4a4a4a;
    --scrollbar-thumb-hover: var(--primary-color);
}

/* ── Base ── */
[data-theme="dark"] body,
body.dark-mode {
    background-color: var(--dk-body-bg);
    color: var(--dk-text);
    --bs-body-color: var(--dk-text);
    --bs-body-bg: var(--dk-body-bg);
    --bs-secondary-color: var(--dk-text-muted);
}

/* ── Scrollbar ── */
[data-theme="dark"] ::-webkit-scrollbar-track { background: var(--scrollbar-track); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }

/* ── Header ── */
[data-theme="dark"] .header-top {
    background-color: #0d0d0d;
    border-bottom: 1px solid var(--dk-border-muted);
}
[data-theme="dark"] .header-middle {
    background-color: var(--dk-surface-1);
    border-color: var(--dk-border);
    box-shadow: 0 1px 0 var(--dk-border);
}
[data-theme="dark"] .header-profile-toggle {
    background: var(--dk-surface-2);
    border-color: var(--dk-border);
    color: var(--dk-text);
}
[data-theme="dark"] .header-profile-toggle__label {
    color: var(--dk-text-muted);
}
[data-theme="dark"] .header-profile-toggle__value {
    color: var(--dk-text);
}
[data-theme="dark"] .header-profile-menu {
    background: var(--dk-surface-1);
    border-color: var(--dk-border) !important;
}
[data-theme="dark"] .header-profile-menu__eyebrow,
[data-theme="dark"] .header-profile-menu__meta-link,
[data-theme="dark"] .header-profile-menu__action,
[data-theme="dark"] .header-utility-item,
[data-theme="dark"] .header-utility-link {
    color: var(--dk-text-muted);
}
[data-theme="dark"] .header-profile-menu__meta-name,
[data-theme="dark"] .header-profile-menu__action:hover,
[data-theme="dark"] .header-profile-menu__action:focus-visible,
[data-theme="dark"] .header-profile-menu__action:hover i,
[data-theme="dark"] .header-profile-menu__action:focus-visible i,
[data-theme="dark"] .btn-catalog-trigger:hover,
[data-theme="dark"] .btn-catalog-trigger:focus-visible {
    color: var(--primary-color);
}
[data-theme="dark"] .header-profile-menu__action:hover,
[data-theme="dark"] .header-profile-menu__action:focus-visible,
[data-theme="dark"] .btn-catalog-trigger,
[data-theme="dark"] .btn-catalog-trigger:hover,
[data-theme="dark"] .btn-catalog-trigger:focus-visible {
    background: var(--dk-surface-2);
    border-color: var(--dk-border);
}
[data-theme="dark"] .btn-catalog-trigger:hover,
[data-theme="dark"] .btn-catalog-trigger:focus-visible {
    border-color: var(--dk-orange-border);
    box-shadow: inset 0 0 0 1px rgba(243, 146, 0, 0.18);
}
[data-theme="dark"] .header-bottom {
    background-color: var(--dk-surface-1);
    border-bottom: 1px solid var(--dk-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
[data-theme="dark"] .header-bottom.sticky-active {
    background: rgba(29, 29, 29, 0.97) !important;
    --glass-bg-rgb: 29, 29, 29;
}
[data-theme="dark"] .main-nav .nav-link {
    color: var(--dk-text-muted);
}
[data-theme="dark"] .main-nav .nav-link:hover {
    color: var(--primary-color);
}

/* ── Search ── */
[data-theme="dark"] .search-form .form-control {
    background: var(--surface-input);
    border-color: var(--dk-border);
    color: var(--dk-text);
}
[data-theme="dark"] .header-search-reset-btn {
    background: var(--surface-input) !important;
    border-color: var(--dk-border) !important;
    color: var(--dk-text-faint) !important;
}
[data-theme="dark"] .header-search-reset-btn:hover,
[data-theme="dark"] .header-search-reset-btn:focus-visible {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}
[data-theme="dark"] .search-form .form-control::placeholder {
    color: var(--dk-text-faint);
}
[data-theme="dark"] .search-form .form-control:focus {
    background: var(--dk-surface-1);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--dk-orange-glow);
}

/* ── Cards ── */
[data-theme="dark"] .glass-card {
    background: linear-gradient(180deg, rgba(37, 37, 37, 0.96), rgba(29, 29, 29, 0.96));
    border-color: var(--dk-border);
    box-shadow: 0 18px 36px -28px rgba(0,0,0,0.58), 0 8px 16px rgba(0,0,0,0.22);
}
[data-theme="dark"] .card-product {
    background: linear-gradient(180deg, rgba(37, 37, 37, 0.96), rgba(29, 29, 29, 0.96));
    border-color: var(--dk-border) !important;
}
[data-theme="dark"] .card-product:hover {
    background: linear-gradient(180deg, rgba(46, 46, 46, 0.98), rgba(37, 37, 37, 0.96));
    box-shadow: 0 24px 42px -28px rgba(0,0,0,0.62), 0 12px 22px rgba(0,0,0,0.24);
}
[data-theme="dark"] .product-overlay {
    background: rgba(29, 29, 29, 0.93);
}
[data-theme="dark"] .card {
    background-color: var(--dk-surface-1);
    border-color: var(--dk-border);
    color: var(--dk-text);
}
[data-theme="dark"] .card-header {
    background-color: var(--dk-surface-2);
    border-color: var(--dk-border);
}
[data-theme="dark"] .card-footer {
    background-color: var(--dk-surface-2);
    border-color: var(--dk-border);
}

/* ── Typography helpers ── */
[data-theme="dark"] .text-muted {
    color: var(--dk-text-muted) !important;
}
[data-theme="dark"] .breadcrumb-item.active {
    color: var(--dk-text-muted);
}
[data-theme="dark"] .text-dark,
[data-theme="dark"] a.text-dark {
    color: var(--dk-text) !important;
}
[data-theme="dark"] .text-secondary {
    color: var(--dk-text-muted) !important;
}
[data-theme="dark"] h1,[data-theme="dark"] h2,[data-theme="dark"] h3,
[data-theme="dark"] h4,[data-theme="dark"] h5,[data-theme="dark"] h6 {
    color: var(--dk-text);
}

[data-theme="dark"] .catalog-toolbar-product-count {
    color: var(--dk-text-muted);
}

[data-theme="dark"] .header-actions-quick {
    border-left-color: var(--dk-border);
}

[data-theme="dark"] .filter-chip:not(.clear) {
    background: var(--dk-surface-2);
    border-color: var(--dk-border);
    color: var(--dk-text-muted);
}
[data-theme="dark"] .filter-chip .chip-label {
    color: var(--dk-text);
}
[data-theme="dark"] .filter-chip i {
    color: var(--dk-text-muted);
}

/* ── Links ── */
[data-theme="dark"] a:not(.btn):not(.nav-link):not(.page-link):not(.badge) {
    color: var(--dk-text-muted);
}
[data-theme="dark"] a:not(.btn):not(.nav-link):not(.page-link):not(.badge):hover {
    color: var(--primary-color);
}

/* ── Backgrounds ── */
[data-theme="dark"] .bg-light,
[data-theme="dark"] .bg-white {
    background-color: var(--dk-surface-1) !important;
}
[data-theme="dark"] .bg-body-tertiary {
    background: var(--dk-surface-2) !important;
}
[data-theme="dark"] .bg-body-secondary {
    background: var(--dk-surface-2) !important;
}

/* ── Borders ── */
[data-theme="dark"] .border,
[data-theme="dark"] .border-1,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-start,
[data-theme="dark"] .border-end {
    border-color: var(--dk-border) !important;
}
[data-theme="dark"] hr { border-color: var(--dk-border); opacity: 1; }

/* ── Forms ── */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .input-group-text {
    background-color: var(--dk-surface-2);
    color: var(--dk-text);
    border-color: var(--dk-border);
}
[data-theme="dark"] .form-control::placeholder {
    color: var(--dk-text-faint);
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: var(--dk-surface-2);
    color: var(--dk-text);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--dk-orange-glow);
}
[data-theme="dark"] .form-control:disabled,
[data-theme="dark"] .form-select:disabled {
    background-color: var(--dk-surface-1);
    color: var(--dk-text-faint);
}
[data-theme="dark"] .form-label {
    color: var(--dk-text-muted);
}
[data-theme="dark"] .form-check-input {
    background-color: var(--dk-surface-2);
    border-color: var(--dk-border);
}

/* ── Buttons ── */
[data-theme="dark"] .btn-outline-secondary {
    border-color: var(--dk-border);
    color: var(--dk-text-muted);
    background: rgba(37, 37, 37, 0.9);
}
[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: rgba(243, 146, 0, 0.14);
    border-color: var(--dk-orange-border);
    color: var(--primary-color);
}
[data-theme="dark"] .btn-outline-dark {
    border-color: var(--dk-border);
    color: var(--dk-text-muted);
}
[data-theme="dark"] .btn-outline-dark:hover {
    background-color: var(--dk-surface-3);
    color: var(--dk-text);
    border-color: var(--dk-border);
}
[data-theme="dark"] .btn-light {
    background-color: var(--dk-surface-2);
    border-color: var(--dk-border);
    color: var(--dk-text);
}
[data-theme="dark"] .btn-light:hover {
    background-color: var(--dk-surface-3);
}

/* ── Tables ── */
[data-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--dk-border);
    color: var(--dk-text);
}
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
    --bs-table-striped-bg: rgba(255,255,255,0.03);
}
[data-theme="dark"] .table-hover > tbody > tr:hover {
    --bs-table-hover-bg: var(--dk-orange-glow);
}
[data-theme="dark"] .table thead th {
    border-color: var(--dk-border);
    color: var(--dk-text-muted);
    background-color: var(--dk-surface-2);
}
[data-theme="dark"] .table td,
[data-theme="dark"] .table th {
    border-color: var(--dk-border);
}

/* ── Pagination ── */
[data-theme="dark"] .page-item .page-link {
    background-color: var(--dk-surface-1);
    border-color: var(--dk-border);
    color: var(--dk-text-muted);
}
[data-theme="dark"] .page-item .page-link:hover {
    background-color: var(--dk-surface-3);
    color: var(--primary-color);
    border-color: var(--dk-orange-border);
}
[data-theme="dark"] .page-item.disabled .page-link {
    background-color: var(--dk-surface-1);
    border-color: var(--dk-border);
    color: var(--dk-text-faint);
}

/* ── Nav / Tabs ── */
[data-theme="dark"] .nav-tabs {
    border-color: var(--dk-border);
}
[data-theme="dark"] .nav-tabs .nav-link {
    color: var(--dk-text-muted);
}
[data-theme="dark"] .nav-tabs .nav-link:hover {
    color: var(--primary-color);
    border-color: transparent;
}
[data-theme="dark"] .nav-tabs .nav-link.active {
    background-color: transparent;
    border-color: var(--dk-border) var(--dk-border) var(--dk-surface-1);
    color: var(--primary-color);
}
[data-theme="dark"] .product-tabs-container .nav-tabs .nav-link {
    color: var(--dk-text-muted);
}
[data-theme="dark"] .product-tabs-container .nav-tabs .nav-link:hover {
    background: var(--dk-orange-glow);
}

/* ── Breadcrumb ── */
[data-theme="dark"] .breadcrumb {
    --bs-breadcrumb-divider-color: var(--dk-text-faint);
}

/* ── List group ── */
[data-theme="dark"] .list-group-item {
    background-color: var(--dk-surface-1);
    border-color: var(--dk-border);
    color: var(--dk-text);
}
[data-theme="dark"] .list-group-item:hover {
    background-color: var(--dk-surface-2);
}
[data-theme="dark"] .list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* ── Modals ── */
[data-theme="dark"] .modal-content {
    background-color: var(--dk-surface-1);
    border-color: var(--dk-border);
    color: var(--dk-text);
}
[data-theme="dark"] .modal-header {
    border-color: var(--dk-border);
    background-color: var(--dk-surface-2);
}
[data-theme="dark"] .modal-footer {
    border-color: var(--dk-border);
    background-color: var(--dk-surface-2);
}
[data-theme="dark"] .modal-backdrop {
    --bs-backdrop-bg: #000;
}

/* ── Offcanvas ── */
[data-theme="dark"] .offcanvas {
    background-color: var(--dk-surface-1);
    color: var(--dk-text);
    border-color: var(--dk-border);
}
[data-theme="dark"] .offcanvas-header {
    border-color: var(--dk-border);
    background-color: var(--dk-surface-2);
}

/* ── Alerts ── */
[data-theme="dark"] .alert {
    border-color: var(--dk-border);
}
[data-theme="dark"] .alert-info {
    background-color: rgba(14, 165, 233, 0.12);
    border-color: rgba(14, 165, 233, 0.25);
    color: #7dd3fc;
}
[data-theme="dark"] .alert-warning {
    background-color: rgba(243, 146, 0, 0.12);
    border-color: var(--dk-orange-border);
    color: #fbbf24;
}
[data-theme="dark"] .alert-danger {
    background-color: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}
[data-theme="dark"] .alert-success {
    background-color: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.25);
    color: #86efac;
}

/* ── Toast ── */
[data-theme="dark"] .toast {
    background: var(--dk-surface-2);
    border-color: var(--dk-border);
    color: var(--dk-text);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
[data-theme="dark"] .toast-header {
    background: var(--dk-surface-3);
    border-color: var(--dk-border);
    color: var(--dk-text);
}

/* ── Badges ── */
[data-theme="dark"] .badge.bg-secondary {
    background-color: var(--dk-surface-3) !important;
    color: var(--dk-text-muted);
}
[data-theme="dark"] .badge.bg-light {
    background-color: var(--dk-surface-3) !important;
    color: var(--dk-text-muted);
}

/* ── Sidebar / Filters ── */
[data-theme="dark"] .sidebar-categories .glass-card,
[data-theme="dark"] .filter-sidebar .glass-card {
    background: var(--dk-surface-1);
    border-color: var(--dk-border);
}
[data-theme="dark"] .sidebar-categories .list-group-item,
[data-theme="dark"] .filter-sidebar .list-group-item {
    background: transparent;
    border-color: var(--dk-border-muted);
    color: var(--dk-text-muted);
}
[data-theme="dark"] .sidebar-categories .list-group-item:hover,
[data-theme="dark"] .filter-sidebar .list-group-item:hover {
    background: var(--dk-orange-glow);
    color: var(--primary-color);
}
[data-theme="dark"] .sidebar-categories .badge.bg-secondary {
    background-color: var(--dk-surface-3) !important;
    color: var(--dk-text-faint);
}

/* ── Category count badge (sidebar) ── */
[data-theme="dark"] .badge.bg-secondary.text-muted {
    background-color: var(--dk-surface-3) !important;
    color: var(--dk-text-faint) !important;
}

/* ── Quantity selector ── */
[data-theme="dark"] .quantity-selector .btn {
    background-color: var(--dk-surface-2);
    border-color: var(--dk-border);
    color: var(--dk-text-muted);
}
[data-theme="dark"] .quantity-selector .btn:hover {
    background-color: var(--dk-surface-3);
    color: var(--primary-color);
    border-color: var(--dk-orange-border);
}
[data-theme="dark"] .quantity-selector input {
    background-color: var(--dk-surface-1);
    border-color: var(--dk-border);
    color: var(--dk-text);
}

/* ── Footer ── */
[data-theme="dark"] .footer {
    background-color: #0d0d0d;
    border-top: 1px solid var(--dk-border);
}

/* ── Misc ── */
[data-theme="dark"] .bg-body-tertiary { background: var(--dk-surface-2) !important; }
[data-theme="dark"] .cyber-receipt {
    background: var(--dk-surface-1);
    border-color: var(--dk-border);
}
[data-theme="dark"] .product-inactive { filter: grayscale(1) brightness(0.7); }
[data-theme="dark"] #page-loader {
    background: rgba(20, 20, 20, 0.92);
}
[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ========== MOBILE CART (#4) ========== */
@media (max-width: 767.98px) {
    .checkout-progress-list {
        grid-template-columns: 1fr;
    }

    .checkout-progress-list__item,
    .checkout-step,
    .checkout-step-card__header,
    .checkout-system-status__main {
        gap: 0.65rem;
    }

    .checkout-flow-card,
    .checkout-step-card {
        padding: 0.9rem;
    }

    .checkout-flow-intro__summary {
        min-width: 0;
    }

    .cart-table-mobile .table {
        display: block;
        width: 100%;
    }
    .cart-table-mobile .table thead { display: none; }
    .cart-table-mobile .table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .cart-table-mobile .table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto auto;
        padding: 14px;
        align-items: center;
        column-gap: 10px;
        row-gap: 10px;
        background: var(--bs-body-bg);
        border: 1px solid var(--header-border);
        border-radius: 14px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    }
    .cart-table-mobile .table tbody td {
        border: none;
        padding: 4px 0;
    }
    .cart-table-mobile .table tbody td[data-label]:not(:first-child):not(:last-child)::before {
        content: attr(data-label);
        display: block;
        font-size: 0.68rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--secondary-color);
        margin-bottom: 4px;
        opacity: 0.85;
    }
    .cart-table-mobile .table tbody td:first-child {
        grid-column: 1 / -1;
        width: 100%;
    }
    .cart-table-mobile .table tbody td:nth-child(2) {
        grid-column: 1;
    }
    .cart-table-mobile .table tbody td:nth-child(3) {
        grid-column: 2;
    }
    .cart-table-mobile .table tbody td:nth-child(4) {
        grid-column: 3;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    .cart-table-mobile .table tbody td:nth-child(2) {
        font-size: 0.9rem;
    }
    .cart-table-mobile .table tbody td:last-child {
        grid-column: 4;
        width: auto;
        justify-self: end;
        text-align: right;
    }
    .cart-mobile-summary {
        position: fixed;
        /* Sit above bottom nav */
        bottom: calc(64px + env(safe-area-inset-bottom, 0px));
        left: 0;
        right: 0;
        background: white;
        border-top: 2px solid var(--primary-color);
        padding: 12px 16px;
        z-index: 1050;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    }
    [data-theme="dark"] .cart-mobile-summary {
        background: var(--dk-surface-1);
        border-top-color: var(--dk-orange-border);
    }
}

/* ========== LIGHTBOX (#7) ========== */
.product-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: fadeIn 0.2s ease;
}
.product-lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Share Button */
.share-btn:hover { color: var(--primary-color) !important; transform: scale(1.1); }

/* ========== MOBILE UX IMPROVEMENTS ========== */

/* --- Breadcrumb: scrollable on narrow screens --- */
@media (max-width: 575.98px) {
    .breadcrumb {
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        padding-bottom: 4px;
    }
    .breadcrumb::-webkit-scrollbar { display: none; }
    .breadcrumb-item { flex-shrink: 0; }
    nav[aria-label="breadcrumb"] { margin-bottom: 0.75rem !important; }
}

/* --- Dark Mode Toggle button in header --- */
[data-theme-toggle][data-theme-icon-only] {
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}
[data-theme-toggle]:hover {
    background: rgba(243, 146, 0, 0.12);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* --- Logout button: icon-only on very small screens --- */
.btn-logout {
    flex-shrink: 0;
}
@media (max-width: 400px) {
    .btn-logout-text { display: none; }
    .btn-logout { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
}

/* --- Mobile sticky CTA quantity selector --- */
.mobile-sticky-cta .qty-group {
    display: flex;
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    height: 48px;
    flex-shrink: 0;
}
.mobile-sticky-cta .qty-group button {
    background: #f8f9fa;
    border: none;
    width: 44px;
    height: 100%;
    font-size: 1.35rem;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}
.mobile-sticky-cta .qty-group button:active {
    background: #e9ecef;
    color: var(--primary-color);
}
.mobile-sticky-cta .qty-group input {
    width: 46px;
    border: none;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    height: 100%;
    padding: 0;
    -moz-appearance: textfield;
    appearance: textfield;
}
.mobile-sticky-cta .qty-group input::-webkit-outer-spin-button,
.mobile-sticky-cta .qty-group input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* --- Improved touch targets for quantity buttons --- */
@media (max-width: 767.98px) {
    .quantity-selector .btn {
        min-width: 42px;
        min-height: 42px;
    }
    /* Larger tap area for delete/close/copy buttons */
    .copy-btn, .share-btn, .quick-view-btn {
        min-width: 36px;
        min-height: 36px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
    /* Mobile filter button: larger tap area */
    .mobile-filter-btn {
        width: 60px;
        height: 60px;
    }
    /* Header cart badge positioning fix */
    #cart-nav-link .cart-count-badge {
        font-size: 0.6rem;
        min-width: 16px;
        min-height: 16px;
        padding: 2px 4px;
    }
    /* Product detail: image area full-width on mobile */
    .product-tabs-container .nav-tabs .nav-link {
        padding: 6px 10px;
        font-size: 0.82rem;
    }
}

/* --- Extra small screen: keep header compact --- */
@media (max-width: 360px) {
    .header-middle .btn.btn-primary {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }
}

/* --- Product card: centered layout on xs --- */
@media (max-width: 399px) {
    #product-grid:not(.list-view) .quantity-selector,
    .catalog-card-grid .quantity-selector {
        max-width: 105px;
    }
}

/* --- Cart table: more readable on mobile --- */
@media (max-width: 575.98px) {
    .cart-table-mobile .table tbody td:nth-child(2) {
        font-weight: 600;
        color: var(--primary-color);
    }
}

[data-theme="dark"] .mobile-more-offcanvas .offcanvas-body {
    background: var(--dk-surface-1);
}
[data-theme="dark"] .mobile-more-offcanvas .list-group-item {
    background: var(--dk-surface-2);
    border-color: var(--dk-border) !important;
    color: var(--bs-body-color);
}

/* --- Dark mode: bottom nav & sticky CTA --- */
[data-theme="dark"] .mobile-bottom-nav {
    background: rgba(20, 20, 20, 0.94);
    backdrop-filter: blur(16px);
    border-top-color: var(--dk-border);
    box-shadow: 0 -22px 40px -30px rgba(0, 0, 0, 0.72);
}
[data-theme="dark"] .mobile-bottom-nav .nav-action {
    color: var(--dk-text-muted);
}
[data-theme="dark"] .mobile-bottom-nav .nav-action:hover,
[data-theme="dark"] .mobile-bottom-nav .nav-action:focus-visible {
    color: var(--primary-color);
    background: rgba(243, 146, 0, 0.14);
    box-shadow: inset 0 0 0 1px rgba(243, 146, 0, 0.18);
}
[data-theme="dark"] .mobile-bottom-nav .nav-action.is-active {
    color: #fff;
    background: var(--primary-color);
    box-shadow: 0 18px 28px -20px rgba(243, 146, 0, 0.45), inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}
[data-theme="dark"] .search-result-match-badge {
    background: rgba(251, 191, 36, 0.16);
    color: #fbbf24;
}
[data-theme="dark"] .search-result-match-value {
    color: var(--dk-text);
}
[data-theme="dark"] .mobile-sticky-cta {
    background: rgba(20, 20, 20, 0.98);
    border-top-color: var(--dk-orange-border);
}
[data-theme="dark"] .mobile-sticky-cta .qty-group {
    border-color: var(--dk-border);
}
[data-theme="dark"] .mobile-sticky-cta .qty-group button {
    background: var(--dk-surface-2);
    color: var(--dk-text-muted);
}
[data-theme="dark"] .mobile-sticky-cta .qty-group input {
    background: var(--dk-surface-1);
    color: var(--dk-text);
    border-color: var(--dk-border);
}
.mobile-checkout-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--mobile-bottom-nav-height) + var(--mobile-floating-gap) + env(safe-area-inset-bottom, 0px));
    z-index: 1098;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    min-height: var(--mobile-checkout-bar-height);
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(14px);
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.mobile-checkout-bar__summary {
    display: grid;
    min-width: 0;
    gap: 0.15rem;
}

.mobile-checkout-bar__label,
.mobile-checkout-bar__meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.mobile-checkout-bar__total {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.1;
}

.mobile-checkout-bar__action {
    flex: 0 0 auto;
    min-width: 148px;
}

[data-theme="dark"] .mobile-checkout-bar {
    background: rgba(29, 29, 29, 0.96);
    border-top-color: var(--dk-border);
}

[data-theme="dark"] .mobile-checkout-bar__total {
    color: var(--dk-text);
}

[data-theme="dark"] .mobile-checkout-bar__label,
[data-theme="dark"] .mobile-checkout-bar__meta {
    color: var(--dk-text-muted);
}
[data-theme="dark"] .product-tech-data {
    border-bottom-color: var(--dk-border);
}
[data-theme="dark"] .product-tech-data__item {
    background: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .product-tech-data__item .text-dark,
[data-theme="dark"] .product-retail-reference,
[data-theme="dark"] .product-meta-actions .btn:hover,
[data-theme="dark"] .product-meta-actions .btn:focus-visible {
    color: var(--dk-text) !important;
}
[data-theme="dark"] .product-decision-card {
    background: linear-gradient(180deg, rgba(243, 146, 0, 0.12), rgba(30, 41, 59, 0.92));
    border-color: rgba(243, 146, 0, 0.28);
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.34);
}
[data-theme="dark"] .product-decision-card__availability {
    background: rgba(15, 23, 42, 0.72);
    border-color: var(--dk-border);
}
[data-theme="dark"] .product-stock-summary__label,
[data-theme="dark"] .product-decision-card__hint,
[data-theme="dark"] .product-decision-card__secondary-label,
[data-theme="dark"] .product-sticky-summary__stock {
    color: var(--dk-text-muted);
}
[data-theme="dark"] .product-decision-card__secondary {
    border-top-color: var(--dk-border);
}
[data-theme="dark"] .product-meta-action-btn {
    background: rgba(15, 23, 42, 0.78);
    color: var(--dk-text-muted);
    border-color: var(--dk-border);
}
[data-theme="dark"] .stock-pill--default {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--dk-border);
    color: var(--dk-text-muted);
}
[data-theme="dark"] .stock-pill--low {
    background: rgba(242, 217, 131, 0.16);
    border-color: rgba(242, 217, 131, 0.28);
    color: #ffd76a;
}
[data-theme="dark"] .stock-pill--empty {
    background: rgba(214, 78, 78, 0.16);
    border-color: rgba(214, 78, 78, 0.28);
    color: #ff9b9b;
}
[data-theme="dark"] .quantity-selector {
    background: var(--dk-surface-1);
    border-color: var(--dk-border);
}
[data-theme="dark"] .cart-submit-btn:disabled,
[data-theme="dark"] .cart-submit-btn.is-disabled {
    background: #5d6670 !important;
    border-color: #5d6670 !important;
}
[data-theme="dark"] .order-history-card__actions {
    border-top-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .order-history-card {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 767.98px) {
    .order-filter-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.35rem;
        scrollbar-width: thin;
        scrollbar-color: rgba(243, 146, 0, 0.65) rgba(15, 23, 42, 0.08);
    }
    .order-filter-tabs::-webkit-scrollbar {
        display: block;
        height: 6px;
    }
    .order-filter-tabs::-webkit-scrollbar-track {
        background: rgba(15, 23, 42, 0.08);
        border-radius: 999px;
    }
    .order-filter-tabs::-webkit-scrollbar-thumb {
        background: rgba(243, 146, 0, 0.7);
        border-radius: 999px;
    }
    .order-filter-tabs .btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }
    .order-history-card {
        border-radius: 16px;
    }
    .order-filter-tab,
    .order-history-action-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 991.98px) {
    .mobile-search-slot {
        overflow: hidden;
        max-height: 72px;
        opacity: 1;
        transform: translateY(0);
        transition: max-height 0.24s ease, opacity 0.24s ease, transform 0.24s ease, margin 0.24s ease;
    }
    body.mobile-search-collapsed .mobile-search-slot {
        max-height: 0;
        opacity: 0;
        transform: translateY(-10px);
        margin-top: -0.35rem;
        pointer-events: none;
    }
    body.mobile-search-collapsed .mobile-search-slot .header-search-form {
        pointer-events: none;
    }
    body.mobile-overlay-active .mobile-bottom-nav,
    body.mobile-form-focused .mobile-bottom-nav,
    body.mobile-overlay-active .mobile-sticky-cta,
    body.mobile-form-focused .mobile-sticky-cta,
    body.mobile-overlay-active .mobile-checkout-bar,
    body.mobile-form-focused .mobile-checkout-bar {
        opacity: 0;
        transform: translate3d(0, calc(100% + 12px), 0);
        pointer-events: none;
    }
    body.has-sticky-cta-visible #backToTop {
        bottom: calc(var(--mobile-bottom-nav-height) + max(var(--mobile-sticky-cta-height), var(--mobile-checkout-bar-height)) + var(--mobile-floating-gap) + env(safe-area-inset-bottom, 0px) + 24px);
    }
    body.mobile-footer-overlap #backToTop {
        bottom: calc(var(--mobile-bottom-nav-height) + max(var(--mobile-sticky-cta-height), var(--mobile-checkout-bar-height)) + var(--mobile-floating-gap) + env(safe-area-inset-bottom, 0px) + 24px);
    }
    body.mobile-footer-overlap .mobile-filter-btn {
        bottom: calc(var(--mobile-bottom-nav-height) + max(var(--mobile-sticky-cta-height), var(--mobile-checkout-bar-height)) + var(--mobile-floating-gap) + env(safe-area-inset-bottom, 0px) + 24px);
    }
}

/* Shared UI upgrades */
.brand-logo {
    display: block;
}

.brand-logo--header {
    max-height: 35px;
}

.brand-logo--footer {
    max-height: 24px;
    filter: brightness(10);
}

.btn-catalog-trigger {
    white-space: nowrap;
    min-height: 44px;
    border-radius: 999px;
    border-color: var(--header-border);
    background: var(--surface-raised);
    color: var(--text-main);
    font-weight: 700;
}

.btn-catalog-trigger:hover,
.btn-catalog-trigger:focus-visible {
    border-color: var(--primary-color);
    background: rgba(243, 146, 0, 0.08);
    color: var(--primary-color);
}

.header-icon-link {
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.header-icon-link > i {
    line-height: 1;
}

.header-icon-link:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
}

.header-shortcut-badge,
.header-cart-count {
    top: 7px !important;
    left: auto !important;
    right: 4px;
    transform: translate(45%, -45%) !important;
    min-width: 18px;
    min-height: 18px;
    padding: 0.15rem 0.32rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 0.65rem;
}

.page-messages {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.page-message {
    margin-bottom: 0;
}

.page-message .btn-close {
    opacity: 0.7;
}

.auth-system-state {
    padding: 0.9rem 1rem;
}

.auth-system-state i {
    color: currentColor;
}

.auth-system-state--secondary {
    max-width: 24rem;
    margin-inline: auto;
}

.actions-wrapper {
    z-index: 20;
}

.quantity-input {
    width: 45px;
}

.product-card-quick-actions {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 21;
    display: flex;
    gap: 0.35rem;
}

/* In list view the absolute quick-actions would overlap the cart button —
   hide them and use inline .list-quick-actions instead */
#product-grid.list-view .product-card-quick-actions {
    display: none !important;
}

/* Inline bookmark/compare buttons shown only in list mode */
.list-action-btn {
    width: 1.75rem !important;
    height: 1.75rem !important;
    border-color: #d8dee4 !important;
    background: #f8f9fa !important;
    font-size: 0.82rem;
}

.product-card-action-form {
    margin: 0;
}

.product-card-action-btn {
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

@media (max-width: 991.98px) {
    .catalog-toolbar {
        gap: 0.85rem;
        margin-bottom: 1rem;
    }

    .catalog-toolbar-heading {
        width: 100%;
    }

    .catalog-toolbar-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .catalog-toolbar-controls {
        width: 100%;
        justify-content: space-between !important;
    }

    .catalog-toolbar-actions {
        gap: 0.65rem;
    }

    .catalog-toolbar-controls .dropdown {
        flex: 1 1 0;
        min-width: 0;
    }

    .catalog-toolbar-controls .dropdown > .btn {
        width: 100%;
    }

    .search-results-dropdown {
        max-height: min(380px, 56vh);
    }
}

@media (max-width: 575.98px) {
    .header-middle .search-form {
        box-shadow: var(--shadow-sm);
    }
    .catalog-sidebar-panel__head {
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    }

    .catalog-sidebar-panel__intro {
        color: var(--text-muted);
        font-size: 0.78rem;
        line-height: 1.45;
        max-width: 30ch;
    }

    .catalog-sidebar-panel--browse {
        background: linear-gradient(180deg, rgba(243, 146, 0, 0.06), rgba(255, 255, 255, 0.98));
    }

    .catalog-sidebar-panel--filters {
        background: linear-gradient(180deg, rgba(148, 163, 184, 0.05), rgba(255, 255, 255, 0.98));
    }

    [data-theme="dark"] .catalog-mode-panel,
    [data-theme="dark"] .catalog-mode-context__item,
    [data-theme="dark"] .catalog-toolbar,
    [data-theme="dark"] .catalog-sidebar-panel {
        background: var(--dk-surface-1);
        border-color: var(--dk-border);
    }

    [data-theme="dark"] .catalog-mode-panel--browse {
        background: linear-gradient(180deg, rgba(243, 146, 0, 0.14), rgba(29, 29, 29, 0.98));
    }

    [data-theme="dark"] .catalog-sidebar-panel--browse {
        background: linear-gradient(180deg, rgba(243, 146, 0, 0.12), rgba(29, 29, 29, 0.98));
    }

    [data-theme="dark"] .catalog-sidebar-panel--filters {
        background: linear-gradient(180deg, rgba(148, 163, 184, 0.08), rgba(29, 29, 29, 0.98));
    }

    [data-theme="dark"] .catalog-mode-description,
    [data-theme="dark"] .catalog-mode-context__label,
    [data-theme="dark"] .catalog-sidebar-panel__intro,
    [data-theme="dark"] .catalog-toolbar-product-count {
        color: var(--dk-text-muted);
    }

    [data-theme="dark"] .catalog-mode-context__value {
        color: var(--dk-text);
    }

    @media (max-width: 991.98px) {
        .catalog-mode-panel {
            flex-direction: column;
            padding: var(--space-4);
        }

        .catalog-mode-actions {
            width: 100%;
            justify-content: flex-start;
        }

        .catalog-mode-context {
            grid-template-columns: 1fr;
            margin-bottom: var(--space-4);
        }
    }

    @media (max-width: 575.98px) {
        .catalog-mode-panel {
            padding: var(--space-3);
            border-radius: 0.85rem;
        }

        .catalog-mode-actions {
            display: grid;
            grid-template-columns: 1fr;
        }

        .catalog-mode-action-btn {
            width: 100%;
            justify-content: center;
        }

        .catalog-mode-title {
            font-size: 1.45rem;
        }
    }

    .header-search-input {
        font-size: 0.92rem;
    }

    .header-search-reset-btn,
    .search-submit-btn {
        width: 44px !important;
        min-width: 44px !important;
    }

    .catalog-toolbar {
        align-items: stretch !important;
    }

    .catalog-toolbar-heading {
        text-align: left !important;
    }

    .catalog-toolbar-title {
        max-width: none;
    }

    .catalog-toolbar-controls {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: stretch !important;
        column-gap: 0.6rem !important;
        row-gap: 0.6rem !important;
    }

    .catalog-toolbar-actions {
        gap: 0.45rem;
        min-width: 0;
    }

    .catalog-toolbar-sort {
        min-width: 0;
    }

    .catalog-toolbar-btn,
    .catalog-view-toggle .btn,
    .catalog-toolbar-controls .dropdown > .btn {
        min-height: 46px;
        min-width: 46px;
        padding-inline: 0.8rem;
    }

    .catalog-toolbar-btn,
    .catalog-view-toggle .btn {
        flex: 0 0 46px;
        width: 46px;
        padding-inline: 0;
    }

    .catalog-view-toggle {
        display: grid !important;
        grid-template-columns: repeat(2, 46px);
    }

    .catalog-toolbar-action-label,
    .catalog-toolbar-sort-label {
        display: none;
    }

    .active-filter-chips {
        gap: 0.35rem;
    }

    .filter-chip {
        padding: 0.28rem 0.5rem;
        font-size: 0.78rem;
    }

    .search-results-dropdown {
        left: -0.2rem;
        right: -0.2rem;
        max-height: min(360px, 58vh);
    }


@media (max-width: 390px) {
    .catalog-toolbar-controls {
        column-gap: 0.45rem !important;
    }

    .catalog-toolbar-actions {
        gap: 0.35rem;
    }

    .catalog-toolbar-btn,
    .catalog-view-toggle .btn,
    .catalog-toolbar-controls .dropdown > .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .catalog-toolbar-btn,
    .catalog-view-toggle .btn {
        flex-basis: 44px;
        width: 44px;
    }

    .catalog-view-toggle {
        grid-template-columns: repeat(2, 44px);
    }

    .catalog-toolbar-controls .dropdown > .btn {
        padding-inline: 0.7rem;
    }
}
    .search-result-item {
        padding: 0.65rem 0.75rem;
        gap: 0.65rem;
    }

    .search-result-item img {
        width: 36px;
        height: 36px;
    }

    .search-result-item .name {
        font-size: 0.84rem;
    }

    .search-result-item .meta {
        font-size: 0.7rem;
    }

    .search-result-item .price {
        font-size: 0.82rem;
    }

    #product-grid:not(.list-view),
    .catalog-card-grid {
        --bs-gutter-x: 0.45rem;
        --bs-gutter-y: 0.45rem;
    }

    #product-grid:not(.list-view) .card-body,
    .catalog-card-grid .card-body {
        padding: 0.55rem 0.5rem 0.65rem !important;
    }

    #product-grid:not(.list-view) .product-media,
    .catalog-card-grid .product-media {
        padding: 0.35rem !important;
    }

    #product-grid:not(.list-view) .card-title,
    .catalog-card-grid .card-title {
        font-size: 0.78rem !important;
        min-height: 2em;
    }

    #product-grid:not(.list-view) .product-codes,
    .catalog-card-grid .product-codes {
        justify-content: flex-start !important;
        gap: 0.1rem 0.35rem !important;
        flex-wrap: wrap !important;
    }

    #product-grid:not(.list-view) .price-current,
    .catalog-card-grid .price-current {
        font-size: 0.9rem !important;
    }

    #product-grid:not(.list-view) .stock-pill,
    .catalog-card-grid .stock-pill {
        width: 100%;
    }

    #product-grid:not(.list-view) .quantity-selector,
    .catalog-card-grid .quantity-selector {
        max-width: 104px;
    }

    .mobile-sticky-cta {
        padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
        align-items: stretch;
    }

    .mobile-sticky-cta > .flex-shrink-0 {
        display: none;
    }

    .add-to-cart-form--sticky {
        width: 100%;
        gap: 0.6rem !important;
        align-items: stretch !important;
    }
    .mobile-checkout-bar {
        align-items: flex-start;
        gap: 0.75rem;
    }
    .mobile-checkout-bar__action {
        min-width: 132px;
        padding-inline: 0.9rem;
    }
}


.profile-cabinet {
    display: grid;
    gap: 2rem;
}

.profile-cabinet-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(1.5rem, 2vw, 2rem);
    border-radius: 1.25rem;
    display: grid;
    gap: 1.25rem;
    background:
        radial-gradient(circle at top right, rgba(243, 146, 0, 0.14), transparent 38%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
}

.profile-cabinet-hero::after {
    content: "";
    position: absolute;
    inset: auto -4rem -5rem auto;
    width: 15rem;
    height: 15rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(243, 146, 0, 0.16), rgba(243, 146, 0, 0));
    pointer-events: none;
}

.profile-cabinet-hero__content {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(21rem, 0.95fr);
    align-items: flex-start;
    gap: 1.5rem;
}

.profile-cabinet-hero__copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1rem;
    max-width: 52rem;
}

.profile-cabinet-hero__eyebrow,
.profile-cabinet-panel__eyebrow,
.profile-company-card__eyebrow,
.profile-cabinet-context__label,
.profile-cabinet-metric__label,
.profile-orders-summary__label {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

.profile-cabinet-hero__title {
    font-size: clamp(1.85rem, 3vw, 2.4rem);
    line-height: 1.1;
}

.profile-cabinet-hero__lead {
    max-width: 68ch;
    margin: 0;
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.65;
}

.profile-cabinet-hero__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.profile-cabinet-hero__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.74);
    color: var(--text-main);
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.profile-cabinet-hero__link:hover,
.profile-cabinet-hero__link:focus-visible {
    color: var(--text-main);
    border-color: rgba(243, 146, 0, 0.32);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.profile-cabinet-hero__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    min-width: min(100%, 24rem);
    align-self: stretch;
    padding: 1rem;
    border-radius: 1.15rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.68);
}

.profile-cabinet-metric {
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow-sm);
}

.profile-cabinet-metric strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.05rem;
    color: var(--text-main);
}

.profile-cabinet-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.75);
}

.profile-cabinet-context--ok {
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(240, 253, 244, 0.92);
}

.profile-cabinet-context--warning {
    border-color: rgba(243, 146, 0, 0.28);
    background: rgba(255, 247, 237, 0.94);
}

.profile-cabinet-context__value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0.15rem 0 0.35rem;
}

.profile-cabinet-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.profile-cabinet-panel {
    grid-column: span 6;
    border-radius: 1.25rem;
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: 100%;
}

.profile-cabinet-panel--account {
    grid-column: span 6;
}

.profile-cabinet-panel--actions {
    grid-column: span 6;
    background:
        linear-gradient(180deg, rgba(255, 247, 237, 0.9), rgba(255, 255, 255, 0.96));
}

.profile-cabinet-panel--integrations {
    background:
        linear-gradient(180deg, rgba(241, 245, 249, 0.92), rgba(255, 255, 255, 0.96));
}

.profile-cabinet-panel--wide,
.profile-cabinet-panel--full {
    grid-column: 1 / -1;
}

.profile-cabinet-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.profile-cabinet-panel__title {
    margin: 0.15rem 0 0.35rem;
    font-size: 1.35rem;
}

.profile-cabinet-panel__intro {
    color: var(--text-muted);
    max-width: 62ch;
}

.profile-cabinet-panel__body {
    display: grid;
    gap: 1rem;
}

.profile-account-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(15rem, 0.9fr);
    gap: 1rem;
    align-items: start;
}

.profile-account-layout__main,
.profile-account-layout__side {
    display: grid;
    gap: 1rem;
}

.profile-account-layout__side {
    align-content: start;
}

.profile-account-list {
    display: grid;
    gap: 0.85rem;
}

.profile-account-list__item {
    display: grid;
    grid-template-columns: minmax(7rem, 9rem) minmax(0, 1fr);
    gap: 0.75rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.profile-account-list__item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.profile-account-list dt,
.profile-company-card__meta dt {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.profile-account-list dd,
.profile-company-card__meta dd {
    margin: 0;
    font-weight: 600;
    color: var(--text-main);
    min-width: 0;
    overflow-wrap: anywhere;
}

.profile-account-contact-card,
.profile-edit-form-wrap,
.profile-client-switcher,
.profile-integration-card,
.profile-orders-summary,
.profile-company-card,
.profile-orders-table-wrap {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(248, 250, 252, 0.82);
    border-radius: 1rem;
}

.profile-account-contact-card,
.profile-edit-form-wrap,
.profile-client-switcher,
.profile-integration-card,
.profile-company-card {
    padding: 1rem;
}

.profile-account-contact-card {
    display: grid;
    gap: 0.35rem;
}

.profile-account-contact-card__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.profile-account-contact-card__links a {
    color: var(--primary-color);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.profile-inline-action {
    width: 100%;
    justify-content: center;
}

.profile-quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.profile-cabinet-panel--actions .profile-quick-actions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-quick-action-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    background: rgba(248, 250, 252, 0.9);
    padding: 1rem;
    min-height: 126px;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    text-decoration: none;
    color: var(--text-main);
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.profile-cabinet-panel--actions .profile-cabinet-panel__body {
    flex: 1 1 auto;
}

.profile-cabinet-panel--actions .profile-quick-actions-grid {
    height: 100%;
    align-content: start;
}

.profile-quick-action-card i {
    font-size: 1.15rem;
    color: var(--primary-color);
}

.profile-quick-action-card span {
    font-weight: 700;
}

.profile-quick-action-card small {
    color: var(--text-muted);
}

.profile-quick-action-card:hover,
.profile-quick-action-card:focus-visible {
    border-color: rgba(243, 146, 0, 0.38);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
    color: var(--text-main);
}

.profile-quick-action-card--button {
    width: 100%;
}

.profile-quick-action-card--button,
.profile-quick-action-card--button:hover,
.profile-quick-action-card--button:focus-visible {
    appearance: none;
    text-decoration: none;
}

.profile-quick-action-card--danger {
    color: #991b1b;
}

.profile-quick-action-card--danger i,
.profile-quick-action-card--danger span {
    color: #991b1b;
}

.profile-client-switcher {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(17rem, 1fr);
    gap: 1rem;
    align-items: end;
}

.profile-client-switcher__form {
    display: grid;
    gap: 0.75rem;
}

.profile-company-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.profile-company-card {
    display: grid;
    gap: 0.9rem;
    height: 100%;
}

.profile-company-card__head {
    display: grid;
    gap: 0.2rem;
}

.profile-company-card__meta {
    display: grid;
    gap: 0.8rem;
}

.profile-company-card__meta div {
    display: grid;
    gap: 0.2rem;
}

.profile-integration-stack {
    display: grid;
    gap: 1rem;
}

.profile-integration-card--muted {
    opacity: 0.9;
}

.profile-orders-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.profile-orders-summary__item strong {
    display: block;
    margin-top: 0.3rem;
    color: var(--text-main);
}

.profile-orders-table-wrap {
    background: rgba(255, 255, 255, 0.88);
}

.profile-orders-table thead th {
    white-space: nowrap;
}

.profile-order-mobile-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.profile-empty-state {
    padding: 2.5rem 1rem;
    border: 1px dashed rgba(148, 163, 184, 0.3);
    border-radius: 1rem;
    background: rgba(248, 250, 252, 0.56);
}

@media (max-width: 1399.98px) {
    .profile-account-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1199.98px) {
    .profile-cabinet-hero__content {
        grid-template-columns: 1fr;
    }

    .profile-cabinet-panel--account,
    .profile-cabinet-panel--actions {
        grid-column: span 6;
    }

    .profile-cabinet-panel--actions .profile-quick-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-company-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .profile-cabinet-panel {
        grid-column: 1 / -1;
    }

    .profile-account-layout {
        grid-template-columns: 1fr;
    }

    .profile-client-switcher {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .profile-cabinet-hero,
    .profile-cabinet-panel {
        padding: 1rem;
        border-radius: 1rem;
    }

    .profile-cabinet-hero__metrics,
    .profile-quick-actions-grid,
    .profile-orders-summary,
    .profile-company-grid {
        grid-template-columns: 1fr;
    }

    .profile-cabinet-hero__links {
        display: grid;
        grid-template-columns: 1fr;
    }

    .profile-cabinet-context,
    .profile-cabinet-panel__header,
    .profile-account-list__item {
        grid-template-columns: 1fr;
        display: grid;
    }

    .profile-cabinet-context {
        align-items: flex-start;
    }

    .profile-account-list__item {
        gap: 0.2rem;
    }

    .profile-quick-action-card {
        min-height: 0;
    }
}

[data-theme="dark"] .profile-cabinet-hero {
    background:
        radial-gradient(circle at top right, rgba(243, 146, 0, 0.16), transparent 42%),
        linear-gradient(135deg, rgba(31, 41, 55, 0.96), rgba(17, 24, 39, 0.96));
}

[data-theme="dark"] .profile-cabinet-panel--actions,
[data-theme="dark"] .profile-cabinet-panel--integrations,
[data-theme="dark"] .profile-cabinet-hero__metrics,
[data-theme="dark"] .profile-cabinet-hero__link {
    background: var(--dk-surface-1);
    border-color: var(--dk-border);
}

[data-theme="dark"] .profile-cabinet-metric,
[data-theme="dark"] .profile-cabinet-context,
[data-theme="dark"] .profile-account-contact-card,
[data-theme="dark"] .profile-edit-form-wrap,
[data-theme="dark"] .profile-client-switcher,
[data-theme="dark"] .profile-integration-card,
[data-theme="dark"] .profile-orders-summary,
[data-theme="dark"] .profile-company-card,
[data-theme="dark"] .profile-orders-table-wrap,
[data-theme="dark"] .profile-quick-action-card,
[data-theme="dark"] .profile-empty-state {
    background: var(--dk-surface-1);
    border-color: var(--dk-border);
}

[data-theme="dark"] .profile-cabinet-hero__lead,
[data-theme="dark"] .profile-cabinet-hero__eyebrow,
[data-theme="dark"] .profile-cabinet-panel__eyebrow,
[data-theme="dark"] .profile-company-card__eyebrow,
[data-theme="dark"] .profile-cabinet-context__label,
[data-theme="dark"] .profile-cabinet-metric__label,
[data-theme="dark"] .profile-orders-summary__label,
[data-theme="dark"] .profile-cabinet-panel__intro,
[data-theme="dark"] .profile-quick-action-card small,
[data-theme="dark"] .profile-account-list dt,
[data-theme="dark"] .profile-company-card__meta dt,
[data-theme="dark"] .profile-cabinet-context p,
[data-theme="dark"] .profile-integration-card p,
[data-theme="dark"] .profile-empty-state p {
    color: var(--dk-text-muted);
}

[data-theme="dark"] .profile-cabinet-hero__title,
[data-theme="dark"] .profile-cabinet-metric strong,
[data-theme="dark"] .profile-cabinet-context__value,
[data-theme="dark"] .profile-cabinet-panel__title,
[data-theme="dark"] .profile-account-list dd,
[data-theme="dark"] .profile-company-card__meta dd,
[data-theme="dark"] .profile-account-contact-card strong,
[data-theme="dark"] .profile-quick-action-card,
[data-theme="dark"] .profile-orders-summary__item strong {
    color: var(--dk-text);
}

[data-theme="dark"] .profile-orders-table.table,
[data-theme="dark"] .profile-orders-table.table th,
[data-theme="dark"] .profile-orders-table.table td,
[data-theme="dark"] .profile-order-mobile-card {
    color: var(--dk-text);
}

[data-theme="dark"] .profile-orders-table.table thead,
[data-theme="dark"] .profile-orders-table.table thead th {
    background: rgba(17, 24, 39, 0.96);
    color: var(--dk-text);
}

[data-theme="dark"] .profile-cabinet-context--ok {
    background: rgba(6, 78, 59, 0.35);
}

[data-theme="dark"] .profile-cabinet-context--warning {
    background: rgba(120, 53, 15, 0.34);
}
    .mobile-sticky-submit-btn {
        min-width: 0;
        white-space: nowrap;
        font-size: 1rem;
        line-height: 1.1;
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .mobile-sticky-submit-btn i {
        flex-shrink: 0;
    }

    .cart-toolbar-btn {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .cart-qty-group {
        min-height: 46px;
    }

    .cart-qty-btn {
        min-width: 44px;
        min-height: 44px;
        font-size: 1.3rem;
    }

    .cart-qty-input {
        width: 52px;
        min-height: 44px;
        font-size: 1rem;
        font-weight: 700;
    }

    .cart-remove-btn {
        min-width: 42px;
        min-height: 42px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .cart-table-mobile .table tbody td {
        vertical-align: middle;
    }

    .product-card-quick-actions {
        top: 0.45rem;
        right: 0.45rem;
        gap: 0.25rem;
    }

    .product-card-action-btn {
        width: 1.75rem;
        height: 1.75rem;
    }

    .product-decision-card {
        padding: 0.9rem;
    }

    .product-decision-card__top {
        flex-direction: column;
    }

    .product-decision-card__availability {
        width: 100%;
        min-width: 0;
    }

    .product-stock-summary__line {
        gap: 0.5rem;
    }

    .product-meta-actions {
        gap: 0.45rem;
    }

    .product-meta-action-btn {
        width: 100%;
        justify-content: center;
    }

    .product-copy-btn {
        width: 44px;
    }
}

.product-card-action-btn:hover,
.product-card-action-btn:focus-visible,
.product-card-action-btn.is-active {
    color: var(--primary-color);
    border-color: rgba(243, 146, 0, 0.4);
    transform: translateY(-1px);
}

.product-heading-block {
    display: grid;
    gap: 0.35rem;
}

.product-detail-shell {
    border-radius: var(--radius-xl);
}

.product-media-stage {
    border-radius: var(--radius-lg) !important;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14);
}

.product-tech-data {
    gap: 0.6rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    padding-bottom: 0.9rem;
}

.product-tech-data__item {
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-pill);
    background: rgba(148, 163, 184, 0.08);
}

.product-specs-preview {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(248, 250, 252, 0.76);
}

.product-specs-preview__list {
    display: grid;
    gap: 0.35rem;
}

.product-decision-card {
    padding: 1.1rem;
    border: 1px solid rgba(243, 146, 0, 0.18);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(243, 146, 0, 0.05), rgba(248, 250, 252, 0.96));
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.product-decision-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.product-decision-card__price-column {
    min-width: 0;
    display: grid;
    gap: 0.55rem;
}

.product-decision-card__price-row {
    flex-wrap: wrap;
}

.product-retail-reference {
    font-weight: 500;
}

.product-decision-card__hint {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
    max-width: 44ch;
}

.product-decision-card__availability {
    min-width: min(100%, 240px);
    padding: 0.9rem 1rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.product-stock-summary {
    display: grid;
    gap: 0.45rem;
}

.product-stock-summary__line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.82rem;
    line-height: 1.4;
}

.product-stock-summary__label {
    color: var(--text-muted);
}

.product-decision-card__form {
    margin-bottom: 0.9rem;
}

.product-qty-group {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.product-primary-cta {
    min-height: 52px;
    border-radius: var(--radius-lg);
    font-size: 1rem;
}

.product-decision-card__secondary {
    display: grid;
    gap: 0.5rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.product-decision-card__secondary-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-meta-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding-inline: 0.85rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-muted);
    border-color: rgba(148, 163, 184, 0.24);
}

.product-share-button.product-meta-action-btn {
    width: auto;
}

.product-copy-btn {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
}

.product-qty-btn {
    min-width: 44px;
    min-height: 44px;
}

.product-meta-actions .btn.is-active {
    color: var(--primary-color);
    border-color: rgba(243, 146, 0, 0.4);
    background: rgba(243, 146, 0, 0.08);
}

.product-meta-actions {
    opacity: 0.9;
}

.product-meta-actions .btn:hover,
.product-meta-actions .btn:focus-visible {
    opacity: 1;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.98);
}

.description-content--product {
    max-width: 800px;
}

.product-downloads-panel {
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(248, 250, 252, 0.74);
}

.product-detail-tabs-shell {
    border-radius: var(--radius-xl);
}

.product-detail-tabs {
    background: rgba(248, 250, 252, 0.84) !important;
}

.product-detail-tabs .nav-link {
    color: var(--text-muted);
    border: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.product-detail-tabs .nav-link.active {
    color: var(--dark-bg);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 -2px 0 var(--primary-color);
}

.product-detail-tabs .nav-link:hover,
.product-detail-tabs .nav-link:focus-visible {
    color: var(--primary-color);
}

.product-specs-table tbody td {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.product-related-section {
    display: grid;
    gap: var(--space-4);
}

.download-chip-label {
    max-width: 150px;
}

.stock-secondary-line {
    font-size: 0.75rem;
    line-height: 1.35;
}

.product-sticky-summary {
    display: grid;
    gap: 0.2rem;
}

.product-sticky-summary__stock {
    color: var(--text-muted);
    font-size: 0.74rem;
    line-height: 1.3;
}

.sticky-price-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.gallery-thumb-button {
    padding: 0;
    overflow: hidden;
}

.gallery-thumb-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-thumb-container.active-thumb {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.2);
}

.cart-qty-column {
    width: 130px;
}

.cart-item-thumb {
    width: 44px;
    height: 44px;
}

.cart-item-thumb-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

.cart-item-link {
    font-size: 0.9rem;
    line-height: 1.2;
}

.cart-item-meta {
    font-size: 0.8rem;
}

.cart-qty-input {
    width: 40px;
}

.cart-item-total-cell,
.cart-summary-total {
    color: var(--primary-color);
}

.cart-clear-form,
.cart-remove-form {
    margin: 0;
}

.checkout-flow-intro {
    display: grid;
    gap: 1rem;
    border: 1px solid rgba(243, 146, 0, 0.16);
    background: linear-gradient(135deg, rgba(243, 146, 0, 0.07), rgba(255, 255, 255, 0.95));
}

.checkout-flow-intro__eyebrow,
.checkout-flow-card__eyebrow,
.checkout-section-heading__eyebrow,
.checkout-system-statuses__heading,
.checkout-summary-strip__label,
.checkout-confirm-box__label {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.checkout-flow-intro__summary {
    min-width: 140px;
}

.checkout-progress-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.checkout-progress-list__item,
.checkout-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem;
    align-items: start;
    padding: 0.85rem 0.95rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.72);
}

.checkout-progress-list__index,
.checkout-step__index,
.checkout-step-card__index {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-main);
    background: rgba(148, 163, 184, 0.14);
    flex-shrink: 0;
}

.checkout-progress-list__title,
.checkout-step__title,
.checkout-step-card__title,
.checkout-system-status__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.checkout-progress-list__note,
.checkout-step__note,
.checkout-step-card__note,
.checkout-system-status__text,
.checkout-confirm-box__hint,
.checkout-step-card__placeholder {
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.checkout-progress-list__item.is-complete,
.checkout-step.is-complete {
    border-color: rgba(25, 135, 84, 0.2);
    background: rgba(25, 135, 84, 0.08);
}

.checkout-progress-list__item.is-complete .checkout-progress-list__index,
.checkout-step.is-complete .checkout-step__index {
    background: rgba(25, 135, 84, 0.14);
    color: #0f5132;
}

.checkout-progress-list__item.is-current,
.checkout-step.is-current {
    border-color: rgba(243, 146, 0, 0.24);
    background: rgba(243, 146, 0, 0.08);
}

.checkout-progress-list__item.is-current .checkout-progress-list__index,
.checkout-step.is-current .checkout-step__index,
.checkout-step-card__index {
    background: rgba(243, 146, 0, 0.16);
    color: var(--primary-color);
}

.checkout-progress-list__item.is-blocked,
.checkout-step.is-blocked,
.checkout-step-card.is-blocked {
    border-color: rgba(220, 53, 69, 0.18);
    background: rgba(220, 53, 69, 0.07);
}

.checkout-progress-list__item.is-blocked .checkout-progress-list__index,
.checkout-step.is-blocked .checkout-step__index,
.checkout-step-card.is-blocked .checkout-step-card__index {
    background: rgba(220, 53, 69, 0.14);
    color: #b02a37;
}

.checkout-section-heading {
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.cart-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 500px);
    justify-content: end;
}

.cart-summary-card {
    max-width: 500px;
    width: 100%;
}

.checkout-flow-card {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid rgba(243, 146, 0, 0.18);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(243, 146, 0, 0.06), rgba(255, 255, 255, 0.98));
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.06);
}

.checkout-flow-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.checkout-readiness-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.checkout-readiness-pill.is-ready {
    background: rgba(25, 135, 84, 0.1);
    color: #0f5132;
}

.checkout-readiness-pill.is-blocked {
    background: rgba(220, 53, 69, 0.1);
    color: #b02a37;
}

.checkout-summary-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.checkout-summary-strip__item {
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem 0.95rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.78);
}

.checkout-summary-strip__meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.checkout-stepper,
.checkout-flow-form,
.checkout-system-statuses {
    display: grid;
    gap: 0.65rem;
}

.checkout-stepper {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checkout-system-status {
    display: grid;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.74);
}

.checkout-system-status__main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
}

.checkout-system-status__main > i {
    font-size: 1rem;
    margin-top: 0.1rem;
    color: var(--primary-color);
}

.checkout-system-status--compact {
    gap: 0.55rem;
    padding: 0.75rem 0.85rem;
}

.checkout-system-status--compact .checkout-system-status__main {
    gap: 0.65rem;
}

.checkout-system-status--compact .checkout-system-status__title {
    font-size: 0.88rem;
    margin-bottom: 0.1rem;
}

.checkout-system-status--compact .checkout-system-status__text {
    font-size: 0.8rem;
    line-height: 1.4;
}

.checkout-system-status__eyebrow {
    margin-bottom: 0.35rem;
}

.checkout-system-status__next {
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.22);
    font-size: 0.82rem;
    color: var(--text-main);
}

.checkout-system-status--warning,
.checkout-system-status--blocker {
    border-color: rgba(220, 53, 69, 0.18);
    background: rgba(220, 53, 69, 0.06);
}

.checkout-system-status--warning .checkout-system-status__main > i,
.checkout-system-status--blocker .checkout-system-status__main > i {
    color: #b02a37;
}

.checkout-system-status--ok,
.checkout-system-status--success {
    border-color: rgba(25, 135, 84, 0.18);
    background: rgba(25, 135, 84, 0.06);
}

.checkout-system-status--ok .checkout-system-status__main > i,
.checkout-system-status--success .checkout-system-status__main > i {
    color: #198754;
}

.checkout-system-status--info {
    border-color: rgba(13, 110, 253, 0.18);
    background: rgba(13, 110, 253, 0.05);
}

.checkout-system-status--info .checkout-system-status__main > i {
    color: #0d6efd;
}

.checkout-step-card {
    display: grid;
    gap: 0.8rem;
    padding: 0.9rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.76);
}

.checkout-step-card__header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem;
    align-items: start;
}

.checkout-flow-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    padding-left: 0.9rem;
    border-radius: 0.85rem;
    background: rgba(148, 163, 184, 0.08);
}

.checkout-flow-checkbox.form-check {
    margin-left: 0;
}

.checkout-flow-checkbox .form-check-input {
    float: none;
    margin: 0;
    flex: 0 0 auto;
}

.checkout-flow-checkbox .form-check-label {
    margin: 0;
    min-width: 0;
}

.checkout-confirm-box {
    display: grid;
    gap: 0.35rem;
    padding: 0.8rem 0.9rem;
    border-radius: 0.9rem;
    background: rgba(243, 146, 0, 0.08);
    border: 1px solid rgba(243, 146, 0, 0.16);
}

.checkout-confirm-box__total {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-color);
}

.checkout-submit-btn {
    min-height: 52px;
    border-radius: 0.9rem;
}

.cyber-receipt {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
}

[data-theme="dark"] .cyber-receipt {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .checkout-flow-intro,
[data-theme="dark"] .checkout-flow-card {
    background: linear-gradient(180deg, rgba(243, 146, 0, 0.12), rgba(30, 41, 59, 0.94));
    border-color: rgba(243, 146, 0, 0.24);
}

[data-theme="dark"] .checkout-progress-list__item,
[data-theme="dark"] .checkout-step,
[data-theme="dark"] .checkout-summary-strip__item,
[data-theme="dark"] .checkout-system-status,
[data-theme="dark"] .checkout-step-card,
[data-theme="dark"] .checkout-flow-checkbox {
    background: rgba(15, 23, 42, 0.72);
    border-color: var(--dk-border);
}

[data-theme="dark"] .checkout-progress-list__title,
[data-theme="dark"] .checkout-step__title,
[data-theme="dark"] .checkout-step-card__title,
[data-theme="dark"] .checkout-system-status__title,
[data-theme="dark"] .checkout-system-status__next {
    color: var(--dk-text);
}

[data-theme="dark"] .checkout-progress-list__note,
[data-theme="dark"] .checkout-step__note,
[data-theme="dark"] .checkout-step-card__note,
[data-theme="dark"] .checkout-system-status__text,
[data-theme="dark"] .checkout-confirm-box__hint,
[data-theme="dark"] .checkout-step-card__placeholder,
[data-theme="dark"] .checkout-flow-intro__eyebrow,
[data-theme="dark"] .checkout-flow-card__eyebrow,
[data-theme="dark"] .checkout-section-heading__eyebrow,
[data-theme="dark"] .checkout-system-statuses__heading,
[data-theme="dark"] .checkout-summary-strip__label,
[data-theme="dark"] .checkout-summary-strip__meta,
[data-theme="dark"] .checkout-confirm-box__label {
    color: var(--dk-text-muted);
}

[data-theme="dark"] .checkout-section-heading {
    border-bottom-color: var(--dk-border);
}

[data-theme="dark"] .checkout-system-status__next {
    border-top-color: var(--dk-border);
}

[data-theme="dark"] .checkout-readiness-pill.is-ready {
    color: #8dd9b6;
    background: rgba(25, 135, 84, 0.18);
}

[data-theme="dark"] .checkout-readiness-pill.is-blocked {
    color: #ff9da8;
    background: rgba(220, 53, 69, 0.18);
}

[data-theme="dark"] .system-state,
[data-theme="dark"] .system-pill {
    background: var(--dk-surface-1);
    border-color: var(--dk-border);
}

[data-theme="dark"] .system-state--info,
[data-theme="dark"] .system-pill--info {
    background: rgba(29, 78, 216, 0.18);
    color: #9cc2ff;
}

[data-theme="dark"] .system-state--warning,
[data-theme="dark"] .system-pill--warning {
    background: rgba(161, 98, 7, 0.22);
    color: #ffd580;
}

[data-theme="dark"] .system-state--success,
[data-theme="dark"] .system-pill--success {
    background: rgba(6, 95, 70, 0.22);
    color: #8dd9b6;
}

[data-theme="dark"] .system-state--blocker,
[data-theme="dark"] .system-pill--blocker {
    background: rgba(127, 29, 29, 0.24);
    color: #ff9da8;
}

[data-theme="dark"] .system-state--secondary,
[data-theme="dark"] .system-pill--secondary {
    background: rgba(71, 85, 105, 0.22);
    color: var(--dk-text-muted);
}

[data-theme="dark"] .checkout-confirm-box {
    background: rgba(243, 146, 0, 0.12);
    border-color: rgba(243, 146, 0, 0.22);
}

[data-theme="dark"] .search-workbench {
    background: linear-gradient(135deg, rgba(243, 146, 0, 0.12), rgba(15, 23, 42, 0.94));
    border-color: rgba(243, 146, 0, 0.24);
}

[data-theme="dark"] .search-workbench__chip {
    background: rgba(255, 255, 255, 0.08);
    color: var(--dk-text);
}

[data-theme="dark"] .search-workbench__chip.is-identifier {
    background: rgba(243, 146, 0, 0.16);
    color: #fbbf24;
}

[data-theme="dark"] .search-workbench__text,
[data-theme="dark"] .search-workbench__label {
    color: var(--dk-text-muted);
}

[data-theme="dark"] .search-workbench-chip {
    background: rgba(15, 23, 42, 0.78);
    border-color: var(--dk-border);
    color: var(--dk-text);
}

[data-theme="dark"] .search-workbench-chip.is-active {
    background: rgba(243, 146, 0, 0.16);
    border-color: rgba(243, 146, 0, 0.22);
    color: #fbbf24;
}

[data-theme="dark"] .search-workbench-chip__count {
    background: rgba(255, 255, 255, 0.08);
    color: var(--dk-text-muted);
}

.receipt-line {
    height: 2px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 100%);
}

.receipt-divider {
    border-bottom: 2px dashed #eee;
}

[data-theme="dark"] .receipt-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

.credit-status-card {
    display: grid;
    gap: 0.6rem;
    border: 1px solid rgba(243, 146, 0, 0.18);
    border-radius: 0.85rem;
    background: rgba(243, 146, 0, 0.06);
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
}

.credit-status-card.is-blocked {
    border-color: rgba(220, 53, 69, 0.25);
    background: rgba(220, 53, 69, 0.08);
}

.credit-status-card__title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.credit-status-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
}

.credit-status-note {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.saved-products-layout,
.compare-layout {
    display: grid;
    gap: 1.5rem;
}

.decision-workspace-hero {
    display: grid;
    gap: 1rem;
    border: 1px solid rgba(243, 146, 0, 0.16);
    background: linear-gradient(135deg, rgba(243, 146, 0, 0.06), rgba(255, 255, 255, 0.96));
}

.decision-workspace-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.decision-workspace-intro {
    display: grid;
    gap: 0.35rem;
}

.decision-workspace-eyebrow,
.decision-workspace-summary__label,
.compare-product-card__snapshot-label {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.decision-workspace-actions {
    display: grid;
    gap: 0.75rem;
    justify-items: end;
}

.decision-workspace-actions__group,
.decision-workspace-tabs,
.decision-workspace-summary,
.decision-workspace-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.decision-workspace-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 42px;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.88);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
}

.decision-workspace-tab.is-active {
    border-color: rgba(243, 146, 0, 0.24);
    background: rgba(243, 146, 0, 0.12);
    color: var(--primary-color);
}

.decision-workspace-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-muted);
    font-size: 0.72rem;
}

.decision-workspace-action-btn,
.decision-workspace-btn {
    min-height: 40px;
    border-radius: 999px;
}

.decision-workspace-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.decision-workspace-summary__item {
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem 0.95rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.82);
}

.decision-workspace-summary__item--wide {
    grid-column: span 1;
}

.decision-workspace-card {
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.decision-workspace-card__toolbar {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    padding-bottom: 0.85rem;
}

.decision-workspace-card__main {
    align-items: flex-start;
}

.decision-workspace-card__actions {
    margin-top: auto;
}

.decision-workspace-empty__actions {
    display: grid;
    gap: 1rem;
    justify-items: center;
}

.decision-workspace-tabs--empty {
    justify-content: center;
}

.saved-products-grid,
.compare-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.compare-mobile-sections {
    display: grid;
    gap: 1rem;
}

.compare-mobile-card {
    display: grid;
    gap: 0.75rem;
}

.compare-product-card__snapshot {
    display: grid;
    gap: 0.45rem;
    padding: 0.8rem 0.9rem;
    border-radius: 0.85rem;
    background: rgba(148, 163, 184, 0.08);
}

.compare-product-card__snapshot-list {
    list-style: none;
    display: grid;
    gap: 0.45rem;
    padding: 0;
}

.compare-product-card__snapshot-list li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.82rem;
}

.compare-product-card__snapshot-list span {
    color: var(--text-muted);
}

.compare-product-card__snapshot-list strong {
    color: var(--text-main);
    text-align: right;
}

.compare-mobile-spec-list {
    display: grid;
    gap: 0.75rem;
}

.compare-mobile-spec-row {
    display: grid;
    gap: 0.2rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.compare-mobile-spec-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.compare-mobile-spec-row dt {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.compare-mobile-spec-row dd {
    margin: 0;
    color: var(--text-main);
}

.saved-product-card .card-body,
.compare-product-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.saved-product-toolbar,
.compare-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.saved-product-main {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 1rem;
}

.saved-product-card__media,
.compare-product-card__image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 88px;
    border-radius: 0.85rem;
    border: 1px solid var(--header-border);
    background: rgba(255, 255, 255, 0.85);
    padding: 0.75rem;
}

.saved-product-card__image,
.compare-product-card__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 120px;
}

.saved-product-card__placeholder,
.compare-product-card__placeholder {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.saved-product-content,
.compare-product-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.saved-product-card__title,
.compare-product-card__title {
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
}

.saved-product-card__meta,
.compare-product-card__meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.saved-product-card__price,
.compare-product-card__price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.saved-product-card__stock,
.compare-product-card__stock {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.saved-product-card__stock.is-empty,
.compare-product-card__stock.is-empty {
    color: #dc3545;
}

.saved-product-preferences {
    display: grid;
    gap: 0.75rem;
}

.saved-product-preferences__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.compare-table th {
    min-width: 180px;
    white-space: nowrap;
}

.compare-table td,
.compare-table th {
    padding: 0.9rem 1rem;
}

.compare-table-wrapper:focus-visible {
    outline: 3px solid rgba(243, 146, 0, 0.28);
    outline-offset: -3px;
}

@media (max-width: 991.98px) {
    .decision-workspace-toolbar,
    .decision-workspace-actions {
        display: grid;
        justify-items: stretch;
    }

    .decision-workspace-summary {
        grid-template-columns: 1fr;
    }

    .checkout-progress-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .checkout-flow-card__header,
    .checkout-flow-intro__header {
        display: grid;
        grid-template-columns: 1fr;
    }

    .checkout-summary-strip {
        grid-template-columns: 1fr;
    }

    .cart-summary-grid {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .saved-product-main {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .compare-table {
        display: none;
    }
}

[data-theme="dark"] .decision-workspace-hero {
    background: linear-gradient(135deg, rgba(243, 146, 0, 0.12), rgba(15, 23, 42, 0.94));
    border-color: rgba(243, 146, 0, 0.22);
}

[data-theme="dark"] .decision-workspace-tab,
[data-theme="dark"] .decision-workspace-summary__item,
[data-theme="dark"] .compare-product-card__snapshot,
[data-theme="dark"] .saved-product-card__media,
[data-theme="dark"] .compare-product-card__image-wrap {
    background: rgba(15, 23, 42, 0.78);
    border-color: var(--dk-border);
}

[data-theme="dark"] .decision-workspace-tab,
[data-theme="dark"] .compare-product-card__snapshot-list strong {
    color: var(--dk-text);
}

[data-theme="dark"] .decision-workspace-tab.is-active {
    background: rgba(243, 146, 0, 0.16);
    border-color: rgba(243, 146, 0, 0.22);
    color: #fbbf24;
}

[data-theme="dark"] .decision-workspace-tab__count {
    background: rgba(255, 255, 255, 0.08);
    color: var(--dk-text-muted);
}

[data-theme="dark"] .decision-workspace-eyebrow,
[data-theme="dark"] .decision-workspace-summary__label,
[data-theme="dark"] .compare-product-card__snapshot-label,
[data-theme="dark"] .compare-product-card__snapshot-list span {
    color: var(--dk-text-muted);
}

[data-theme="dark"] .decision-workspace-card {
    border-color: var(--dk-border) !important;
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.32);
}

[data-theme="dark"] .decision-workspace-card__toolbar {
    border-bottom-color: var(--dk-border);
}
