/* ===========================================================
   Frontline Auto Supply — Core Stylesheet
   Professional automotive parts e-commerce styling
   =========================================================== */

:root {
  --navy: #0e1f33;
  --navy-light: #15304e;
  --red: #c8102e;
  --red-dark: #a30d25;
  --gray-bg: #f4f5f7;
  --gray-line: #dfe2e7;
  --gray-text: #5a6472;
  --white: #ffffff;
  --black: #111111;
  --radius: 4px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 18px rgba(0,0,0,0.10);
  --max-width: 1240px;
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}

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

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-base);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 14px; color: var(--navy); }
.text-muted { color: var(--gray-text); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 8px;
  display: block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--white); }

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline-light:hover { background: var(--white); color: var(--navy); }

.btn-block { width: 100%; }
.btn-small { padding: 9px 18px; font-size: 0.82rem; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-top {
  background: var(--navy);
  color: #cdd6e0;
  font-size: 0.8rem;
}
.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.header-top a { color: #cdd6e0; }
.header-top a:hover { color: var(--white); }
.header-top-links { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.header-top-links span.sep { opacity: 0.35; }
.header-top-links.header-top-secondary { flex-wrap: nowrap; }

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 16px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand img { height: 56px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.brand-text .brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--navy);
  text-transform: uppercase;
}
.brand-text .brand-tag {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--red);
  font-weight: 700;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: auto;
}
.main-nav a {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--navy);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

.header-actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.header-actions > * + * { margin-left: 18px; }

.search-form {
  display: flex;
  border: 1px solid var(--gray-line);
  border-radius: 24px;
  overflow: visible;
  position: relative;
  flex: 1;
}
.search-form input {
  border: none;
  padding: 10px 18px;
  font-size: 0.92rem;
  width: 100%;
  outline: none;
  font-family: var(--font-base);
  background: transparent;
  border-top-left-radius: 24px;
  border-bottom-left-radius: 24px;
}
.search-form button {
  background: var(--navy);
  border: none;
  color: var(--white);
  padding: 0 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-top-right-radius: 24px;
  border-bottom-right-radius: 24px;
}
.search-form button svg {
  width: 20px;
  height: 20px;
  display: block;
}
.search-form button:hover { background: var(--red); }
.search-bar-row {
  border-top: 1px solid var(--gray-line);
  padding: 12px 0;
}

.cart-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
}
.cart-link svg { width: 22px; height: 22px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle svg { width: 26px; height: 26px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background-color: var(--navy);
  background-image:
    linear-gradient(90deg, rgba(14,31,51,0.92) 0%, rgba(14,31,51,0.82) 45%, rgba(14,31,51,0.62) 100%),
    url("../images/hero-bg.webp");
  background-size: cover;
  background-position: center right;
  color: var(--white);
  overflow: hidden;
}
/* extra darkening layer so text always reads clearly */
.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(8,18,30,0.35) 0%, rgba(8,18,30,0.55) 100%);
  z-index: 1;
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding: 88px 0 96px;
  max-width: 640px;
}
.hero h1 {
  color: var(--white);
  font-size: 2.9rem;
  margin-bottom: 18px;
}
.hero p {
  color: #c6cfdc;
  font-size: 1.08rem;
  max-width: 520px;
}
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.hero-graphic {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 56%;
  opacity: 0.16;
  pointer-events: none;
}
.hero-graphic svg { width: 100%; height: 100%; }

.hero-stripe {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red) 33%, var(--navy-light) 33%, var(--navy-light) 100%);
}

/* ---------- Trust / Stats Strip ---------- */
.trust-strip {
  background: var(--gray-bg);
  border-bottom: 1px solid var(--gray-line);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.trust-item {
  padding: 32px 24px;
  text-align: center;
  border-right: 1px solid var(--gray-line);
}
.trust-item:last-child { border-right: none; }
.trust-item .num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--red);
  display: block;
  margin-bottom: 4px;
}
.trust-item .label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-tight { padding: 48px 0; }
.section-dark { background: var(--navy); color: var(--white); }
.section-dark h2, .section-dark h1, .section-dark h3 { color: var(--white); }
.section-dark p { color: #c6cfdc; }
.section-gray { background: var(--gray-bg); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 36px;
}
.section-head .heading-block { max-width: 640px; }

/* ---------- Feature / Value Cards ---------- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.network-band { background: var(--navy); color: var(--white); }
.network-inner { max-width: 880px; }
.network-band .eyebrow { color: var(--red); }
.network-band h2 { color: var(--white); margin: 6px 0 14px; }
.network-lead { color: #c6cfdc; font-size: 1.05rem; line-height: 1.6; margin: 0 0 26px; }
.network-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.network-point { display: flex; gap: 12px; align-items: flex-start; font-size: 0.95rem; line-height: 1.5; color: #e7ecf3; }
.network-point strong { color: var(--white); }
.network-ico {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy-light); color: var(--white);
}
.network-ico svg { width: 22px; height: 22px; }
@media (max-width: 860px) {
  .network-points { grid-template-columns: 1fr; gap: 16px; }
}
.value-card {
  background: var(--white);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  padding: 28px;
}
.value-card .icon {
  width: 46px; height: 46px;
  margin-bottom: 16px;
  color: var(--red);
}
.value-card h3 { margin-bottom: 8px; }
.value-card p { color: var(--gray-text); margin-bottom: 0; font-size: 0.95rem; }

/* ---------- Category Tiles ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.category-tile {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  transition: background .15s ease, transform .15s ease;
  border-bottom: 4px solid var(--red);
}
.category-tile:hover { background: var(--navy-light); transform: translateY(-2px); }
.category-tile .cat-name { font-size: 1.15rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; }
.category-tile .cat-count { color: #aebbcd; font-size: 0.85rem; margin-top: 8px; }
.category-tile .cat-arrow { align-self: flex-end; font-size: 1.3rem; color: var(--red); margin-top: 12px; }

/* ---------- Product Grid / Cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.product-card {
  background: var(--white);
  border: 1px solid var(--gray-line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: #d4dae2;
}
.product-card .pc-image {
  position: relative;
  background: var(--gray-bg);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--gray-line);
}
.product-card .pc-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s ease;
}
.product-card:hover .pc-image img { transform: scale(1.04); }
/* discount badge overlay */
.pc-badge {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 2;
  background: var(--red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 4px 9px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(200,16,46,0.3);
}
.pc-body { padding: 16px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.pc-cat {
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 6px;
}
.pc-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--navy);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.55em;
}
.pc-title a { color: inherit; }
.pc-title a:hover { color: var(--red); }
.pc-meta {
  font-size: 0.76rem;
  color: var(--gray-text);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-bottom: 14px;
  margin-top: auto;
}
.pc-price { font-size: 1.2rem; font-weight: 800; color: var(--navy); }
.pc-price-was {
  font-size: 0.85rem; color: var(--gray-text);
  text-decoration: line-through;
}
.pc-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 11px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background .15s, transform .1s;
  width: 100%;
}
.pc-cta:hover { background: var(--red); }
.pc-cta:active { transform: scale(0.98); }
.pc-cta.added { background: #1d7a43; }
.pc-cta-icon { display: inline-flex; }
.pc-cta-icon svg { width: 16px; height: 16px; }

/* ---------- Placeholder product image (SVG icon) ---------- */
.part-icon { width: 46%; height: 46%; color: var(--navy); opacity: 0.55; }

/* ---------- Shop Layout ---------- */
.shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
}
.filter-panel {
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  padding: 20px;
  align-self: start;
  position: sticky;
  top: 100px;
}
.filter-panel h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 2px solid var(--navy);
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.filter-group { margin-bottom: 22px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  padding: 5px 0;
  cursor: pointer;
  color: var(--navy);
}
.filter-group input[type="checkbox"],
.filter-group input[type="radio"] {
  accent-color: var(--red);
  width: 16px; height: 16px;
}
.filter-count { color: var(--gray-text); font-size: 0.8rem; margin-left: auto; }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.toolbar select {
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  padding: 9px 14px;
  font-family: var(--font-base);
  font-size: 0.9rem;
  background: var(--white);
}
.results-count { font-size: 0.9rem; color: var(--gray-text); }

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
}
.pagination a:hover { background: var(--gray-bg); }
.pagination .active { background: var(--red); color: var(--white); border-color: var(--red); }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--gray-text);
  padding: 18px 0;
  border-bottom: 1px solid var(--gray-line);
}
.breadcrumb a { color: var(--red); font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 8px; color: #b9c0c9; }
.breadcrumb .current { color: var(--navy); font-weight: 600; }

/* ---------- Product Detail Page ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 40px 0;
}
.product-gallery .main-image {
  background: var(--gray-bg);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-gallery .main-image .part-icon { width: 38%; height: 38%; opacity: 0.45; }

.product-info .pi-category {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 8px;
}
.product-info h1 { font-size: 1.85rem; margin-bottom: 14px; }
.product-info .pi-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 18px;
}
.product-info .pi-sku-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--gray-text);
  padding: 16px 0;
  border-top: 1px solid var(--gray-line);
  border-bottom: 1px solid var(--gray-line);
  margin-bottom: 22px;
}
.product-info .pi-sku-row strong { color: var(--navy); }

.qty-cart-row {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
}
.qty-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  overflow: hidden;
}
.qty-input button {
  background: var(--gray-bg);
  border: none;
  width: 40px; height: 48px;
  font-size: 1.1rem;
  cursor: pointer;
  font-weight: 700;
}
.qty-input input {
  width: 50px;
  border: none;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  height: 48px;
  font-family: var(--font-base);
  -moz-appearance: textfield;
}
.qty-input input::-webkit-outer-spin-button,
.qty-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.feature-checklist {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.feature-checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.feature-checklist svg { width: 18px; height: 18px; color: var(--red); flex-shrink: 0; }

/* Product description content (from CSV HTML, restyled) */
.product-description h2 {
  font-size: 1.3rem;
  margin-top: 36px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--navy);
}
.product-description h1 { display: none; } /* title already rendered in header */
.product-description ul { padding-left: 22px; margin-bottom: 16px; }
.product-description li { margin-bottom: 6px; }
.product-description .table-scroll {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0 24px;
  -webkit-overflow-scrolling: touch;
}
.product-description table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.92rem;
}
.product-description table th,
.product-description table td {
  border: 1px solid var(--gray-line);
  padding: 10px 12px;
  text-align: left;
}
.product-description table th {
  background: var(--navy);
  color: var(--white);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}
.product-description table tr:nth-child(even) td { background: var(--gray-bg); }
.product-description .fitment-note {
  background: #fff4f0;
  border: 1px solid #f4c9bd;
  border-left: 4px solid var(--red);
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 0.93rem;
  margin-bottom: 14px;
}
.product-description strong { color: var(--navy); }

/* FAQ accordion-like simple styling */
.faq-item { border-bottom: 1px solid var(--gray-line); padding: 14px 0; }
.faq-item p:first-of-type { font-weight: 700; margin-bottom: 6px; }

/* ---------- Related Products ---------- */
.related-products { margin-top: 56px; }

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: var(--red);
  color: var(--white);
  text-align: center;
  padding: 48px 0;
}
.cta-banner h2 { color: var(--white); margin-bottom: 8px; }
.cta-banner p { color: #ffe2e6; margin-bottom: 24px; }

/* ---------- Testimonials ---------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  padding: 26px;
}
.testimonial-card .stars { color: var(--red); margin-bottom: 12px; letter-spacing: 2px; }
.testimonial-card p { font-style: italic; color: var(--navy); }
.testimonial-card .author { font-weight: 700; font-size: 0.9rem; margin-top: 12px; color: var(--gray-text); }

/* ---------- Contact / Forms ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: var(--font-base);
  font-size: 0.95rem;
  background: var(--white);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

.info-card {
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.info-card h3 { margin-bottom: 6px; }
.info-card .info-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.info-card .info-row svg { width: 20px; height: 20px; color: var(--red); flex-shrink: 0; margin-top: 2px; }
.info-card .info-row:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #c6cfdc;
}
.footer-top {
  padding: 56px 0 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
}
.footer-brand img { height: 60px; margin-bottom: 16px; }
.footer-brand p { font-size: 0.9rem; color: #9fb0c5; }
.footer-col h4 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #aebbcd; font-size: 0.92rem; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid #233a55;
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #7e91a9;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom a { color: #aebbcd; }
.footer-payment { display: flex; gap: 10px; align-items: center; }
.footer-payment svg { height: 22px; width: auto; color: #aebbcd; }

/* ---------- Trust Badge Row (footer) ---------- */
.assurance-strip {
  background: var(--gray-bg);
  border-top: 1px solid var(--gray-line);
  border-bottom: 1px solid var(--gray-line);
}
.assurance-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.assurance-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 24px 8px;
}
.assurance-item svg { width: 30px; height: 30px; color: var(--red); }
.assurance-item span { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--navy); }

/* ---------- Generic Page Header (about, contact, etc.) ---------- */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: 48px 0;
  text-align: center;
}
.page-header h1 { color: var(--white); margin-bottom: 6px; }
.page-header p { color: #c6cfdc; margin: 0; }

/* ---------- About page specifics ---------- */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-split .graphic-box {
  background: var(--gray-bg);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-split .graphic-box img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.about-split .graphic-box svg { width: 50%; height: 50%; color: var(--navy); opacity: 0.5; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 24px;
}
.stat-box {
  text-align: center;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  padding: 22px 12px;
}
.stat-box .num { font-size: 1.8rem; font-weight: 800; color: var(--red); }
.stat-box .label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-text); margin-top: 4px; }

/* ---------- Mobile Menu ---------- */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--navy);
  color: var(--white);
  z-index: 200;
  padding: 24px;
  overflow-y: auto;
}
.mobile-nav.open { display: block; }
.mobile-nav-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.mobile-nav-header img { height: 36px; }
.mobile-nav-close { background: none; border: none; color: var(--white); cursor: pointer; }
.mobile-nav-close svg { width: 26px; height: 26px; }
.mobile-nav a {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 0;
  border-bottom: 1px solid #233a55;
}
.mobile-nav a.cta-link { color: var(--red); }

/* ===========================================================
   Responsive
   =========================================================== */

/* Large desktop: give the grid a bit more room and a touch more
   breathing space at very wide viewports */
@media (min-width: 1440px) {
  :root { --max-width: 1320px; }
  .product-grid { grid-template-columns: repeat(5, 1fr); }
}

/* Tablet landscape / small desktop */
@media (max-width: 1180px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .main-nav { gap: 14px; }
  .main-nav a { font-size: 0.8rem; }
  .brand-text .brand-name { font-size: 1.1rem; }
  .brand-text .brand-tag { font-size: 0.62rem; letter-spacing: 0.12em; }
}

@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .assurance-grid { grid-template-columns: repeat(3, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 2.1rem; }
  .hero h1 { font-size: 2.5rem; }
}

/* ---------- Tablet portrait: switch to mobile-style navigation ---------- */
@media (max-width: 1100px) {
  /* Header */
  .header-top-secondary { display: none; }
  .header-top-tagline { width: 100%; justify-content: center; text-align: center; }
  .header-top .container { justify-content: center; }
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-actions { gap: 12px; }
  .header-actions > * + * { margin-left: 12px; }
  .brand img { height: 46px; }
  .brand-text .brand-name { font-size: 1.1rem; }
  .brand-text .brand-tag { font-size: 0.62rem; letter-spacing: 0.12em; }
  /* Mobile cart: show the icon + a red count badge next to the hamburger.
     Markup is <a.cart-link><span aria-hidden><svg></span><span>Cart (<span.cart-count>0</span>)</span></a>
     so we keep the icon span, collapse the "Cart ( )" wrapper text, and float
     the count as a badge over the icon's top-right corner. */
  .cart-link {
    position: relative;
    gap: 0;
    padding: 4px;
  }
  .cart-link span[aria-hidden="true"] {
    display: inline-flex;
    align-items: center;
  }
  .cart-link svg { width: 26px; height: 26px; }
  .cart-link > span:not([aria-hidden]) {
    position: absolute;
    top: -3px;
    right: -7px;
    font-size: 0;          /* hides the literal "Cart (" and ")" text nodes */
    line-height: 0;
  }
  .cart-link .cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    color: var(--white);
    background: var(--red);
    border-radius: 999px;
    box-sizing: border-box;
  }

  /* Layout grids */
  .shop-layout { grid-template-columns: 1fr; gap: 24px; }
  .filter-panel { position: static; }
  .product-detail { grid-template-columns: 1fr; gap: 28px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: 1fr; gap: 18px; }
  .about-split { grid-template-columns: 1fr; gap: 32px; }
  .about-split .graphic-box { order: -1; aspect-ratio: 16/9; }
  .contact-layout { grid-template-columns: 1fr; gap: 32px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; gap: 0; }

  /* Hero */
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
  .hero-inner { padding: 48px 0 60px; max-width: 100%; }
  .hero-graphic { width: 70%; opacity: 0.10; }
  .hero-actions .btn { flex: 1 1 auto; text-align: center; }

  /* Sections */
  .section { padding: 48px 0; }
  .section-tight { padding: 36px 0; }
  .section-head { margin-bottom: 24px; }
  .section-head .btn { align-self: flex-start; }
}

/* ---------- Phones (landscape phones / large phones) ---------- */
@media (max-width: 700px) {
  body { font-size: 15px; }
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.5rem; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .category-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .value-grid { grid-template-columns: 1fr; gap: 16px; }
  .assurance-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .trust-item { padding: 22px 14px; }
  .trust-item .num { font-size: 1.6rem; }
  .footer-top { grid-template-columns: 1fr; gap: 30px; padding: 40px 0 28px; text-align: left; }
  .footer-brand img { height: 48px; }
  .header-top-links { font-size: 0.7rem; gap: 8px; }
  .feature-checklist { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }

  /* Hero */
  .hero h1 { font-size: 1.9rem; }
  .hero-inner { padding: 40px 0 52px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .hero-graphic { width: 90%; opacity: 0.08; }

  /* Product detail */
  .product-info h1 { font-size: 1.5rem; }
  .product-info .pi-price { font-size: 1.6rem; }
  .pi-sku-row { flex-direction: column; gap: 8px; }
  .qty-cart-row { flex-direction: column; }
  .qty-input { justify-content: center; }
  .qty-input input { flex: 1; }

  /* Toolbar / pagination */
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar select { width: 100%; }
  .results-count { text-align: center; }
  .pagination { flex-wrap: wrap; }

  /* CTA banner */
  .cta-banner { padding: 36px 0; }
  .cta-banner .btn { width: 100%; }

  /* Filter panel as collapsible-feeling block */
  .filter-panel { padding: 16px; }
  .search-form input { font-size: 0.88rem; padding: 10px 14px; }
}

/* ---------- Small phones ---------- */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  h1 { font-size: 1.6rem; }
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 0.95rem; }
  .eyebrow { font-size: 0.7rem; }

  /* Header: scale brand so it never crowds the hamburger */
  .header-main { gap: 12px; padding: 12px 0; }
  .brand { gap: 8px; }
  .brand img { height: 40px; }
  .brand-text .brand-name { font-size: 0.98rem; letter-spacing: 0; }
  .brand-text .brand-tag { font-size: 0.56rem; letter-spacing: 0.08em; }
  .nav-toggle { padding: 4px; }
  .nav-toggle svg { width: 24px; height: 24px; }
  .search-bar-row { padding: 10px 0; }

  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pc-body { padding: 11px 11px 13px; }
  .pc-cat { font-size: 0.62rem; margin-bottom: 4px; }
  .pc-title { font-size: 0.82rem; line-height: 1.3; min-height: 2.4em; margin-bottom: 6px; }
  .pc-meta { font-size: 0.7rem; margin-bottom: 8px; }
  .pc-price { font-size: 1.02rem; }
  .pc-price-was { font-size: 0.76rem; }
  .pc-price-row { margin-bottom: 10px; gap: 4px 6px; }
  .pc-cta { padding: 10px 8px; font-size: 0.76rem; gap: 5px; }
  .pc-cta-icon svg { width: 14px; height: 14px; }
  .pc-badge { font-size: 0.66rem; padding: 3px 7px; top: 8px; left: 8px; }
  .pc-rating { margin-bottom: 6px; }

  .category-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .category-tile { padding: 18px 14px; min-height: 110px; }
  .category-tile .cat-name { font-size: 0.95rem; }

  .trust-grid { grid-template-columns: 1fr 1fr; }
  .assurance-grid { grid-template-columns: 1fr 1fr; }
  .assurance-item { padding: 16px 6px; }
  .assurance-item svg { width: 24px; height: 24px; }
  .assurance-item span { font-size: 0.68rem; }

  .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-box { padding: 16px 8px; }
  .stat-box .num { font-size: 1.4rem; }

  .testimonial-card { padding: 20px; }

  .btn { width: 100%; }
  .hero-actions .btn,
  .cta-banner .btn { width: 100%; }
  .section-head { flex-direction: column; align-items: stretch; }
  .section-head .btn { width: 100%; text-align: center; }

  .product-info .pi-price { font-size: 1.4rem; }
  .breadcrumb { font-size: 0.78rem; overflow-x: auto; white-space: nowrap; }

  /* Mobile nav tweaks */
  .mobile-nav { padding: 18px; }
  .mobile-nav a { font-size: 1rem; padding: 12px 0; }
}

/* Very small phones (360px and below) */
@media (max-width: 360px) {
  .container { padding: 0 12px; }
  .brand img { height: 36px; }
  .brand-text .brand-name { font-size: 0.88rem; }
  .brand-text .brand-tag { font-size: 0.5rem; letter-spacing: 0.06em; }
  .hero h1 { font-size: 1.4rem; }
  .product-grid { gap: 8px; }
  .pc-body { padding: 10px 9px 11px; }
  .pc-title { font-size: 0.78rem; }
  .pc-price { font-size: 0.95rem; }
  .pc-cta { padding: 9px 6px; font-size: 0.72rem; }
  .pc-cta-label { white-space: nowrap; }
  .category-tile { padding: 14px 10px; min-height: 96px; }
  .co-pay-list { gap: 8px; }
  .pay-radio { padding: 10px 11px; }
}


/* ===========================================================
   Additions: a11y, product photos, cart, checkout, legal pages
   =========================================================== */

/* Prevent any accidental horizontal scroll on small screens */
html, body { overflow-x: hidden; }

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 1000;
  background: var(--red);
  color: var(--white);
  padding: 12px 18px;
  font-weight: 700;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

/* Visually hidden (screen-reader only) */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Stronger visible focus for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

/* Product photos (replace icon placeholders when supplied) */
.pc-image { position: relative; }
.pc-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-gallery .main-image .pc-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--white);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed var(--gray-line);
  border-radius: var(--radius);
}
.empty-state h3 { margin-bottom: 8px; }

/* ---------- Cart page ---------- */
.cart-empty {
  text-align: center;
  padding: 60px 20px;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
}
.cart-empty h2 { margin-bottom: 8px; }
.cart-empty .btn { margin-top: 16px; }

.cart-table {
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}
.cart-head,
.cart-row {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1.4fr 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}
.cart-head {
  background: var(--gray-bg);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-text);
  border-bottom: 1px solid var(--gray-line);
}
.cart-row {
  border-bottom: 1px solid var(--gray-line);
}
.cart-row:last-child { border-bottom: none; }
.cart-row-name { font-weight: 700; }
.cart-row-name a:hover { color: var(--red); }
.cart-row-sku { font-size: 0.8rem; margin-top: 2px; }
.cart-row-price, .cart-row-line { font-weight: 700; }
.cart-row-remove {
  background: none;
  border: none;
  color: var(--red);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px;
}
.cart-row-remove:hover { color: var(--red-dark); }

.cart-summary {
  display: flex;
  justify-content: flex-end;
}
.cart-summary-box {
  width: 360px;
  max-width: 100%;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  padding: 24px;
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.95rem;
}
.cart-summary-total {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--gray-line);
  padding-top: 14px;
  margin: 14px 0 18px;
  font-size: 1.15rem;
  font-weight: 800;
}

/* ---------- Checkout ---------- */
.checkout-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 40px;
  align-items: start;
}
.checkout-summary {
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 100px;
}
.checkout-summary h2 { font-size: 1.2rem; margin-bottom: 16px; }
.checkout-summary .cart-table { margin-bottom: 16px; }
.checkout-summary .cart-head { display: none; }
.checkout-summary .cart-row {
  grid-template-columns: 1fr auto;
  padding: 12px 0;
  gap: 8px;
}
.checkout-summary .cart-row-price,
.checkout-summary .cart-row-qty,
.checkout-summary .cart-row-remove { display: none; }
.checkout-summary .cart-summary { display: block; }
.checkout-summary .cart-summary-box {
  width: 100%;
  border: none;
  padding: 0;
}
.checkout-form h2 { font-size: 1.3rem; margin-bottom: 16px; }

/* ---------- Legal / policy pages ---------- */
.legal-content {
  max-width: 800px;
}
.legal-content h2 {
  font-size: 1.25rem;
  margin-top: 32px;
  margin-bottom: 12px;
}
.legal-content p { margin-bottom: 14px; }
.legal-content a { color: var(--red); font-weight: 600; }
.legal-content a:hover { text-decoration: underline; }

/* ---------- Responsive: cart & checkout ---------- */
@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; gap: 28px; }
  .checkout-summary { position: static; }
}
@media (max-width: 700px) {
  .cart-head { display: none; }
  .cart-row {
    grid-template-columns: 1fr auto;
    gap: 8px 16px;
    padding: 16px;
  }
  .cart-row-main { grid-column: 1 / -1; }
  .cart-row-price::before { content: "Price: "; color: var(--gray-text); font-weight: 400; }
  .cart-row-line::before { content: "Subtotal: "; color: var(--gray-text); font-weight: 400; }
  .cart-row-qty { grid-column: 1; }
  .cart-row-remove { grid-column: 2; justify-self: end; }
  .cart-summary-box { width: 100%; }
}

/* ---------- Mobile: trim sticky header so only the brand row stays pinned ---------- */
@media (max-width: 700px) {
  .site-header { position: static; }
  .header-main { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 1px solid var(--gray-line); }
}

/* ===========================================================
   Reviews
   =========================================================== */

/* Star rendering */
.stars { display: inline-flex; align-items: center; line-height: 1; color: var(--red); letter-spacing: 1px; }
.stars .star { color: var(--red); }
.stars .star:not(.filled):not(.half) { color: #d6dae0; }
.stars .star.half { position: relative; color: #d6dae0; display: inline-block; }
.stars .star.half .star-fill {
  position: absolute; left: 0; top: 0; width: 50%; overflow: hidden; color: var(--red);
}
.stars.stars-sm { font-size: 0.85rem; }

/* Product card rating */
.pc-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; min-height: 18px; }
.pc-rating-count { font-size: 0.78rem; color: var(--gray-text); font-weight: 600; }
.pc-rating-empty .pc-rating-none { font-size: 0.74rem; color: #aab2bd; }

/* Product page rating line under H1 */
.pi-rating { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pi-rating .stars { font-size: 1.05rem; }
.pi-rating-score { font-weight: 700; font-size: 0.9rem; color: var(--navy); }
.pi-rating-link { font-size: 0.88rem; color: var(--red); font-weight: 600; }
.pi-rating-link:hover { text-decoration: underline; }

/* Reviews section */
.reviews-section { margin-top: 48px; padding-top: 8px; }
.reviews-summary {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  align-items: center;
  padding: 28px;
  background: var(--gray-bg);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  margin-bottom: 32px;
}
.reviews-score { text-align: center; }
.reviews-score-num { font-size: 3rem; font-weight: 800; color: var(--navy); line-height: 1; }
.reviews-score .stars { font-size: 1.2rem; margin: 8px 0; }
.reviews-score-count { font-size: 0.82rem; color: var(--gray-text); }

.reviews-breakdown { display: flex; flex-direction: column; gap: 8px; }
.rb-row { display: grid; grid-template-columns: 56px 1fr 32px; align-items: center; gap: 12px; }
.rb-label { font-size: 0.8rem; color: var(--gray-text); white-space: nowrap; }
.rb-track { height: 9px; background: #e2e6ea; border-radius: 6px; overflow: hidden; }
.rb-fill { display: block; height: 100%; background: var(--red); }
.rb-count { font-size: 0.8rem; color: var(--gray-text); text-align: right; }

/* Individual review cards */
.reviews-list { display: flex; flex-direction: column; }
.review-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--gray-line);
}
.review-card:first-child { padding-top: 0; }
.review-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
}
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.review-title { font-size: 1rem; font-weight: 800; margin: 0; }
.review-byline {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 0.82rem; color: var(--gray-text); margin-bottom: 8px;
}
.review-author { font-weight: 700; color: var(--navy); }
.review-sep { opacity: 0.5; }
.review-verified {
  display: inline-flex; align-items: center;
  background: #e8f3ec; color: #1d7a43;
  font-size: 0.72rem; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.review-text { margin: 0 0 10px; color: var(--navy); }
.review-helpful { font-size: 0.8rem; color: var(--gray-text); }
.review-helpful-btn {
  background: none; border: 1px solid var(--gray-line);
  border-radius: 20px; padding: 3px 12px; margin-left: 6px;
  font-size: 0.78rem; font-weight: 600; color: var(--gray-text);
  cursor: default;
}

.reviews-more { text-align: center; padding: 22px 0; font-size: 0.9rem; color: var(--gray-text); }
.reviews-more .btn { margin-left: 10px; }

.reviews-empty { padding: 24px 0 8px; }
.reviews-empty p { margin-bottom: 6px; }

/* Review submission form */
.review-form-wrap {
  margin-top: 40px;
  padding: 28px;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  background: var(--white);
}
.review-form-wrap h3 { margin-bottom: 6px; }
.review-form-note { font-size: 0.9rem; margin-bottom: 20px; }
.form-label-text { display: block; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }

.star-input { display: inline-flex; gap: 4px; }
.star-input-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1.7rem; line-height: 1; color: var(--red);
  padding: 0 2px;
}
.star-input-btn.on { color: var(--red); }

.review-photo-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 24px; cursor: pointer;
  border: 2px dashed var(--gray-line); border-radius: var(--radius);
  text-align: center; transition: border-color .15s, background .15s;
}
.review-photo-drop:hover { border-color: var(--red); background: #fff7f5; }
.review-photo-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gray-bg); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 400;
}
.review-photo-text { font-size: 0.85rem; color: var(--gray-text); }
.review-photo-previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.review-photo-thumb {
  width: 72px; height: 72px; border-radius: var(--radius);
  background-color: var(--gray-bg); background-size: cover; background-position: center;
  border: 1px solid var(--gray-line);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: var(--gray-text); font-weight: 700;
}
.review-submit-note {
  background: #e8f3ec; border: 1px solid #b9dcc6; color: #1d7a43;
  padding: 14px 16px; border-radius: var(--radius); margin-bottom: 18px;
  font-weight: 600; font-size: 0.92rem;
}

@media (max-width: 700px) {
  .reviews-summary { grid-template-columns: 1fr; gap: 22px; padding: 22px; text-align: center; }
  .reviews-breakdown { max-width: 360px; margin: 0 auto; width: 100%; }
  .review-card { grid-template-columns: 40px 1fr; gap: 12px; }
  .review-avatar { width: 36px; height: 36px; font-size: 0.8rem; }
  .review-form-wrap { padding: 20px; }
}

/* ===========================================================
   Product image gallery (multi-image)
   =========================================================== */
.gallery-main {
  background: var(--gray-bg);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 12px;
}
.gallery-main-img,
.gallery-main .pc-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--white);
}
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px;
}
.gallery-thumb {
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 0;
  cursor: pointer;
  aspect-ratio: 1/1;
  overflow: hidden;
  transition: border-color .15s;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb:hover { border-color: var(--navy); }
.gallery-thumb.active { border-color: var(--red); border-width: 2px; }

@media (max-width: 700px) {
  .gallery-thumbs { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 8px; }
}

/* ===========================================================
   Mobile / older-browser compatibility fallbacks
   These keep the site working on older Safari (iOS < 15),
   Samsung Internet, and other browsers lacking aspect-ratio
   or flexbox gap. Modern browsers ignore these.
   =========================================================== */

/* --- aspect-ratio fallback (padding-top technique) --- */
@supports not (aspect-ratio: 1 / 1) {
  .product-card .pc-image,
  .product-gallery .main-image,
  .gallery-main,
  .gallery-thumb {
    height: 0;
    padding-bottom: 100%;          /* 1:1 square */
    position: relative;
  }
  .about-split .graphic-box {
    height: 0;
    padding-bottom: 75%;           /* 4:3 */
    position: relative;
  }
  .product-card .pc-image > *,
  .product-gallery .main-image > *,
  .gallery-main > *,
  .gallery-thumb > *,
  .about-split .graphic-box > * {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
  }
  .product-card .pc-image img,
  .gallery-main img,
  .product-gallery .main-image img {
    object-fit: contain;
  }
  .pc-photo, .gallery-thumb img { object-fit: cover; }
}

/* --- flexbox gap fallback for older Safari (<14.1) --- */
@supports not (gap: 1px) {
  .product-grid > * { margin: 8px; }
  .category-grid > * { margin: 7px; }
  .value-grid > *,
  .assurance-grid > *,
  .trust-grid > * { margin: 8px; }
  .gallery-thumbs > * { margin: 5px; }
  .header-top-links > * + * { margin-left: 14px; }
  .hero-actions > * + * { margin-left: 12px; }
  .pi-sku-row > * + * { margin-left: 14px; }
  .feature-checklist > * { margin-bottom: 6px; }
  .footer-bottom > * + * { margin-left: 10px; }
}

/* --- -webkit prefixes for sticky & object-fit (older mobile WebKit) --- */
.site-header, .header-main, .filter-panel, .checkout-summary {
  position: -webkit-sticky;
}
.pc-photo, .gallery-main img, .gallery-thumb img,
.gallery-main-img, .product-gallery .main-image img {
  -o-object-fit: contain;
}

/* --- prevent 100vw overflow quirk on iOS --- */
.hero, .cta-banner, .trust-strip { max-width: 100%; }

/* ===========================================================
   Search autocomplete dropdown
   =========================================================== */
.search-form { position: relative; }
.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  max-height: 70vh;
  overflow-y: auto;
  padding: 6px;
}
.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--navy);
}
.suggestion-item:hover,
.suggestion-item.active { background: var(--gray-bg); }
.suggestion-thumb {
  width: 44px; height: 44px;
  border-radius: 6px;
  background-color: var(--gray-bg);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid var(--gray-line);
}
.suggestion-thumb-empty { background-color: var(--gray-bg); }
.suggestion-text { display: flex; flex-direction: column; min-width: 0; }
.suggestion-title {
  font-weight: 600; font-size: 0.92rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.suggestion-price { font-size: 0.85rem; color: var(--red); font-weight: 700; }
.suggestion-empty { padding: 14px; color: var(--gray-text); font-size: 0.9rem; }
.suggestion-all {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; margin-top: 4px;
  background: var(--gray-bg); border: none; border-radius: var(--radius);
  color: var(--navy); font-weight: 700; font-size: 0.85rem; cursor: pointer;
}
.suggestion-all:hover { background: #e9edf2; }

/* ===========================================================
   Pagefind results page (brand-matched)
   =========================================================== */
.pagefind-results {
  --pagefind-ui-scale: 1;
  --pagefind-ui-primary: var(--navy);
  --pagefind-ui-text: var(--navy);
  --pagefind-ui-background: var(--white);
  --pagefind-ui-border: var(--gray-line);
  --pagefind-ui-tag: var(--gray-bg);
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 8px;
  --pagefind-ui-font: var(--font-base, sans-serif);
}
.pagefind-ui__search-input {
  font-weight: 600;
}
.pagefind-ui__result {
  border-bottom: 1px solid var(--gray-line);
  padding: 18px 0;
}
.pagefind-ui__result-title a { color: var(--navy); font-weight: 700; }
.pagefind-ui__result-title a:hover { color: var(--red); }
.pagefind-ui__result-image,
.pagefind-ui__result-thumb {
  border-radius: 8px;
  border: 1px solid var(--gray-line);
  background: var(--white);
}

@media (max-width: 700px) {
  .search-suggestions { max-height: 60vh; }
  .suggestion-thumb { width: 38px; height: 38px; }
}

/* ===========================================================
   Sale pricing (selling price + struck market price + discount)
   =========================================================== */
.pc-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-bottom: 12px;
}
.pc-price { font-size: 1.15rem; font-weight: 800; color: var(--navy); }
.pc-price-was {
  font-size: 0.9rem; color: var(--gray-text);
  text-decoration: line-through;
}
.pc-discount {
  font-size: 0.72rem; font-weight: 800;
  color: var(--white); background: var(--red);
  padding: 2px 7px; border-radius: 4px;
  letter-spacing: 0.02em;
}
.pc-savings {
  font-size: 0.78rem; color: #1d7a43; font-weight: 600;
  margin: 2px 0 10px;
  line-height: 1.3;
}

/* product page */
.pi-price-row {
  display: flex; align-items: baseline; flex-wrap: wrap;
  gap: 8px 12px; margin-bottom: 6px;
}
.pi-price { font-size: 2rem; font-weight: 800; color: var(--navy); }
.pi-price-was {
  font-size: 1.15rem; color: var(--gray-text);
  text-decoration: line-through;
}
.pi-discount {
  font-size: 0.82rem; font-weight: 800; color: var(--white);
  background: var(--red); padding: 4px 10px; border-radius: 5px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.pi-savings {
  font-size: 0.9rem; color: #1d7a43; font-weight: 600;
  margin-bottom: 18px;
}

/* ===========================================================
   Request-a-part page + search no-results CTA
   =========================================================== */
.request-layout {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: 36px;
  align-items: start;
}
.request-form-wrap {
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--white);
}
.request-form h2 {
  font-size: 1.15rem;
  margin: 26px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-line);
}
.request-form h2:first-of-type { margin-top: 0; }
.request-intro-active {
  background: #fff4e8;
  border: 1px solid #ffd9a8;
  color: #8a4b00;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 22px;
  font-size: 0.92rem;
  font-weight: 500;
}
.request-photo-note { font-size: 0.88rem; margin-bottom: 10px; margin-top: -6px; }
.request-photo-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 26px; cursor: pointer; text-align: center;
  border: 2px dashed var(--gray-line); border-radius: var(--radius);
  transition: border-color .15s, background .15s;
}
.request-photo-drop:hover { border-color: var(--red); background: #fff7f5; }
.request-photo-icon {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--gray-bg); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
}
.request-photo-text { font-size: 0.88rem; color: var(--gray-text); }
.request-photo-previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.request-photo-thumb {
  width: 76px; height: 76px; border-radius: var(--radius);
  background-color: var(--gray-bg); background-size: cover; background-position: center;
  border: 1px solid var(--gray-line);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: var(--gray-text); font-weight: 700;
}
.request-disclaimer { font-size: 0.82rem; margin-top: 14px; }
.request-success {
  background: #e8f3ec; border: 1px solid #b9dcc6; color: #1d7a43;
  padding: 22px 24px; border-radius: var(--radius); margin-bottom: 20px;
  font-weight: 600;
}

.request-aside { display: flex; flex-direction: column; gap: 18px; }
.request-aside-card {
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--gray-bg);
}
.request-aside-card h3 { font-size: 1.05rem; margin-bottom: 12px; }
.request-benefits { list-style: none; padding: 0; margin: 0; }
.request-benefits li {
  position: relative; padding-left: 24px; margin-bottom: 12px;
  font-size: 0.9rem; color: var(--navy);
}
.request-benefits li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 8px; height: 8px; background: var(--red); border-radius: 50%;
}
.request-contact { font-weight: 700; margin: 4px 0; }
.request-contact a { color: var(--red); }

/* search no-results / always-on request CTA */
.search-request-cta {
  margin-top: 32px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 28px;
}
.search-request-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.search-request-cta h3 { color: var(--white); margin-bottom: 6px; }
.search-request-cta p { color: #c6cfdc; margin: 0; max-width: 560px; font-size: 0.95rem; }
.search-request-cta .btn { flex-shrink: 0; }

.suggestion-request {
  display: block; margin-top: 8px; color: var(--red); font-weight: 700;
  font-size: 0.85rem;
}

/* ---- Search results page ---- */
.search-summary {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 22px;
}
.no-results-block {
  margin-top: 8px;
  background: var(--white);
  border: 1px solid var(--gray-line);
  border-top: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 760px;
}
.no-results-head h2 {
  margin: 0 0 8px;
  color: var(--navy);
}
.no-results-head > p {
  color: #51607a;
  margin: 0 0 8px;
  font-size: 0.98rem;
}
.no-results-block .request-form { margin-top: 18px; }
.no-results-block .request-form h2 { font-size: 1.15rem; margin-top: 26px; }
.no-results-block .request-form h2:first-of-type { margin-top: 0; }
@media (max-width: 700px) {
  .no-results-block { padding: 22px; }
}

@media (max-width: 900px) {
  .request-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .search-request-inner { flex-direction: column; align-items: flex-start; }
  .request-form-wrap { padding: 20px; }
}

/* ===========================================================
   Checkout payment methods + order flow
   =========================================================== */
.co-why {
  background: #eef3f8;
  border: 1px solid #d6e1ec;
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 0.92rem;
  color: var(--navy);
  margin-bottom: 28px;
}
.co-pay-intro { font-size: 0.92rem; color: var(--gray-text); margin-bottom: 16px; }
.co-pay-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.pay-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-line);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s;
  position: relative;
}
.pay-radio:hover { border-color: var(--navy); }
.pay-radio.selected { border-color: var(--red); background: #fff7f5; }
.pay-radio-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; background: #f1f4f9; color: var(--navy);
}
.pay-radio-icon svg { width: 22px; height: 22px; }
.pay-radio-name {
  font-weight: 700; font-size: 0.9rem; color: var(--navy); flex: 1;
  display: flex; flex-direction: column; gap: 2px;
}
.pay-radio-min { font-weight: 600; font-size: 0.7rem; color: var(--gray-text); }
.pay-radio-dot {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--gray-line); flex-shrink: 0;
}
.pay-radio.selected .pay-radio-dot {
  border-color: var(--red); background: var(--red);
  box-shadow: inset 0 0 0 3px var(--white);
}
.pay-radio.locked {
  opacity: 0.55; cursor: not-allowed; background: #fafbfc;
}
.pay-radio.locked .pay-radio-icon { background: #e9edf3; color: var(--gray-text); }
.pay-radio.locked:hover { border-color: var(--gray-line); }
.pay-radio.locked .pay-radio-min { color: var(--red); }
.cart-free-hint {
  font-size: 0.82rem; color: #1d7a43; background: #eef8f1;
  border: 1px solid #cdead7; border-radius: 8px;
  padding: 8px 10px; margin: 4px 0 2px;
}
.cart-summary-note { font-size: 0.74rem; margin: 2px 0 6px; }
.ship-free { color: #1d7a43; }
.co-trust-row {
  display: flex; gap: 20px; flex-wrap: wrap;
  padding: 16px 0; margin-bottom: 8px;
  border-top: 1px solid var(--gray-line);
  border-bottom: 1px solid var(--gray-line);
}
.co-trust-item { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--gray-text); font-weight: 600; }
.co-disclaimer { font-size: 0.82rem; color: var(--gray-text); margin-top: 12px; }
.co-success { text-align: center; padding: 30px 10px; }
.co-success-check {
  width: 64px; height: 64px; margin: 0 auto 18px;
  background: #1d7a43; color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}
.co-success h2 { margin-bottom: 10px; }
.co-success p { color: var(--gray-text); max-width: 480px; margin: 0 auto 12px; }
.co-success .btn { margin-top: 12px; }

/* Toast */
.co-toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff; padding: 12px 22px; border-radius: 8px;
  font-size: 0.9rem; font-weight: 600; z-index: 2000; opacity: 0;
  transition: opacity .25s, transform .25s; box-shadow: var(--shadow-lg);
  max-width: 90%; text-align: center;
}
.co-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.co-toast.ok { background: #1d7a43; }

/* ===========================================================
   Homepage: why-we-confirm + request-a-part
   =========================================================== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.why-card {
  background: var(--white);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.why-icon {
  width: 52px; height: 52px; margin-bottom: 16px;
  color: var(--red);
}
.why-icon svg { width: 100%; height: 100%; }
.why-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.why-card p { font-size: 0.92rem; color: var(--gray-text); margin: 0; }

.home-request {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: start;
  background: var(--white);
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  padding: 36px;
}
.home-request-intro h2 { margin: 6px 0 14px; }
.home-request-intro p { color: var(--gray-text); margin-bottom: 16px; }
.home-request-points { list-style: none; padding: 0; margin: 0; }
.home-request-points li {
  position: relative; padding-left: 24px; margin-bottom: 10px;
  font-size: 0.92rem; color: var(--navy);
}
.home-request-points li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 8px; height: 8px; background: var(--red); border-radius: 50%;
}
.home-request-note { font-size: 0.82rem; color: var(--gray-text); margin-top: 12px; }
.home-request-note a { color: var(--red); font-weight: 600; }

@media (max-width: 900px) {
  .why-grid { grid-template-columns: 1fr; gap: 16px; }
  .home-request { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
  .co-pay-list { grid-template-columns: 1fr; }
}

/* ===========================================================
   Collapsible filter panel (mobile)
   =========================================================== */
.filter-toggle {
  display: none;            /* hidden on desktop */
  width: 100%;
  align-items: center;
  justify-content: space-between;
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 13px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
}
.filter-toggle-chevron { width: 20px; height: 20px; transition: transform .2s ease; }
.filter-toggle.open .filter-toggle-chevron { transform: rotate(180deg); }

@media (max-width: 1100px) {
  /* On tablet/mobile the panel becomes a collapsible block */
  .filter-toggle { display: flex; }
  .filter-body {
    display: none;
    margin-top: 12px;
  }
  .filter-body.open { display: block; }
}
