:root {
  --bg: #eff2f7;
  --surface: #ffffff;
  --ink: #101827;
  --muted: #617187;
  --line: #d6dde7;
  --brand: #f59e0b;
  --brand-ink: #7b341e;
  --deep: #0a1428;
  --hero-image: url('/assets/media/backgrounds/hero-sunroof.jpg');
  --strip-image: url('/assets/media/backgrounds/strip-workshop.jpg');
  --support-image: url('/assets/media/backgrounds/support-garage.jpg');
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: 'Barlow', sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 44%);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.utility-bar {
  border-bottom: 1px solid #212a3a;
  background: #111827;
  color: #dbe4f3;
  font-size: 0.84rem;
}

.utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 42px;
}

.utility-links {
  display: flex;
  gap: 1rem;
  font-weight: 600;
}

.utility-links a:hover {
  color: #ffffff;
}

.utility-note {
  margin: 0;
  color: #b3bfd2;
}

.main-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
}

.header-row {
  display: grid;
  grid-template-columns: auto minmax(250px, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 86px;
}

.brand-block {
  display: grid;
  gap: 0.15rem;
}

.brand {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.03em;
  font-size: 2.1rem;
  line-height: 1;
}

.brand span {
  color: var(--brand);
}

.brand-block small {
  color: var(--muted);
  font-weight: 500;
}

.header-search {
  display: flex;
  gap: 0.4rem;
}

.header-search input,
.header-search button {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font: inherit;
}

.header-search input {
  width: 100%;
  padding: 0 0.85rem;
}

.header-search button {
  background: #f4f6fa;
  padding: 0 0.95rem;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.phone-cta {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-weight: 700;
  background: #fff;
}

.cart-btn {
  border: 1px solid #f7c873;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-weight: 800;
  background: #ffefca;
}

.cart-btn span {
  color: var(--brand-ink);
  margin-left: 0.35rem;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle.is-open .icon-hamburger {
  display: none;
}

.menu-toggle.is-open .icon-close {
  display: block;
}

/* ── Mobile nav drawer ──────────────────────────────
   Appears directly below the sticky header on mobile.
   Hidden on desktop.                                  */
.mobile-nav {
  display: none;
  position: sticky;
  top: 86px; /* matches header height */
  z-index: 48;
  background: #fff;
  border-bottom: 2px solid var(--brand);
  box-shadow: 0 16px 48px rgba(8, 16, 30, 0.16);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.is-open {
  max-height: 80vh;
  overflow-y: auto;
}

.mnav-inner {
  padding: 1rem 0 1.4rem;
}

.mnav-main {
  display: grid;
  gap: 0.1rem;
}

.mnav-link {
  display: block;
  padding: 0.75rem 0.25rem;
  font-weight: 700;
  font-size: 1.03rem;
  border-bottom: 1px solid #f0f3f8;
}

.mnav-link:hover {
  color: var(--brand-ink);
}

.mnav-divider {
  height: 1px;
  background: var(--line);
  margin: 1rem 0 0.85rem;
}

.mnav-cat-label {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.mnav-categories {
  display: grid;
  gap: 0.4rem;
}

.mnav-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.mnav-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  background: #f9fbff;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.mnav-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  color: var(--muted);
}

.mnav-group.is-open .mnav-arrow {
  transform: rotate(180deg);
}

.mnav-group-items {
  display: none;
  flex-direction: column;
  padding: 0.35rem 0.9rem 0.75rem;
  gap: 0.05rem;
}

.mnav-group.is-open .mnav-group-items {
  display: flex;
}

.mnav-group-items .category-link {
  padding: 0.6rem 0.4rem;
  font-weight: 600;
  border-radius: 6px;
  background: transparent;
  border: 0;
  text-align: left;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.mnav-group-items .category-link:hover {
  background: #f4f6fa;
  color: var(--brand-ink);
}
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.category-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 54px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 700;
}

.site-nav a:hover {
  color: var(--brand-ink);
}

.category-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.55rem;
}

.category-nav > li {
  position: relative;
}

.cat-trigger {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
}

.cat-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
  padding: 0.45rem;
  display: none;
  z-index: 30;
}

.category-nav > li:hover .cat-dropdown,
.category-nav > li:focus-within .cat-dropdown {
  display: grid;
  gap: 0.3rem;
}

.category-link {
  text-align: left;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
}

.category-link:hover {
  border-color: var(--line);
  background: #f9fbff;
}

.hero {
  background:
    linear-gradient(130deg, rgba(15, 26, 49, 0.72), rgba(28, 44, 79, 0.58), rgba(31, 53, 93, 0.72)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  color: #f4f8ff;
  padding: 4rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.4rem;
}

.hero-side {
  display: grid;
  gap: 0.8rem;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  min-height: 320px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #0e1b34;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  background-size: cover;
  background-position: center;
}

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.48));
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(8, 14, 29, 0.45);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.hero-prev {
  left: 12px;
}

.hero-next {
  right: 12px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  z-index: 3;
  display: flex;
  gap: 0.35rem;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #f8b133;
}

.hero-caption {
  position: absolute;
  left: 14px;
  bottom: 34px;
  z-index: 3;
  margin: 0;
  color: #ffffff;
  font-weight: 700;
}

.kicker {
  margin: 0;
  color: #ffd78f;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  font-size: 0.8rem;
}

.hero-copy h1 {
  margin: 0.55rem 0 0;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.02em;
  line-height: 0.94;
  font-size: clamp(2.3rem, 6vw, 4.6rem);
}

.hero-copy p {
  margin: 1rem 0 0;
  max-width: 63ch;
  color: #d8e2f3;
}

.hero-actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.72rem 1.25rem;
  font-weight: 800;
  border: 1px solid transparent;
}

.btn-primary {
  background: #f8b133;
  color: #1f2937;
}

.btn-light {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.hero-panel {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(7, 17, 33, 0.54);
  border-radius: 18px;
  padding: 1rem 1.1rem;
}

.hero-panel h3 {
  margin: 0;
}

.hero-panel ul {
  margin: 0.85rem 0 0;
  padding-left: 1.1rem;
  color: #d4def1;
}

.panel-link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
  color: #ffd78f;
}

.trust-strip {
  background:
    linear-gradient(120deg, rgba(5, 12, 24, 0.86), rgba(5, 12, 24, 0.65)),
    var(--strip-image);
  background-size: cover;
  background-position: center;
  color: #f0f6ff;
  padding: 1.8rem 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.trust-grid article {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.04);
}

.trust-grid h4 {
  margin: 0;
}

.trust-grid p {
  margin: 0.45rem 0 0;
  color: #d3def0;
}

.brands-strip {
  border-top: 1px solid #dde4ef;
  border-bottom: 1px solid #dde4ef;
  background: #ffffff;
}

.brands-inner {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.6rem 0;
}

.brand-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9fbff;
  padding: 0.4rem 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.systems-section {
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
}

.systems-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.system-card {
  position: relative;
  overflow: hidden;
  min-height: 270px;
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #ffffff;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 24px rgba(8, 15, 29, 0.08);
}

.system-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 17, 31, 0.08), rgba(11, 17, 31, 0.76));
}

.system-card > * {
  position: relative;
  z-index: 1;
}

.system-card-motors {
  background-image: url('/assets/media/backgrounds/hero-sunroof.jpg');
}

.system-card-tracks {
  background-image: url('/assets/media/backgrounds/sunroof-highlander.jpg');
}

.system-card-seals {
  background-image: url('/assets/media/backgrounds/sunroof-jaguar.jpg');
}

.system-kicker {
  margin: 0 0 0.3rem;
  color: #ffd78f;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
}

.system-card h3 {
  margin: 0;
  font-size: 1.5rem;
}

.system-card p:last-of-type {
  margin: 0.5rem 0 0;
  color: #e6edf8;
}

.system-action {
  margin-top: 0.9rem;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.section {
  padding: 2.5rem 0;
}

.section-head h2 {
  margin: 0;
  font-size: 2rem;
}

.section-head p {
  margin-top: 0.45rem;
  color: var(--muted);
}

.filters {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 0.6rem;
}

.filters input,
.filters select,
.filters button {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font: inherit;
}

.filters input,
.filters select {
  padding: 0 0.8rem;
  background: #fff;
}

.filters button {
  padding: 0 1rem;
  background: var(--brand);
  color: #1b2637;
  font-weight: 800;
}

.catalog-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 20px rgba(8, 15, 29, 0.04);
}

.product-card img,
.img-fallback {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: #e6edf7;
}

.img-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5d6f88;
  font-weight: 700;
}

.card-body {
  padding: 0.85rem;
  display: grid;
  gap: 0.38rem;
}

.card-meta {
  margin: 0;
  font-size: 0.8rem;
  color: #607189;
}

.card-title {
  margin: 0;
  font-size: 1.03rem;
}

.card-price {
  font-size: 1.02rem;
  font-weight: 800;
}

.card-actions button {
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid #f1cb87;
  background: #fff5df;
  color: #583a12;
  font-weight: 800;
}

.value-section {
  background:
    linear-gradient(130deg, rgba(239, 242, 247, 0.98), rgba(239, 242, 247, 0.96)),
    var(--support-image);
  background-size: cover;
  background-position: center;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.value-grid article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 1rem;
}

.value-grid h3 {
  margin: 0;
}

.value-grid p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: 1.5rem 0;
}

.account-page {
  min-height: calc(100vh - 128px);
}

.account-breadcrumb {
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.account-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.03em;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.account-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  padding: 1.2rem;
  box-shadow: 0 10px 24px rgba(8, 15, 29, 0.05);
}

.account-card-wide {
  margin-top: 1rem;
}

.account-card h2 {
  margin: 0;
}

.account-form {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.75rem;
}

.account-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.account-form input,
.account-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 46px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  background: #fff;
}

.account-form textarea {
  min-height: 120px;
  resize: vertical;
}

.account-submit {
  border: 0;
  border-radius: 10px;
  min-height: 48px;
  background: #d62828;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.account-rules {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.account-rules h3 {
  margin: 0;
}

.account-rules ul {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.account-status {
  margin-top: 1rem;
  font-weight: 700;
}

.account-status.ok {
  color: #15803d;
}

.account-status.error {
  color: #b91c1c;
}

.account-dashboard.hidden,
.account-forms.hidden {
  display: none;
}

.footer-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.footer-grid h4 {
  margin: 0;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.03em;
  font-size: 1.5rem;
}

.footer-grid p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.footer-grid nav {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
}

.footer-bottom {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.footer-legal {
  margin: 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: min(420px, 100vw);
  height: 100vh;
  background: #fff;
  border-left: 1px solid var(--line);
  z-index: 70;
  display: grid;
  grid-template-rows: auto 1fr auto;
  transition: right 0.22s ease;
}

.cart-drawer.open {
  right: 0;
}

.cart-header,
.cart-footer {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header button {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 0.45rem 0.7rem;
}

.cart-items {
  padding: 1rem;
  overflow-y: auto;
  display: grid;
  gap: 0.65rem;
  align-content: start;
}

.cart-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem;
}

.cart-item h4 {
  margin: 0;
}

.cart-item p {
  margin: 0.3rem 0;
  color: var(--muted);
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.qty-row button {
  border: 1px solid var(--line);
  border-radius: 7px;
  min-height: 30px;
  background: #fff;
  padding: 0 0.5rem;
}

.cart-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.cart-footer button {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: #25d366;
  color: #072b12;
  font-weight: 800;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(12, 18, 31, 0.56);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.overlay.show {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 980px) {
  .utility-inner {
    flex-direction: column;
    justify-content: center;
    padding: 0.55rem 0;
  }

  .header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 0;
    min-height: auto;
  }

  .brand-block {
    flex: 1 1 auto;
  }

  .header-search {
    order: 3;
    width: 100%;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .menu-toggle {
    display: flex;
  }

  .mobile-nav {
    display: block;
  }

  /* Hide the desktop two-row category nav on mobile; the mobile
     drawer replaces it entirely. */
  .category-nav-wrap {
    display: none;
  }

  .hero-grid,
  .trust-grid,
  .systems-grid,
  .value-grid,
  .account-grid,
  .filters {
    grid-template-columns: 1fr;
  }

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

  .hero-carousel {
    min-height: 260px;
  }

  .footer-grid {
    flex-direction: column;
  }
}
