/* AdoreParts site theme — Variant J Navy Fill (approved 2026-05-05) */
/* Use on all parts/v2/ pages. Source mockup: mockup_product_v2_J_navyfill.html */

:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-alt: #f5f5f3;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --ink: #18181b;
  --ink-soft: #404040;
  --muted: #78716c;
  --navy: #1a3a5c;
  --navy-hover: #14304d;
  --info: #1d4ed8;
  --info-soft: #eff6ff;
  --cta: #ea580c;
  --cta-hover: #c2410c;
  --success: #047857;
  --success-soft: #ecfdf5;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --danger: #b91c1c;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { font-family: "Manrope", system-ui, sans-serif; }
body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
a { color: var(--info); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
button { font-family: inherit; }

/* ================== TOP STRIP + HEADER ================== */
.top-strip {
  background: var(--navy); color: #fafaf7;
  font-size: 12px; padding: 8px 24px;
  display: flex; align-items: center; justify-content: center; gap: 32px;
  flex-wrap: wrap;
  letter-spacing: .02em;
}
.top-strip .item { display: flex; align-items: center; gap: 6px; opacity: .9; }
.top-strip .item i { color: var(--cta); font-size: 11px; }

.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex; align-items: center; gap: 24px;
  position: sticky; top: 0; z-index: 50;
}
.brand-block { display: flex; align-items: center; gap: 10px; cursor: pointer; text-decoration: none; }
.brand-block .logo-img { height: 44px; width: auto; display: block; }
.brand-block h1 {
  margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em;
  color: var(--navy); line-height: 1;
}
.brand-block h1 .accent { color: var(--cta); }
.brand-block:hover { text-decoration: none; }

.nav-link {
  color: var(--ink-soft); padding: 8px 14px; font-size: 14px; font-weight: 500;
  border-radius: 6px; transition: background .15s;
}
.nav-link:hover { background: var(--surface-alt); text-decoration: none; }
.right { display: flex; align-items: center; gap: 12px; }

.search-input {
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 14px 8px 36px; font-size: 13px; font-family: inherit;
  flex: 1 1 auto; min-width: 220px; max-width: 560px;
  margin-right: 16px;
  transition: border-color .15s, box-shadow .15s;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 14px 14px;
}
.search-input:focus { outline: none; border-color: var(--info); background-color: #fff; box-shadow: 0 0 0 3px rgba(29,78,216,.08); }
@media (max-width: 900px) { .search-input { min-width: 160px; margin-right: 8px; } }

.tier-badge {
  background: var(--info-soft); color: var(--info);
  padding: 5px 12px; border-radius: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid #bfdbfe;
}
.tier-badge.tier-anon { background: var(--surface-alt); color: var(--muted); border-color: var(--border); }

.cart-link {
  background: var(--navy); color: var(--bg); padding: 8px 14px; border-radius: 6px;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 8px; transition: background .15s;
}
.cart-link:hover { background: var(--navy-hover); text-decoration: none; }
.cart-link .price { font-family: "JetBrains Mono", monospace; font-size: 12px; opacity: .8; }

.container { max-width: 1320px; margin: 0 auto; padding: 24px 24px 80px; }

/* BREADCRUMB */
.breadcrumb {
  display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted);
  padding: 4px 0 20px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--ink-soft); font-weight: 500; }
.breadcrumb .sep { color: var(--border-strong); }
.breadcrumb .current { color: var(--ink); font-weight: 600; }

/* ================== PRODUCT DETAIL ================== */
.main { display: grid; grid-template-columns: 1.25fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 1024px) { .main { grid-template-columns: 1fr; gap: 24px; } }

/* Gallery */
.gallery-wrap { position: relative; }
.main-photo {
  aspect-ratio: 4/3;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.main-photo::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: .4;
}
.main-photo img { position: relative; z-index: 1; max-width: 90%; max-height: 90%; object-fit: contain; }
.main-photo i.placeholder { position: relative; z-index: 1; color: #a8a29e; font-size: 130px; }
.main-photo .badge-featured {
  position: absolute; top: 14px; left: 14px;
  background: var(--navy); color: #fafaf7; padding: 5px 12px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  border-radius: 3px; display: flex; align-items: center; gap: 6px; z-index: 2;
}
.main-photo .badge-stock {
  position: absolute; top: 14px; right: 14px;
  background: var(--success-soft); color: var(--success); padding: 5px 12px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  border-radius: 3px; border: 1px solid #a7f3d0;
  display: flex; align-items: center; gap: 6px; z-index: 2;
}
.main-photo .photo-counter {
  position: absolute; bottom: 14px; right: 14px;
  background: rgba(26,58,92,.75); color: #fff; padding: 4px 10px; border-radius: 3px;
  font-family: "JetBrains Mono", monospace; font-size: 11px; backdrop-filter: blur(4px);
  z-index: 2;
}
.thumbs-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 10px; }
.thumb {
  aspect-ratio: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  cursor: pointer; transition: all .15s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { border-color: var(--navy); }
.thumb.active { border-color: var(--cta); border-width: 2px; box-shadow: 0 0 0 1px var(--cta); }

/* Info column */
.info-col { display: flex; flex-direction: column; gap: 18px; }

.title-block { padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.brand-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.brand-tag {
  color: var(--info); font-size: 12px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
}
.pn-mono { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); }

h1.product-title {
  margin: 0 0 12px 0;
  font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -.015em;
  color: var(--ink);
}

.sku-pill {
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  background: var(--surface-alt); padding: 3px 10px; border-radius: 3px; color: var(--muted);
  border: 1px solid var(--border);
}
.sku-pill .label { color: var(--muted); margin-right: 4px; }
.sku-pill .val { color: var(--ink); font-weight: 600; }

/* Price block */
.price-block { padding: 4px 0; }
.price-tier { font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.price-tier .tier-name { color: var(--info); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.price-main { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.price-now {
  font-size: 36px; font-weight: 800; color: var(--ink); line-height: 1; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.price-now .currency { font-size: 22px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.price-meta { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.price-meta strong { color: var(--ink); font-weight: 600; }
.price-meta i { color: var(--success); margin-right: 4px; }

/* Trade banner for anonymous / non-trade users */
.trade-banner {
  background: var(--info-soft); border: 1px solid #bfdbfe; border-radius: 6px;
  padding: 12px 14px; font-size: 13px; color: var(--ink); display: flex; gap: 10px; align-items: flex-start;
}
.trade-banner i { color: var(--info); margin-top: 2px; flex-shrink: 0; }
.trade-banner a { color: var(--info); font-weight: 700; }

/* Qty + Add */
.qty-row { display: flex; align-items: stretch; gap: 10px; }
.qty-stepper {
  display: inline-flex; align-items: stretch; background: #fff;
  border: 1px solid var(--border-strong); border-radius: 6px; overflow: hidden;
}
.qty-stepper button {
  background: transparent; border: none; width: 38px; cursor: pointer;
  font-size: 16px; color: var(--ink); font-weight: 600; transition: background .15s;
}
.qty-stepper button:hover { background: var(--surface-alt); }
.qty-stepper input {
  width: 50px; text-align: center; border: none;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  font-size: 15px; font-weight: 700; color: var(--ink); background: transparent;
  font-variant-numeric: tabular-nums;
}
.add-btn {
  flex: 1;
  background: var(--cta); color: #fff; border: none; padding: 14px 24px; border-radius: 6px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background .15s;
  box-shadow: 0 1px 2px rgba(234,88,12,.15);
}
.add-btn:hover { background: var(--cta-hover); }
.add-btn .price-inline { font-family: "JetBrains Mono", monospace; font-weight: 500; opacity: .85; font-size: 13px; }
.add-btn:disabled { background: var(--border-strong); cursor: not-allowed; }

/* Trust badges */
.trust-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 14px; background: var(--surface-alt); border-radius: 6px; border: 1px solid var(--border);
}
.trust-item { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; }
.trust-item i { color: var(--success); font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.trust-item .title { font-weight: 700; color: var(--ink); display: block; margin-bottom: 1px; }
.trust-item .sub { color: var(--muted); font-size: 11px; }

/* Specs */
.specs-section { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--border); }
.section-h2 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-h2 h2 {
  margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.section-h2 h2 i { color: var(--cta); font-size: 15px; }
.section-h2 .tag {
  font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted);
  background: var(--surface-alt); padding: 3px 8px; border-radius: 3px;
}
.specs-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
}
@media (max-width: 700px) { .specs-grid { grid-template-columns: 1fr; } }
.spec {
  padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--border); border-right: 1px solid var(--border);
  font-size: 13px;
}
.spec:nth-child(2n) { border-right: none; }
.spec:nth-last-child(-n+2) { border-bottom: none; }
@media (max-width: 700px) { .spec { border-right: none; } .spec:last-child { border-bottom: none; } }
.spec .key { color: var(--muted); font-weight: 500; }
.spec .val { color: var(--ink); font-weight: 700; font-family: "JetBrains Mono", monospace; font-size: 12px; }

/* Description block — admin-edited rich HTML */
.descr-section { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--border); }
.descr-body { font-size: 14px; line-height: 1.7; color: var(--ink-soft); max-width: 820px; }
.descr-body p { margin: 0 0 14px 0; }
.descr-body p:last-child { margin-bottom: 0; }
.descr-body strong, .descr-body b { color: var(--ink); font-weight: 700; }
.descr-body em, .descr-body i { font-style: italic; }
.descr-body h2 {
  font-size: 17px; font-weight: 700; color: var(--ink);
  margin: 24px 0 12px 0; letter-spacing: -.01em;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.descr-body h3 {
  font-size: 15px; font-weight: 700; color: var(--ink);
  margin: 20px 0 10px 0;
}
.descr-body ul, .descr-body ol {
  padding-left: 22px; margin: 0 0 14px 0;
}
.descr-body li {
  margin-bottom: 6px; line-height: 1.6;
}
.descr-body li p { margin: 0; }
.descr-body hr {
  border: none; border-top: 1px solid var(--border); margin: 18px 0;
}
.descr-body a { color: var(--info); }
.descr-body table {
  border-collapse: collapse; margin: 12px 0; font-size: 13px;
}
.descr-body th, .descr-body td {
  padding: 8px 12px; border: 1px solid var(--border); text-align: left;
}
.descr-body th { background: var(--surface-alt); font-weight: 700; color: var(--ink); }
.descr-body img { max-width: 100%; height: auto; border-radius: 4px; }


/* MOBILE OPTIMIZATION (s52, revised) */
/* Layout on mobile (<=768px):
   Row 1: [Logo] [Search input - flexible]                     [Cart]
   Row 2: [Home Catalog Service Brands Deals - swipeable horiz scroll] */

.nav-scroll {
  display: flex; align-items: center; gap: 4px;
}

@media (max-width: 768px) {
  html, body { max-width: 100%; overflow-x: hidden; }

  .top-strip {
    padding: 6px 12px; gap: 12px 18px; font-size: 11px;
  }
  .top-strip .item { font-size: 11px; }

  /* Header: 2 rows on mobile via flex-wrap */
  .header {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    align-items: center;
  }
  .brand-block { flex-shrink: 0; gap: 8px; order: 1; }
  .brand-block .logo-img { height: 36px; }
  .brand-block h1 { font-size: 18px; }

  /* Right (Sign in / Account + Cart): row 1, next to logo */
  .header .right { order: 2; flex-shrink: 0; gap: 6px; margin-left: auto; }

  /* Search: own row, full width */
  .header > form { order: 5; flex: 1 1 100%; display: flex; width: 100%; margin: 4px 0 0; }
  .search-input {
    order: 5;
    flex: 1 1 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 8px 14px 8px 34px;
    font-size: 14px;
    background-position: 12px center;
    background-size: 13px 13px;
  }
  .header .right .nav-link,
  .header .right .cart-link {
    padding: 7px 10px; font-size: 12px;
  }
  .header .tier-badge { display: none; }

  /* Nav scroll row: full width, swipeable, symmetric edges */
  .nav-scroll {
    order: 9;
    flex: 1 1 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    gap: 6px;
    padding: 6px 14px 4px;
    margin: 4px -12px 0;
    flex-wrap: nowrap;
    scrollbar-width: none; /* Firefox */
  }
  .nav-scroll::-webkit-scrollbar { display: none; }
  .nav-scroll .nav-link {
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 7px 12px;
    font-size: 13px;
    white-space: nowrap;
  }
  /* Force symmetric edge spacing via pseudo-element on right (scroll containers ignore padding-right) */
  .nav-scroll::after {
    content: '';
    flex-shrink: 0;
    width: 2px;
  }

  .container { padding: 16px 14px 60px; }
}

@media (max-width: 420px) {
  .top-strip { font-size: 10px; gap: 8px 12px; padding: 6px 10px; }
  .top-strip .item { gap: 4px; }
  .brand-block .logo-img { height: 30px; }
  .brand-block h1 { font-size: 16px; }
  .search-input { font-size: 12px; padding: 6px 10px 6px 28px; }
  .header .right .nav-link span,
  .header .right .nav-link i { font-size: 11px; }
  .container { padding: 12px 10px 50px; }
}
