html, body { overflow-x: hidden; max-width: 100%; }
:root {
    --onyx: #000000; --ivory: #FAFAFA; --green: #262626; --green-deep: #000000;
    --gold: #E31E24; --gold-soft: #FF6B6B; --taupe: #6B6B6B; --hairline: #E5E5E5; --card: #FFFFFF;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body { font-family: 'IBM Plex Sans', sans-serif; color: var(--onyx); background: var(--ivory); }
  a { color: inherit; text-decoration: none; }
  img { max-width: 100%; display: block; }
  button, select { font-family: inherit; cursor: pointer; }

  .nav { position: sticky; top: 0; z-index: 50; background: #000000; color: var(--ivory); border-bottom: 1px solid rgba(227,30,36,0.25); }
  .nav-inner { max-width: 100%; margin: 0; display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; gap: 16px; flex-wrap: nowrap; }
  .logo { font-family: 'Big Shoulders Display', sans-serif; font-weight: 800; font-size: 1.5rem; letter-spacing: 0.02em; display: flex; align-items: baseline; gap: 8px; }
  .logo .logo-sub { font-family: 'IBM Plex Mono', monospace; font-weight: 500; font-size: 0.62rem; letter-spacing: 0.1em; opacity: 0.55; text-transform: uppercase; }
  .nav-links { display: flex; gap: 26px; align-items: center; font-size: 0.86rem; font-weight: 500; }
  .nav-links a { opacity: 0.85; }
  .nav-links a:hover, .nav-links a.current { opacity: 1; color: var(--gold-soft); }
  .nav-right { display: flex; align-items: center; gap: 20px; flex-wrap: nowrap; margin-left: auto; }
  @media (max-width: 900px) { .nav-links { display: none; } }
  @media (max-width: 480px) { .nav-inner { flex-wrap: wrap; row-gap: 10px; } .nav-right { flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-end; gap: 10px; } }

  .page-head {
    background: linear-gradient(180deg, var(--green-deep), var(--onyx));
    color: var(--ivory); padding: 23px 24px;
  }
  .page-head-inner { max-width: 100%; margin: 0; }
  .breadcrumb { font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; color: var(--gold-soft); margin-bottom: 10px; }
  .breadcrumb a { color: var(--gold-soft); }
  .breadcrumb a:hover { text-decoration: underline; }
  .breadcrumb span { color: rgba(255,255,255,0.65); }
  .page-head h1 { font-family: 'Big Shoulders Display', sans-serif; font-weight: 800; font-size: 2.2rem; text-transform: uppercase; }

  .scanner-bar { background: var(--green-deep); border-bottom: 1px solid rgba(227,30,36,0.2); padding: 13px 24px; }
  .scanner-bar-inner { max-width: 100%; margin: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
  .scanner {
    max-width: 620px; margin: 0 auto 14px;
    background: rgba(0,0,0,0.28);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 18px 20px;
    text-align: left;
  }
  .scanner-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem; letter-spacing: 0.08em;
    color: var(--gold); text-transform: uppercase;
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
  }
  .scanner-label .blink {
    width: 6px; height: 12px; background: var(--gold);
    animation: blink 1s steps(2) infinite;
  }
  @keyframes blink { 50% { opacity: 0; } }
  .scanner-input-row { display: flex; gap: 10px; }
  .scanner-input-row input {
    flex: 1; background: rgba(227,30,36,0.06); border: 1px solid rgba(227,30,36,0.45);
    border-radius: 6px;
    color: var(--ivory);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem; padding: 10px 12px;
    box-shadow: 0 0 0 4px rgba(227,30,36,0.06);
  }
  .scanner-input-row input::placeholder { color: #6B6B6B; }
  .scanner-input-row input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(227,30,36,0.14); }
  .scan-btn {
    background: var(--ivory); color: var(--onyx);
    border: none; padding: 10px 20px; border-radius: 6px;
    font-weight: 700; font-size: 0.88rem; white-space: nowrap;
  }
  .scan-btn:hover { background: #fff; }
  .scan-btn:disabled { background: rgba(255,255,255,0.15); color: #6B6B6B; cursor: not-allowed; }

  .vehicle-select-row { flex-wrap: nowrap; }
  .vehicle-select-row select {
    flex: 1; min-width: 90px; background: transparent;
    border: none; border-bottom: 1px solid rgba(255,255,255,0.15);
    color: var(--ivory); font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem; padding: 8px 4px; color-scheme: dark;
  }
  .vehicle-select-row select:disabled { color: #6B6B6B; }
  .vehicle-select-row select:focus { outline: none; border-bottom-color: var(--gold); }
  .vehicle-select-row select option { background: #14161a; color: var(--ivory); }
  .veh-clear-btn {
    background: none; border: none; color: var(--gold-soft);
    font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem;
    text-decoration: underline; margin-top: 10px; padding: 0; cursor: pointer;
  }
  @media (max-width: 700px) { .vehicle-select-row { flex-wrap: wrap; } }

  .layout { max-width: 100%; margin: 0; padding: 20px 24px 80px; display: grid; grid-template-columns: 240px 1fr; gap: 32px; }
  @media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }

  .sidebar { display: flex; flex-direction: column; gap: 28px; }
  .filter-group h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--taupe); margin-bottom: 12px; }
  .filter-option { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; padding: 6px 0; cursor: pointer; color: var(--green); font-weight: 600; }
  .filter-option input { accent-color: var(--gold); }
  .price-range { font-size: 0.8rem; color: var(--taupe); }

  #clearFiltersBtn { transition: background .15s, color .15s, border-color .15s; }
  #clearFiltersBtn:not(:disabled) { color: var(--onyx); border-color: var(--onyx) !important; cursor: pointer; }
  #clearFiltersBtn:not(:disabled):hover { background: var(--onyx); color: var(--ivory); }
  #clearFiltersBtn:disabled { color: var(--taupe); border-color: var(--hairline) !important; opacity: 0.55; cursor: not-allowed; }

  .results-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; flex-wrap: wrap; gap: 10px; }
  .results-count { font-size: 0.88rem; color: var(--taupe); }
  .sort-select {
    border: 1px solid var(--hairline); border-radius: 8px; padding: 8px 12px;
    font-size: 0.82rem; background: var(--card);
  }

  .pagination-bar { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 32px; }

  .request-part-row {
    margin-top: 48px; padding: 28px 24px;
    border-top: 1px solid var(--hairline);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
    text-align: center;
  }
  .request-part-text { font-size: 0.98rem; font-weight: 600; color: var(--onyx); }
  .request-part-btn {
    position: relative; overflow: hidden; isolation: isolate;
    display: inline-flex; align-items: center; gap: 9px;
    padding: 14px 28px;
    border-radius: 30px;
    border: 1px solid #FFE9A8;
    background: linear-gradient(135deg, #9A6E00, #E8B923 35%, #FFE9A8 50%, #E8B923 65%, #9A6E00);
    background-size: 260% 260%;
    color: #2A1A00; font-weight: 800; font-size: 0.94rem;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(184,134,11,0.45);
    animation: requestPartShine 2.4s ease-in-out infinite, requestPartGlow 2.4s ease-in-out infinite;
    transition: transform 0.15s;
  }
  .request-part-btn::after {
    content: ''; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,0.75) 48%, transparent 65%);
    background-size: 250% 100%;
    animation: requestPartSweep 2.4s ease-in-out infinite;
    pointer-events: none;
  }
  .request-part-btn span, .request-part-btn svg { position: relative; z-index: 2; }
  .request-part-btn:hover { transform: translateY(-2px) scale(1.04); }
  .request-part-btn svg { color: #25D366; flex-shrink: 0; }
  @keyframes requestPartShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  @keyframes requestPartSweep {
    0% { background-position: 200% 0; }
    60% { background-position: -40% 0; }
    100% { background-position: -40% 0; }
  }
  @keyframes requestPartGlow {
    0%, 100% { box-shadow: 0 4px 14px rgba(184,134,11,0.45); }
    50% { box-shadow: 0 4px 26px rgba(232,185,35,0.85); }
  }
  .page-nav-btn { border: 1px solid var(--hairline); background: var(--card); color: var(--onyx); padding: 9px 18px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: border-color .15s, color .15s; }
  .page-nav-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--green); }
  .page-nav-btn:disabled { color: var(--taupe); opacity: 0.5; cursor: not-allowed; }
  .page-indicator { font-size: 0.82rem; color: var(--taupe); font-family: 'IBM Plex Mono', monospace; }

  .product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
  @media (max-width: 1100px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
  @media (max-width: 860px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 560px) { .product-grid { grid-template-columns: 1fr; } }

  .results-bar-controls { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
  .show-count-group { display: flex; align-items: center; gap: 4px; font-size: 0.82rem; color: var(--taupe); }
  .show-count-label { margin-right: 4px; }
  .show-count-btn { background: none; border: none; color: var(--taupe); font-size: 0.82rem; font-weight: 600; cursor: pointer; padding: 4px 6px; border-radius: 4px; }
  .show-count-btn:hover { color: var(--onyx); }
  .show-count-btn.active { color: var(--gold); text-decoration: underline; }
  .grid-density-group { display: flex; gap: 4px; }
  .grid-density-btn { background: none; border: 1px solid var(--hairline); border-radius: 6px; padding: 6px; color: var(--taupe); cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .grid-density-btn:hover { color: var(--onyx); border-color: var(--taupe); }
  .grid-density-btn.active { color: var(--gold); border-color: var(--gold); background: rgba(227,30,36,0.06); }
  @media (max-width: 700px) { .grid-density-group { display: none; } }

  @media (min-width: 861px) {
    .product-grid.cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
    .product-grid.cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
    .product-grid.cols-4 { grid-template-columns: repeat(4, 1fr) !important; }
    .product-grid.cols-5 { grid-template-columns: repeat(5, 1fr) !important; }
  }
  @media (max-width: 860px) and (min-width: 561px) {
    .product-grid.cols-2, .product-grid.cols-3, .product-grid.cols-4, .product-grid.cols-5 { grid-template-columns: repeat(2, 1fr) !important; }
  }
  @media (max-width: 560px) {
    .product-grid.cols-2, .product-grid.cols-3, .product-grid.cols-4, .product-grid.cols-5 { grid-template-columns: 1fr !important; }
  }
  @media (max-width: 700px) {
    .product-body h3 { font-size: 0.86rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
    .product-body h3 .copy-title-btn { display: none; }
    .fits { display: none; }
    .part-no { font-size: 0.68rem; margin-bottom: 4px; }
  }

  .product-card { background: var(--card); border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
  .product-card:hover { border-color: var(--gold); transform: translateY(-2px); }
  .product-thumb { aspect-ratio: 1.1; background: #FFFFFF; position: relative; border-bottom: 1px solid var(--hairline); overflow: hidden; display: flex; align-items: center; justify-content: center; }
  .product-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
  .product-thumb svg { color: var(--green); }
  .stock-tag { position: absolute; top: 10px; left: 10px; background: var(--gold); color: var(--onyx); font-weight: 700; font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; padding: 3px 8px; border-radius: 4px; }
  .brand-tag { position: absolute; top: 10px; right: 10px; background: rgba(10,10,10,0.75); color: var(--ivory); font-size: 0.65rem; padding: 3px 8px; border-radius: 4px; }
  .product-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
  .part-no { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; color: var(--taupe); margin-bottom: 6px; }
  .product-body h3 { font-size: 0.96rem; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
  .fits { font-size: 0.78rem; color: var(--taupe); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
  .copy-title-btn {
    background: none; border: none; padding: 2px; color: var(--taupe); opacity: 0.6; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 4px;
  }
  .copy-title-btn:hover { opacity: 1; color: var(--green); background: rgba(0,0,0,0.05); }
  .price-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; }
  .price { font-weight: 700; font-size: 1.05rem; }
  .add-btn { background: var(--onyx); color: var(--ivory); border: none; padding: 7px 14px; border-radius: 6px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
  .add-btn:hover { background: var(--green); }

  footer { background: var(--card); border-top: 1px solid var(--hairline); }
  .footer-bottom { max-width: 100%; margin: 0; padding: 24px; font-size: 0.78rem; color: var(--taupe); display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; }

  .float-stack { position: fixed; bottom: 24px; right: 24px; z-index: 500; display: flex; flex-direction: column; gap: 12px; }
  .float-btn { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,0.25); border: none; }
  .whatsapp-btn { background: #25D366; color: white; }
  .backtotop-btn { background: var(--onyx); color: var(--ivory); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .backtotop-btn.show { opacity: 1; pointer-events: auto; }

  .nav-dropdown { position: relative; }
  .nav-dropdown > span { cursor: default; opacity: 0.85; display: inline-flex; align-items: center; gap: 4px; }
  .nav-dropdown:hover > span { opacity: 1; color: var(--gold-soft); }
  .nav-dropdown-panel {
    position: absolute; top: 100%; left: 0; margin-top: 14px; background: #16171A; border: 1px solid rgba(227,30,36,0.25);
    border-radius: 8px; padding: 6px 0; min-width: 190px; box-shadow: 0 14px 30px rgba(0,0,0,0.35);
    opacity: 0; pointer-events: none; transform: translateY(6px); transition: opacity 0.15s, transform 0.15s; z-index: 60;
  }
  .nav-dropdown-panel::before { content: ''; position: absolute; top: -14px; left: 0; right: 0; height: 14px; pointer-events: auto; }
  .nav-dropdown:hover .nav-dropdown-panel { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav-dropdown-panel a { display: block; padding: 10px 18px; font-size: 0.84rem; color: var(--ivory); opacity: 0.9; }
  .nav-dropdown-panel a:hover { background: rgba(255,255,255,0.06); color: var(--gold-soft); opacity: 1; }
  .nav-select {
    appearance: none; -webkit-appearance: none;
    background: rgba(255,255,255,0.04); color: var(--ivory);
    border: 1px solid rgba(227,30,36,0.35);
    font-size: 0.76rem; font-family: 'IBM Plex Mono', monospace;
    padding: 6px 26px 6px 10px; border-radius: 20px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23F5D76E' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat: no-repeat; background-position: right 8px center;
  }
  .nav-select option { background: #14161a; color: var(--ivory); }
  .nav-select-fix { color-scheme: dark; }
  .nav-select-fix option { background: #14161a; color: #FAFAFA; }

  .account-link { display:inline-flex; align-items:center;
    color: var(--ivory); font-size: 0.82rem; font-weight: 600; opacity: 0.9;
    border: 1px solid rgba(227,30,36,0.35); border-radius: 20px; padding: 6px 14px; white-space: nowrap;
  }
  .account-link:hover { opacity: 1; color: var(--gold-soft); border-color: var(--gold); }


#accountNavDropdownPanel { left: auto; right: 0; }

.nav-inner > * { flex-shrink: 0; }
.nav-links a, .nav-select, .account-link, .nav-dropdown > span { white-space: nowrap; }
.logo-full { height: 68px !important; width: auto !important; max-width: 300px !important; max-height: 68px !important; object-fit: contain !important; display: block !important; }
.ask-price-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; background: #FBEAEA; color: #C0392B; border: 1px solid rgba(192,57,43,0.3); border-radius: 6px; padding: 8px 12px; font-size: 0.8rem; font-weight: 700; text-decoration: none; white-space: nowrap; font-family: inherit; cursor: pointer; } .ask-price-btn:hover { background: #C0392B; color: #fff; } .ask-price-btn svg { color: #25D366; flex-shrink: 0; } .ask-price-btn:hover svg { color: #fff; }
.footer-social-row-compact { max-width: 1240px; margin: 0 auto; padding: 18px 24px 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .footer-social-label { font-size: 0.82rem; font-weight: 700; color: var(--onyx); } .footer-social-icon { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: transform 0.15s; } .footer-social-icon:hover { transform: translateY(-2px); }
