/* Extracted from catalog.html */

/* =========================================================================
       BASE RESET & SHELL
       ========================================================================= */

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html, body { height: 100%; }

    body {
      font-family: var(--font-body);
      font-size: var(--text-body);
      color: var(--color-text-primary);
      background-color: var(--color-bg-base);
      overflow: hidden;
    }

    [data-theme="modern"] body {
      background-image: radial-gradient(circle, var(--dot-grid-color) 1px, transparent 1px);
      background-size: var(--dot-grid-size) var(--dot-grid-size);
    }

    /* =========================================================================
       APP LAYOUT
       ========================================================================= */

    .app-shell { display: flex; height: 100vh; padding-top: 36px; }

    /* =========================================================================
       SIDEBAR (shared pattern)
       ========================================================================= */

    .sidebar {
      width: 260px; flex-shrink: 0; display: flex; flex-direction: column;
      background: var(--color-bg-elevated); border-right: 1px solid var(--color-border);
      overflow-y: auto; transition: var(--transition-normal);
    }
    .sidebar__brand {
      display: flex; align-items: center; gap: var(--space-3);
      padding: var(--space-5) var(--space-5) var(--space-4);
      border-bottom: 1px solid var(--color-border); flex-shrink: 0;
    }
    .brand-logo {
      width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
      background: var(--color-primary); color: var(--color-text-inverse);
      font-family: var(--font-heading); font-weight: var(--heading-weight-primary);
      font-size: 1.375rem; letter-spacing: var(--tracking-tight); flex-shrink: 0;
    }
    [data-theme="industrial"] .brand-logo { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); border-radius: 0; }
    [data-theme="modern"] .brand-logo { border-radius: var(--radius-md); }
    .brand-name { display: flex; flex-direction: column; line-height: 1; }
    .brand-name__primary { font-family: var(--font-heading); font-weight: var(--heading-weight-primary); font-size: 1.125rem; letter-spacing: var(--tracking-wide); color: var(--color-text-primary); text-transform: uppercase; }
    .brand-name__sub { font-family: var(--font-body); font-size: var(--text-caption); color: var(--color-text-muted); letter-spacing: var(--tracking-wider); text-transform: uppercase; margin-top: 2px; }

    .sidebar__nav { flex: 1; padding: var(--space-3) 0; }
    .nav-section-label { padding: var(--space-3) var(--space-5) var(--space-1); font-size: var(--text-caption); font-family: var(--font-body); font-weight: var(--font-weight-semibold); color: var(--color-text-muted); letter-spacing: var(--tracking-widest); text-transform: uppercase; }
    .nav-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-5); color: var(--color-text-secondary); font-family: var(--font-body); font-size: var(--text-body-sm); font-weight: var(--font-weight-regular); text-decoration: none; cursor: pointer; border: none; background: none; width: 100%; text-align: left; transition: var(--transition-fast); border-left: 3px solid transparent; }
    .nav-item:hover { background: var(--color-primary-muted); color: var(--color-text-primary); border-left-color: var(--color-primary); }
    .nav-item.is-active { background: var(--color-primary-muted); color: var(--color-primary); font-weight: var(--font-weight-semibold); border-left-color: var(--color-primary); }
    [data-theme="industrial"] .nav-item.is-active { background: rgba(245, 166, 35, 0.12); }
    .nav-item__icon { width: 18px; height: 18px; opacity: 0.75; flex-shrink: 0; }
    .nav-item.is-active .nav-item__icon, .nav-item:hover .nav-item__icon { opacity: 1; }
    .nav-item__badge { margin-left: auto; background: var(--color-primary); color: var(--color-text-inverse); font-size: 10px; font-weight: var(--font-weight-bold); padding: 1px 6px; border-radius: var(--radius-full); line-height: 1.4; }

    .sidebar__profile { padding: var(--space-4) var(--space-5); border-top: 1px solid var(--color-border); display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
    .profile-avatar { width: 36px; height: 36px; background: var(--color-primary); color: var(--color-text-inverse); display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: var(--heading-weight-primary); font-size: 0.9rem; flex-shrink: 0; }
    [data-theme="industrial"] .profile-avatar { clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); }
    [data-theme="modern"] .profile-avatar { border-radius: var(--radius-full); }
    .profile-info { flex: 1; min-width: 0; }
    .profile-info__name { font-size: var(--text-body-sm); font-weight: var(--font-weight-semibold); color: var(--color-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .profile-info__role { font-size: var(--text-caption); color: var(--color-text-muted); }

    /* =========================================================================
       MAIN CONTENT
       ========================================================================= */

    .main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; margin-left: 260px; }

    /* Header with breadcrumb + search */
    .content-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 0 var(--space-6); height: 56px; flex-shrink: 0;
      background: var(--color-bg-elevated); border-bottom: 1px solid var(--color-border);
    }

    .breadcrumb { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-body-sm); color: var(--color-text-muted); flex-wrap: wrap; }
    .breadcrumb__link { color: var(--color-text-muted); text-decoration: none; cursor: pointer; transition: var(--transition-fast); }
    .breadcrumb__link:hover { color: var(--color-primary); }
    .breadcrumb__sep { color: var(--color-text-disabled); }
    .breadcrumb__current { color: var(--color-text-primary); font-weight: var(--font-weight-semibold); }
    .breadcrumb__back { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; background: transparent; border: 1px solid var(--color-border); border-radius: var(--radius-sm); color: var(--color-text-muted); font-size: var(--text-body-sm); cursor: pointer; transition: var(--transition-fast); }
    .breadcrumb__back:hover { background: var(--color-primary-muted); color: var(--color-primary); }
    .header-actions { display: flex; align-items: center; gap: var(--space-3); }

    /* ── Catalog mode toggle (OEM / Local) ── */
    .mode-toggle {
      display: inline-flex;
      padding: 3px;
      background: var(--glass-bg);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      border: 1px dashed var(--glass-border);
      border-radius: var(--radius-md);
      gap: 2px;
      flex-shrink: 0;
    }
    .mode-toggle button {
      background: transparent;
      border: none;
      color: var(--color-text-muted);
      padding: 4px 12px;
      border-radius: calc(var(--radius-md) - 3px);
      font-family: var(--font-mono);
      font-size: var(--text-caption);
      font-weight: var(--font-weight-semibold);
      text-transform: uppercase;
      letter-spacing: var(--tracking-wider);
      cursor: pointer;
      transition: all 0.2s var(--ease-out);
    }
    .mode-toggle button:hover {
      color: var(--color-text-accent);
    }
    .mode-toggle button.is-active {
      background: var(--color-primary-muted);
      color: var(--color-text-accent);
      box-shadow: 0 0 12px var(--glow-color-soft);
    }

    /* Search bar */
    .search-bar {
      display: flex; align-items: center; gap: var(--space-2);
      background: var(--color-bg-overlay); border: 1px solid var(--color-border);
      padding: var(--space-1) var(--space-3); width: 360px; transition: var(--transition-fast);
    }
    [data-theme="industrial"] .search-bar { border-radius: 0; }
    [data-theme="modern"] .search-bar { border-radius: var(--radius-md); }
    .search-bar:focus-within { border-color: var(--color-border-focus); box-shadow: var(--shadow-focus); }
    .search-bar svg { color: var(--color-text-muted); flex-shrink: 0; }
    .search-bar input {
      flex: 1; border: none; background: transparent; color: var(--color-text-primary);
      font-family: var(--font-body); font-size: var(--text-body-sm); outline: none;
      height: 32px;
    }
    .search-bar input::placeholder { color: var(--color-text-disabled); }

    /* Search dropdown */
    .search-dropdown {
      position: absolute; top: 100%; left: 0; right: 0;
      background: var(--color-bg-elevated); border: 1px solid var(--color-border);
      box-shadow: var(--shadow-lg); max-height: 400px; overflow-y: auto;
      display: none; z-index: var(--z-dropdown);
    }
    [data-theme="industrial"] .search-dropdown { border-radius: 0; }
    [data-theme="modern"] .search-dropdown { border-radius: var(--radius-md); }
    .search-dropdown.is-visible { display: block; }
    .search-result-item {
      display: flex; align-items: center; gap: var(--space-3);
      padding: var(--space-3) var(--space-4); cursor: pointer;
      border-bottom: 1px solid var(--color-border); transition: var(--transition-fast);
    }
    .search-result-item:hover { background: var(--color-primary-muted); }
    .search-result-item:last-child { border-bottom: none; }
    .search-result__oem { font-weight: var(--font-weight-semibold); color: var(--color-primary); font-size: var(--text-body-sm); }
    .search-result__name { color: var(--color-text-primary); font-size: var(--text-body-sm); }
    .search-result__vehicle { font-size: var(--text-caption); color: var(--color-text-muted); }

    /* =========================================================================
       PAGE BODY
       ========================================================================= */

    .page-body {
      flex: 1; overflow-y: auto; padding: var(--space-6);
      display: flex; flex-direction: column; gap: var(--space-5);
    }
    [data-theme="modern"] .page-body {
      background-image: radial-gradient(circle, var(--dot-grid-color) 1px, transparent 1px);
      background-size: var(--dot-grid-size) var(--dot-grid-size);
    }

    /* Level title */
    .level-title {
      font-family: var(--font-heading); font-weight: var(--heading-weight-primary);
      font-size: var(--text-h4); color: var(--color-text-primary);
      letter-spacing: var(--tracking-wide); text-transform: uppercase;
    }
    [data-theme="industrial"] .level-title { color: var(--color-primary); }

    /* Filter input (quick filter within level) */
    .level-filter {
      padding: var(--space-2) var(--space-3);
      background: var(--color-bg-overlay); border: 1px solid var(--color-border);
      color: var(--color-text-primary); font-family: var(--font-body);
      font-size: var(--text-body-sm); outline: none; width: 100%; max-width: 400px;
      transition: var(--transition-fast);
    }
    [data-theme="industrial"] .level-filter { border-radius: 0; }
    [data-theme="modern"] .level-filter { border-radius: var(--radius-md); }
    .level-filter:focus { border-color: var(--color-border-focus); box-shadow: var(--shadow-focus); }

    /* =========================================================================
       NAVIGATION CARDS
       ========================================================================= */

    .nav-grid {
      display: grid; gap: var(--space-4);
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    .nav-grid--years {
      grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    .nav-grid--parts {
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }

    .nav-card {
      display: flex; flex-direction: column; justify-content: center; align-items: center;
      padding: var(--space-5) var(--space-4); gap: var(--space-2);
      background: var(--color-bg-elevated); border: 1px solid var(--color-border);
      cursor: pointer; transition: var(--transition-fast); text-align: center;
      box-shadow: var(--shadow-sm); min-height: 80px;
    }
    [data-theme="industrial"] .nav-card { border-radius: 0; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); }
    [data-theme="modern"] .nav-card { border-radius: var(--radius-lg); }
    .nav-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
    .nav-card__name { font-family: var(--font-heading); font-weight: var(--heading-weight-secondary); font-size: var(--text-body); color: var(--color-text-primary); letter-spacing: var(--tracking-wide); }
    .nav-card__sub { font-size: var(--text-caption); color: var(--color-text-muted); }
    .nav-card__count { font-size: var(--text-caption); color: var(--color-primary); font-weight: var(--font-weight-semibold); }

    /* Year buttons (compact) */
    .nav-card--year { min-height: 48px; padding: var(--space-3); }
    .nav-card--year .nav-card__name { font-size: var(--text-h5); }

    /* =========================================================================
       PART CARDS
       ========================================================================= */

    .part-card {
      display: flex; flex-direction: column;
      background: var(--color-bg-elevated); border: 1px solid var(--color-border);
      box-shadow: var(--shadow-sm); cursor: pointer; transition: var(--transition-fast);
      overflow: hidden;
    }
    [data-theme="industrial"] .part-card { border-radius: 0; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); }
    [data-theme="modern"] .part-card { border-radius: var(--radius-lg); }
    .part-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-md); }

    .part-card__image {
      height: 120px; display: flex; align-items: center; justify-content: center;
      background: var(--color-bg-overlay); position: relative; overflow: hidden;
      color: var(--color-text-disabled);
    }
    .part-card__image img { width: 100%; height: 100%; object-fit: contain; }

    .part-card__body { padding: var(--space-3) var(--space-4); flex: 1; }
    .part-card__oem { font-family: var(--font-mono, monospace); font-size: var(--text-caption); color: var(--color-primary); font-weight: var(--font-weight-semibold); margin-bottom: var(--space-1); }
    .part-card__oem-sub { font-family: var(--font-mono, monospace); font-size: 10px; color: var(--color-text-muted); font-weight: var(--font-weight-regular); }
    .part-card__name { font-size: var(--text-body-sm); font-weight: var(--font-weight-semibold); color: var(--color-text-primary); line-height: 1.3; }

    /* Local mode — manufacturer badge + priority tier */
    .part-card__manu {
      display: inline-flex; align-items: center; gap: 4px;
      padding: 2px 8px; margin-bottom: var(--space-1);
      background: var(--glass-bg);
      border: 1px solid var(--glass-border);
      border-radius: var(--radius-sm);
      font-size: 10px;
      font-weight: var(--font-weight-bold);
      text-transform: uppercase;
      letter-spacing: var(--tracking-wider);
      color: var(--color-text-secondary);
    }
    .part-card__manu .manu-tier {
      color: var(--color-primary);
      font-size: 11px;
    }
    .part-card--tier1 {
      border-color: var(--color-border-accent);
      box-shadow: 0 0 12px var(--glow-color-soft);
    }
    .part-card--tier1 .part-card__manu {
      background: var(--color-primary-muted);
      border-color: var(--color-border-accent);
      color: var(--color-text-accent);
    }
    .part-card--tier2 .part-card__manu {
      border-color: var(--color-border-strong);
    }

    .part-card__footer {
      padding: var(--space-3) var(--space-4);
      border-top: 1px solid var(--color-border);
      display: flex; align-items: center; justify-content: space-between;
    }
    .part-card__price { font-weight: var(--font-weight-bold); color: var(--color-text-primary); }

    /* Stock badges */
    .stock-badge {
      display: inline-flex; align-items: center; gap: 4px;
      font-size: 11px; font-weight: var(--font-weight-bold);
      padding: 2px 8px; border-radius: var(--radius-full);
    }
    .stock-badge--local { background: var(--color-success-light); color: var(--color-success-dark); }
    .stock-badge--bodega { background: var(--color-warning-light); color: var(--color-warning-dark); }
    .stock-badge--none { background: var(--color-neutral-200); color: var(--color-neutral-600); }
    [data-theme="industrial"] .stock-badge--none { background: var(--color-neutral-700); color: var(--color-neutral-400); }

    /* =========================================================================
       DETAIL PANEL (slide-in from right)
       ========================================================================= */

    .detail-overlay {
      position: fixed; inset: 0; z-index: calc(var(--z-modal) - 2);
      background: rgba(0,0,0,0.3); backdrop-filter: blur(2px); display: none;
    }
    .detail-overlay.is-visible { display: block; }

    .detail-panel {
      position: fixed; top: 0; right: 0; bottom: 0;
      width: 440px; max-width: 100vw; z-index: calc(var(--z-modal) - 1);
      background: var(--color-bg-elevated); border-left: 1px solid var(--color-border);
      box-shadow: var(--shadow-xl); display: flex; flex-direction: column;
      transform: translateX(100%); transition: transform var(--duration-normal) var(--ease-in-out);
    }
    .detail-panel.is-open { transform: translateX(0); }

    .detail-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: var(--space-4) var(--space-5);
      border-bottom: 1px solid var(--color-border); flex-shrink: 0;
    }
    .detail-header h3 { font-family: var(--font-heading); font-size: var(--text-h5); font-weight: var(--heading-weight-secondary); color: var(--color-text-primary); }
    .detail-close {
      background: none; border: none; cursor: pointer; font-size: 1.4rem;
      color: var(--color-text-secondary); padding: var(--space-1);
    }
    .detail-close:hover { color: var(--color-text-primary); }

    .detail-body { flex: 1; overflow-y: auto; padding: var(--space-5); }

    .detail-section { margin-bottom: var(--space-5); }
    .detail-section__title {
      font-family: var(--font-heading); font-size: var(--text-body-sm);
      font-weight: var(--heading-weight-secondary); color: var(--color-text-muted);
      text-transform: uppercase; letter-spacing: var(--tracking-wider);
      margin-bottom: var(--space-3); padding-bottom: var(--space-2);
      border-bottom: 1px solid var(--color-border);
    }

    .detail-oem { font-family: var(--font-mono, monospace); font-size: var(--text-h5); color: var(--color-primary); font-weight: var(--font-weight-bold); margin-bottom: var(--space-2); }
    .detail-name { font-size: var(--text-body); font-weight: var(--font-weight-semibold); color: var(--color-text-primary); margin-bottom: var(--space-2); }
    .detail-desc { font-size: var(--text-body-sm); color: var(--color-text-secondary); line-height: 1.5; }

    /* Stock info */
    .stock-row { display: flex; align-items: center; justify-content: space-between; padding: var(--space-2) 0; }
    .stock-label { font-size: var(--text-body-sm); color: var(--color-text-secondary); }
    .stock-value { font-weight: var(--font-weight-bold); font-size: var(--text-body-sm); }
    .stock-value--ok { color: var(--color-success); }
    .stock-value--zero { color: var(--color-text-muted); }

    /* Bodega table */
    .bodega-table { width: 100%; font-size: var(--text-body-sm); border-collapse: collapse; }
    .bodega-table th { text-align: left; font-weight: var(--font-weight-semibold); color: var(--color-text-muted); font-size: var(--text-caption); text-transform: uppercase; letter-spacing: var(--tracking-wider); padding: var(--space-2) var(--space-2); border-bottom: 1px solid var(--color-border); }
    .bodega-table td { padding: var(--space-2); border-bottom: 1px solid var(--color-border); color: var(--color-text-primary); }

/* Alternatives list */
    .alt-item { display: flex; align-items: center; justify-content: space-between; padding: var(--space-2) 0; border-bottom: 1px solid var(--color-border); }
    .alt-item:last-child { border-bottom: none; }
    .alt-item__pn { font-weight: var(--font-weight-semibold); color: var(--color-text-primary); font-size: var(--text-body-sm); }
    .alt-item__mfr { font-size: var(--text-caption); color: var(--color-text-muted); }
    .alt-item__stock { font-size: var(--text-caption); }

    /* Compatible vehicles pagination */
    .compat-pager {
      display: flex; align-items: center; justify-content: space-between;
      gap: var(--space-2); margin-top: var(--space-4); padding-top: var(--space-3);
      border-top: 1px solid var(--color-border);
    }
    .compat-pager__btn {
      font-family: inherit; font-size: var(--text-caption); font-weight: var(--font-weight-semibold);
      color: var(--color-text-primary); background: var(--color-surface-2);
      border: 1px solid var(--color-border); border-radius: var(--radius-sm);
      padding: var(--space-2) var(--space-3); cursor: pointer; white-space: nowrap;
    }
    .compat-pager__btn:hover:not(:disabled) { background: var(--color-surface-3, var(--color-surface-2)); }
    .compat-pager__btn:disabled { opacity: 0.4; cursor: not-allowed; }
    .compat-pager__info { font-size: var(--text-caption); color: var(--color-text-muted); text-align: center; flex: 1; }

    /* Add to cart section */
    .detail-footer {
      padding: var(--space-4) var(--space-5); border-top: 1px solid var(--color-border);
      flex-shrink: 0; background: var(--color-bg-elevated);
    }
    .qty-row { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
    .qty-btn {
      width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
      border: 1px solid var(--color-border); background: var(--color-bg-base);
      color: var(--color-text-primary); cursor: pointer; font-size: 1.2rem;
      transition: var(--transition-fast);
    }
    [data-theme="industrial"] .qty-btn { border-radius: 0; }
    [data-theme="modern"] .qty-btn { border-radius: var(--radius-sm); }
    .qty-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
    .qty-display { font-weight: var(--font-weight-bold); font-size: var(--text-body); min-width: 30px; text-align: center; }

    /* Buttons */
    .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); padding: 0 var(--space-5); height: 40px; font-family: var(--font-body); font-size: var(--text-body-sm); font-weight: var(--font-weight-semibold); border: 1px solid transparent; cursor: pointer; transition: var(--transition-fast); white-space: nowrap; letter-spacing: var(--tracking-wide); }
    [data-theme="industrial"] .btn { border-radius: 0; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); text-transform: uppercase; }
    [data-theme="modern"] .btn { border-radius: var(--radius-md); }
    .btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); border-color: var(--btn-primary-border); }
    .btn-primary:hover { background: var(--btn-primary-bg-hover); }
    .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
    .btn-ghost { background: var(--btn-ghost-bg); color: var(--btn-ghost-text); border-color: var(--btn-ghost-border); }
    .btn-ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }

    /* =========================================================================
       PAGINATION
       ========================================================================= */

    .pagination { display: flex; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-4) 0; }
    .page-item { min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--color-border); background: var(--color-bg-elevated); color: var(--color-text-secondary); font-size: var(--text-body-sm); font-weight: var(--font-weight-semibold); cursor: pointer; transition: var(--transition-fast); }
    [data-theme="industrial"] .page-item { border-radius: 0; }
    [data-theme="modern"] .page-item { border-radius: var(--radius-md); }
    .page-item:hover { border-color: var(--color-primary); color: var(--color-primary); }
    .page-item.is-active { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-text-inverse); }
    .page-item.is-disabled { opacity: 0.4; cursor: not-allowed; }
    .page-item--wide { padding: 0 var(--space-4); gap: var(--space-2); }

    /* =========================================================================
       EMPTY STATE
       ========================================================================= */

    .empty-state {
      display: none; flex-direction: column; align-items: center; justify-content: center;
      padding: var(--space-10) var(--space-6); text-align: center; gap: var(--space-3);
    }
    .empty-state.is-visible { display: flex; }
    .empty-state__title { font-family: var(--font-heading); font-weight: var(--heading-weight-secondary); font-size: var(--text-h4); color: var(--color-text-primary); }
    .empty-state__subtitle { font-size: var(--text-body-sm); color: var(--color-text-muted); max-width: 400px; }

    /* =========================================================================
       LOADING SPINNER
       ========================================================================= */

    .loading { display: none; justify-content: center; padding: var(--space-10); }
    .loading.is-visible { display: flex; }
    .spinner { width: 40px; height: 40px; border: 3px solid var(--color-border); border-top-color: var(--color-primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* =========================================================================
       CART FAB + SIDEBAR
       ========================================================================= */

    .cart-fab {
      position: fixed; bottom: var(--space-6); right: var(--space-6);
      width: 56px; height: 56px; z-index: var(--z-sticky);
      display: flex; align-items: center; justify-content: center;
      background: var(--color-primary); color: var(--color-text-inverse);
      border: none; cursor: pointer; box-shadow: var(--shadow-lg);
      transition: var(--transition-fast);
    }
    [data-theme="industrial"] .cart-fab { border-radius: 0; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%); }
    [data-theme="modern"] .cart-fab { border-radius: var(--radius-full); }
    .cart-fab:hover { transform: scale(1.08); }
    .cart-fab__badge {
      position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px;
      padding: 0 5px; border-radius: var(--radius-full);
      background: var(--color-error); color: #fff; font-size: 11px;
      font-weight: var(--font-weight-bold); display: none;
      align-items: center; justify-content: center; line-height: 1;
    }

    .cart-sidebar {
      position: fixed; top: 0; right: 0; bottom: 0; width: 360px; max-width: 100vw;
      z-index: var(--z-modal); background: var(--color-bg-elevated);
      border-left: 1px solid var(--color-border); box-shadow: var(--shadow-xl);
      display: flex; flex-direction: column;
      transform: translateX(100%); transition: transform var(--duration-normal) var(--ease-in-out);
    }
    .cart-sidebar.open { transform: translateX(0); }

    .cart-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-border); flex-shrink: 0; }
    .cart-header h3 { font-family: var(--font-heading); font-size: var(--text-h5); font-weight: var(--heading-weight-secondary); color: var(--color-text-primary); }
    .cart-items { flex: 1; overflow-y: auto; padding: var(--space-3) var(--space-4); }
    .cart-item { display: flex; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); }
    .cart-item:last-child { border-bottom: none; }
    .cart-footer { padding: var(--space-4) var(--space-5); border-top: 1px solid var(--color-border); flex-shrink: 0; background: var(--color-bg-elevated); }
    .cart-totals { display: flex; flex-direction: column; gap: var(--space-1); font-size: var(--text-body-sm); color: var(--color-text-secondary); }
    .cart-overlay { position: fixed; inset: 0; z-index: calc(var(--z-modal) - 1); background: rgba(0,0,0,0.3); backdrop-filter: blur(2px); display: none; }
    .cart-overlay.open { display: block; }

    /* =========================================================================
       THEME BAR
       ========================================================================= */

    .theme-bar { position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-toast); display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); padding: var(--space-2) var(--space-4); background: var(--color-bg-overlay); border-bottom: 1px solid var(--color-border); backdrop-filter: blur(8px); height: 36px; }
    .theme-bar__label { font-size: var(--text-caption); color: var(--color-text-muted); font-family: var(--font-body); letter-spacing: var(--tracking-wide); text-transform: uppercase; }
    .theme-btn { display: inline-flex; align-items: center; gap: var(--space-1); padding: 3px var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-full); background: transparent; color: var(--color-text-secondary); font-family: var(--font-body); font-size: var(--text-caption); font-weight: var(--font-weight-semibold); cursor: pointer; transition: var(--transition-fast); }
    .theme-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
    .theme-btn.is-active { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-text-inverse); }

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

    /* ── Vehicle Selector ── */
    .vehicle-selector {
      background: var(--color-bg-elevated);
      border-bottom: 2px solid var(--color-primary-muted, rgba(245,166,35,0.2));
      padding: var(--space-3) var(--space-5);
      flex-shrink: 0;
    }
    .vehicle-selector__inner {
      display: flex;
      align-items: flex-end;
      gap: var(--space-3);
      flex-wrap: wrap;
    }
    .vs-group { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 140px; }
    .vs-label {
      font-size: var(--text-caption, 0.75rem);
      font-weight: var(--font-weight-semibold, 600);
      color: var(--color-text-muted);
      text-transform: uppercase;
      letter-spacing: var(--tracking-wider, 0.04em);
    }
    .vs-select {
      padding: var(--space-2) var(--space-3);
      background: var(--color-bg-base);
      color: var(--color-text-primary);
      border: 1px solid var(--color-border);
      font-family: var(--font-body);
      font-size: var(--text-body-sm, 0.875rem);
      cursor: pointer;
      transition: var(--transition-fast);
      appearance: auto;
    }
    [data-theme="industrial"] .vs-select { border-radius: 0; }
    [data-theme="modern"] .vs-select { border-radius: var(--radius-md); }
    .vs-select:focus { border-color: var(--color-primary); outline: none; box-shadow: var(--shadow-focus); }
    .vs-select:disabled { opacity: 0.4; cursor: not-allowed; }
    .vs-arrow {
      color: var(--color-primary);
      font-size: 1.4rem;
      font-weight: 700;
      padding-bottom: 6px;
      flex-shrink: 0;
    }
    .vs-clear {
      background: none;
      border: 1px solid var(--color-border);
      color: var(--color-text-muted);
      padding: var(--space-2) var(--space-3);
      cursor: pointer;
      font-size: 1rem;
      transition: var(--transition-fast);
    }
    [data-theme="industrial"] .vs-clear { border-radius: 0; }
    [data-theme="modern"] .vs-clear { border-radius: var(--radius-md); }
    .vs-clear:hover { color: var(--color-error); border-color: var(--color-error); }

    @media (max-width: 768px) {
      .sidebar { position: fixed; left: -260px; z-index: var(--z-modal); transition: left var(--duration-normal) var(--ease-in-out); height: 100vh; }
      .sidebar.is-open { left: 0; }
      .search-bar { width: 200px; }
      .detail-panel { width: 100%; }
      .nav-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
      .vehicle-selector__inner { flex-direction: column; }
      .vs-arrow { display: none; }
    }
