:root {
  color-scheme: light;
  --ink: #102132;
  --ink-strong: #061523;
  --muted: #5d6a76;
  --line: #d8e0e8;
  --line-strong: #aab8c6;
  --surface: #ffffff;
  --surface-cool: #eef5f8;
  --surface-blue: #0b2239;
  --accent: #d43228;
  --accent-dark: #a7211c;
  --teal: #167e7a;
  --amber: #f5b335;
  --shadow: 0 18px 60px rgba(16, 33, 50, 0.18);
  --max-width: 1180px;
  --radius: 8px;
  --header-height: 76px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-size: 16px;
  line-height: 1.5;
}

body.drawer-open,
body.modal-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

#catalog,
#carryall-lookup,
#fitment,
#shipping,
#policies,
#contact {
  scroll-margin-top: 20px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-150%);
  background: var(--ink-strong);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(216, 224, 232, 0.8);
  backdrop-filter: blur(16px);
}

.nav-shell,
.section-inner {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
}

.nav-shell {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 7px;
  background: var(--surface-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: inset 0 -4px 0 rgba(245, 179, 53, 0.85);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--ink-strong);
  font-size: 15px;
  line-height: 1.2;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent);
}

.mobile-menu-trigger {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-strong);
  padding: 9px 11px;
  font-size: 13px;
  font-weight: 900;
}

.mobile-menu-trigger:hover,
.mobile-menu-trigger:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.mobile-menu-trigger svg {
  width: 20px;
  height: 20px;
}

.mobile-menu-trigger path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.mobile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  display: grid;
  width: min(320px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu a {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  color: var(--ink-strong);
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
}

.mobile-menu a + a {
  border-top: 1px solid var(--line);
}

.mobile-menu a:hover,
.mobile-menu a:focus-visible {
  background: var(--surface-cool);
  color: var(--accent);
}

.cart-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-strong);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(16, 33, 50, 0.08);
}

.cart-trigger:hover,
.cart-trigger:focus-visible {
  border-color: var(--accent);
}

.cart-icon svg {
  width: 20px;
  height: 20px;
}

.cart-icon path,
.cart-icon circle,
.icon-button path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-count {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
}

.hero {
  min-height: calc(92vh - var(--header-height));
  display: grid;
  align-items: end;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(6, 21, 35, 0.92) 0%, rgba(6, 21, 35, 0.74) 42%, rgba(6, 21, 35, 0.18) 100%),
    url("../img/parts-counter-hero.png") center / cover no-repeat,
    var(--surface-blue);
}

.hero-inner {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 104px 0 44px;
}

.hero-copy {
  max-width: 650px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  margin: 24px 0 0;
  max-width: 590px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px 18px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.button-secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--ink-strong);
}

.hero .button-secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 70px;
}

.hero-proof div {
  min-height: 104px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(6, 21, 35, 0.48);
  backdrop-filter: blur(12px);
}

.hero-proof strong {
  display: block;
  color: #fff;
  font-size: 16px;
}

.hero-proof span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.quick-finder {
  padding: 34px 0;
  background: var(--surface-cool);
  border-bottom: 1px solid var(--line);
}

.finder-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(360px, 1.2fr);
  gap: 34px;
  align-items: end;
}

.quick-finder h2,
.section-heading h2,
.fitment-section h2,
.shipping-section h2,
.policies-section h2,
.contact-section h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
}

.quick-finder p,
.section-heading p,
.fitment-copy p,
.shipping-section p,
.policies-section p,
.contact-section p {
  margin: 12px 0 0;
  color: var(--muted);
  max-width: 670px;
}

.finder-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.42fr);
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink-strong);
  font-size: 15px;
  outline: none;
}

.field input,
.field select {
  height: 48px;
  padding: 0 13px;
}

.field textarea {
  min-height: 112px;
  resize: vertical;
  padding: 12px 13px;
  line-height: 1.4;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(22, 126, 122, 0.14);
}

.catalog-section {
  padding: 72px 0 84px;
  background: #fff;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: min(100%, 480px);
}

.category-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

.category-tabs button.active,
.category-tabs button:hover,
.category-tabs button:focus-visible {
  border-color: var(--surface-blue);
  background: var(--surface-blue);
  color: #fff;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.catalog-result-count {
  margin: -10px 0 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.product-card {
  display: grid;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(16, 33, 50, 0.08);
}

.product-media {
  display: grid;
  place-items: center;
  height: 214px;
  background: linear-gradient(135deg, #edf5f8, #f8fafc);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.product-media img {
  width: min(78%, 250px);
  height: 164px;
  object-fit: contain;
}

.product-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.stock {
  color: var(--teal);
}

.product-card h3 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 20px;
  line-height: 1.2;
}

.product-card h3 a {
  color: inherit;
  text-decoration: none;
}

.product-card h3 a:hover,
.product-card h3 a:focus-visible {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.product-fitment {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.product-fitment strong,
.product-fitment small {
  display: block;
}

.product-fitment small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.product-details,
.model-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-details span,
.model-tags span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.product-details span {
  background: var(--surface-cool);
  color: var(--ink);
}

.model-tags span {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--teal);
}

.product-buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.price {
  color: var(--ink-strong);
  font-size: 22px;
  font-weight: 950;
}

.product-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.product-actions .button {
  min-width: 116px;
}

.product-actions .button-secondary {
  min-height: 38px;
  padding: 9px 13px;
}

.shopify-product-link {
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
}

.shopify-product-link:hover,
.shopify-product-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.empty-state {
  margin: 24px 0 0;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-cool);
}

.carryall-section {
  padding: 76px 0;
  background: var(--surface-cool);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.carryall-controls {
  max-width: 760px;
  margin: 24px 0 18px;
}

.carryall-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.carryall-part-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 33, 50, 0.07);
}

.carryall-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.carryall-card-header h3 {
  margin: 4px 0 0;
  color: var(--ink-strong);
  font-size: 19px;
  line-height: 1.2;
}

.carryall-system,
.carryall-status {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.carryall-system {
  background: var(--surface-cool);
  color: var(--teal);
}

.carryall-status {
  flex: 0 0 auto;
  border: 1px solid rgba(212, 50, 40, 0.22);
  background: rgba(212, 50, 40, 0.08);
  color: var(--accent-dark);
  text-transform: none;
}

.carryall-meta,
.carryall-readiness {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.carryall-meta span,
.carryall-readiness span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.carryall-meta span {
  border: 1px solid var(--line);
  color: var(--ink);
}

.carryall-readiness span {
  background: var(--surface-cool);
  color: var(--muted);
}

.carryall-actions {
  margin-top: 2px;
}

.carryall-actions .button {
  min-height: 40px;
  padding: 10px 14px;
}

.fitment-section {
  padding: 76px 0;
  background:
    linear-gradient(90deg, rgba(11, 34, 57, 0.96), rgba(11, 34, 57, 0.86)),
    url("../img/service-bench.svg") right center / 52% auto no-repeat,
    var(--surface-blue);
  color: #fff;
}

.fitment-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 0.78fr);
  gap: 56px;
  align-items: start;
}

.fitment-section h2,
.fitment-copy p,
.check-list {
  color: #fff;
}

.fitment-copy p {
  opacity: 0.84;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  color: rgba(255, 255, 255, 0.82);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 179, 53, 0.18);
}

.fitment-form {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-help {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.fitment-form .button {
  width: 100%;
}

.form-note {
  min-height: 24px;
  margin: 0;
  color: var(--teal);
  font-size: 14px;
  font-weight: 800;
}

.request-preview {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.request-preview[hidden] {
  display: none;
}

.request-preview h3 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 16px;
}

.request-preview pre {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.request-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.shipping-section {
  padding: 78px 0;
  background: #f7fafc;
}

.shipping-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(420px, 1.3fr);
  gap: 42px;
  align-items: start;
}

.shipping-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.shipping-points article {
  min-height: 284px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.shipping-points img {
  width: 100%;
  height: 122px;
  object-fit: contain;
  margin-bottom: 18px;
  background: var(--surface-cool);
  border-radius: 6px;
}

.shipping-points h3 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 18px;
}

.shipping-points p {
  margin-top: 8px;
  font-size: 14px;
}

.policies-section {
  padding: 76px 0;
  background: #fff;
  border-top: 1px solid var(--line);
}

.policy-heading {
  align-items: center;
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.policy-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 248px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 33, 50, 0.07);
}

.policy-label {
  width: fit-content;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: var(--surface-cool);
  color: var(--teal);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.policy-card h3 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 18px;
  line-height: 1.18;
}

.policy-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.42;
}

.policy-note {
  margin: 18px 0 0;
  padding: 16px 18px;
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  background: var(--surface-cool);
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.static-cart-link {
  text-decoration: none;
}

.static-page {
  background: #fff;
}

.static-hero {
  padding: 74px 0 54px;
  background: var(--surface-cool);
  border-bottom: 1px solid var(--line);
}

.static-hero h1 {
  max-width: 780px;
  margin: 10px 0 0;
  color: var(--ink-strong);
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1;
}

.static-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.breadcrumb {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.breadcrumb a {
  color: var(--teal);
  text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.static-section {
  padding: 66px 0;
}

.detail-grid,
.static-two-column {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-media {
  min-height: 420px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.detail-media img {
  width: min(82%, 360px);
  height: 300px;
}

.detail-copy {
  display: grid;
  gap: 16px;
}

.detail-copy h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(36px, 4.5vw, 58px);
  line-height: 1.02;
}

.detail-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.detail-actions {
  margin-top: 8px;
}

.detail-actions .button-secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--ink-strong);
}

.static-two-column {
  align-items: start;
}

.static-two-column article {
  min-height: 214px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 33, 50, 0.07);
}

.static-two-column h2 {
  margin: 0 0 10px;
  color: var(--ink-strong);
  font-size: 24px;
}

.static-two-column p {
  color: var(--muted);
}

.contact-section {
  padding: 62px 0;
  background: #fff;
}

.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff 0%, #eef5f8 100%);
}

.site-footer {
  padding: 28px 0;
  background: var(--ink-strong);
  color: rgba(255, 255, 255, 0.72);
}

.footer-layout {
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-layout p {
  max-width: 760px;
  margin: 0;
  font-size: 12px;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
  background: rgba(6, 21, 35, 0);
  pointer-events: none;
  transition: background 180ms ease;
}

.cart-drawer[hidden],
.modal[hidden] {
  display: none;
}

.cart-drawer.open {
  background: rgba(6, 21, 35, 0.55);
  pointer-events: auto;
}

.cart-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(430px, 100%);
  height: 100%;
  background: #fff;
  transform: translateX(100%);
  transition: transform 220ms ease;
  box-shadow: var(--shadow);
}

.cart-drawer.open .cart-panel {
  transform: translateX(0);
}

.cart-header,
.cart-footer {
  padding: 22px;
}

.cart-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.cart-header h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 26px;
}

.cart-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink-strong);
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-button svg {
  width: 21px;
  height: 21px;
}

.cart-items {
  min-height: 0;
  overflow: auto;
  padding: 18px 22px;
}

.cart-empty {
  margin: 0;
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-cool);
}

.cart-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--surface-cool);
}

.cart-item h3 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 15px;
  line-height: 1.25;
}

.cart-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.quantity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.quantity-controls {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.quantity-controls button {
  width: 32px;
  height: 32px;
  border: 0;
  background: #fff;
  color: var(--ink-strong);
  font-weight: 900;
}

.quantity-controls button:hover,
.quantity-controls button:focus-visible {
  background: var(--surface-cool);
}

.quantity-controls span {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 32px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-size: 13px;
  font-weight: 900;
}

.remove-item {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-size: 13px;
  font-weight: 900;
}

.cart-footer {
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.subtotal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-strong);
  font-size: 18px;
}

.cart-footer p {
  margin: 12px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.cart-footer .button {
  width: 100%;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 21, 35, 0.62);
}

.modal-panel {
  position: relative;
  width: min(520px, 100%);
  padding: 32px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.modal-panel h2 {
  margin: 0;
  max-width: 420px;
  color: var(--ink-strong);
  font-size: 30px;
  line-height: 1.1;
}

.modal-panel p {
  margin: 14px 0 0;
  color: var(--muted);
}

.modal-link-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.modal-link-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-cool);
  color: var(--ink-strong);
  font-size: 14px;
  font-weight: 800;
}

.modal-link-list a {
  color: var(--teal);
  text-decoration: none;
}

.modal-link-list a:hover,
.modal-link-list a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.modal-link-list span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-trigger {
    display: inline-flex;
  }

  .hero-proof,
  .catalog-grid,
  .carryall-results,
  .shipping-points,
  .policy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finder-grid,
  .section-heading,
  .fitment-layout,
  .shipping-layout,
  .detail-grid,
  .static-two-column,
  .contact-band {
    display: grid;
    grid-template-columns: 1fr;
  }

  .section-heading,
  .contact-band {
    align-items: start;
  }

  .category-tabs {
    justify-content: flex-start;
  }

  .fitment-section {
    background:
      linear-gradient(90deg, rgba(11, 34, 57, 0.96), rgba(11, 34, 57, 0.9)),
      var(--surface-blue);
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 68px;
  }

  .nav-shell,
  .section-inner,
  .hero-inner {
    width: min(100% - 28px, var(--max-width));
  }

  .nav-shell {
    gap: 8px;
  }

  .brand {
    flex: 1 1 auto;
    gap: 8px;
    min-width: 0;
  }

  .brand strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand small {
    display: none;
  }

  .brand strong {
    font-size: 13px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .cart-trigger {
    flex: 0 0 auto;
    padding: 9px 10px;
    font-size: 13px;
  }

  .mobile-menu-trigger {
    flex: 0 0 auto;
  }

  .hero {
    min-height: 760px;
    align-items: end;
    background:
      linear-gradient(180deg, rgba(6, 21, 35, 0.54) 0%, rgba(6, 21, 35, 0.82) 42%, rgba(6, 21, 35, 0.98) 100%),
      url("../img/parts-counter-hero.png") 58% center / cover no-repeat,
      var(--surface-blue);
  }

  .hero-inner {
    padding: 240px 0 26px;
  }

  .hero-actions,
  .request-actions,
  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-proof,
  .finder-controls,
  .form-row,
  .catalog-grid,
  .carryall-results,
  .shipping-points,
  .policy-grid,
  .footer-layout {
    grid-template-columns: 1fr;
  }

  .catalog-section,
  .carryall-section,
  .fitment-section,
  .shipping-section,
  .policies-section,
  .static-section {
    padding: 54px 0;
  }

  .static-hero {
    padding: 54px 0 42px;
  }

  .static-hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .policy-card {
    min-height: auto;
  }

  .product-media,
  .detail-media {
    height: 190px;
    min-height: 190px;
  }

  .detail-media img {
    height: 150px;
  }

  .product-buy {
    display: grid;
    align-items: start;
  }

  .product-actions {
    justify-items: stretch;
  }

  .modal-link-list li {
    align-items: start;
    flex-direction: column;
  }

  .contact-band {
    padding: 24px;
  }

  .footer-layout {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
