/* ==========================================================================
   SimEd Group — Single Product Page styles
   --------------------------------------------------------------------------
   Loaded IN ADDITION to styles.css (which supplies the design tokens,
   header, nav, footer, buttons and product cards).

   Classic e-commerce single-product layout:

     .breadcrumb        "Home / Category / Product" trail
     .product-layout    two even columns:
                          left  → .gallery  (main photo + thumbnails)
                          right → .summary  (title, options, quote CTA, meta)
     .product-tabs      Description | Features | Specifications | Sample Scans
     .related           "Related products" card row (reuses .product-grid)
   ========================================================================== */

/* Montserrat — used for the category label above the product title */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&display=swap');

/* Hide the browser scrollbar on product pages (scrolling still works via
   wheel / trackpad / keyboard — only the visible bar is removed). */
html {
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* legacy Edge/IE */
}
html::-webkit-scrollbar {     /* Chrome, Safari, new Edge */
  width: 0;
  height: 0;
}

/* ---------- breadcrumb trail ---------- */
.breadcrumb {
  padding: 18px var(--pad-x) 0;
  font-size: 13px;
  color: var(--gray);
}
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb .sep { margin: 0 8px; color: #c6d0da; }

/* =========================================================================
   1. PRODUCT LAYOUT — gallery left, summary right (50 / 50)
   ========================================================================= */
.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  padding: 28px var(--pad-x) 0;
  align-items: start;
  max-width: 1520px;      /* keeps the two columns readable on ultrawide */
  margin: 0 auto;
}

/* ---------- gallery: main image + thumbnail strip ---------- */
.gallery { position: sticky; top: 20px; }   /* stays put while summary scrolls */

.gallery__main {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
  overflow: hidden;
  position: relative;
}
.gallery__main img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 24px;
}

/* "New" flag pinned on the photo, same style as homepage cards */
.gallery__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #fff;
  color: var(--navy);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
}

.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.gallery__thumb {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  padding: 0;
}
.gallery__thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}
.gallery__thumb:hover     { border-color: var(--teal); }
.gallery__thumb.is-active { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }

/* =========================================================================
   2. SUMMARY — title, options, quote CTA, meta
   ========================================================================= */
.summary__category {
  font-family: 'Montserrat', var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--teal);
}

.summary__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(24px, 2.2vw, 32px);
  letter-spacing: -0.6px;
  line-height: 1.12;
  color: var(--ink);
  margin-top: 10px;
}

/* SKU + modality chips on one row under the title */
.summary__meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.summary__sku {
  font-family: 'Montserrat', var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  color: var(--gray-light);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.modality-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.modality-chips span {
  background: #e7f5fa;
  color: var(--teal);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
}

/* price line — this product is quote-based */
.summary__price {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  color: var(--navy);
  margin-top: 18px;
}
.summary__price small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--gray);
  margin-top: 4px;
}

.summary__desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-mute);
  margin-top: 16px;
}

/* ---------- option selectors (appearance / model) ---------- */
.option-group { margin-top: 20px; }

.option-group__label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.option-group__label span { color: var(--gray); font-weight: 400; }

.option-group__choices { display: flex; gap: 10px; flex-wrap: wrap; }

.option-pill {
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mute);
  background: #fff;
  cursor: pointer;
}
.option-pill:hover     { border-color: var(--teal); }
.option-pill.is-active { border-color: var(--navy); color: var(--navy); font-weight: 600; background: var(--bg-soft); }

/* ---------- action row: qty + buttons ---------- */
.summary__actions {
  display: flex;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.qty {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  height: 47px;
}
.qty button {
  width: 38px;
  height: 100%;
  font-size: 16px;
  color: var(--ink-mute);
  background: var(--bg-soft);
}
.qty button:hover { color: var(--navy); }
.qty input {
  width: 44px;
  border: 0;
  outline: none;
  text-align: center;
  font: 600 14px var(--font-body);
  color: var(--ink);
}

/* customization banner */
.custom-note {
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--navy);
  background: #eef2fb;
  border: 1px solid #dbe3f5;
  border-radius: 8px;
  padding: 11px 14px;
  font-weight: 500;
}

/* ---------- meta list (SKU / category / warranty) at panel bottom ---------- */
.summary__metalist {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--gray);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.summary__metalist strong { color: var(--ink); font-weight: 600; }

/* =========================================================================
   3. TABS — Description | Features | Specifications | Sample Scans
   ========================================================================= */
.product-tabs {
  max-width: 1520px;
  margin: 48px auto 0;
  padding: 0 var(--pad-x);
}

.tab-bar {
  display: flex;
  gap: 32px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;            /* Firefox — hide the tab scroll control */
  -ms-overflow-style: none;         /* legacy Edge/IE */
}
.tab-bar::-webkit-scrollbar { display: none; }   /* Chrome, Safari, new Edge */

.tab-bar button {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--gray);
  padding: 14px 2px;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;      /* underline sits on top of the bar's border */
}
.tab-bar button:hover { color: var(--ink); }
.tab-bar button.is-active { color: var(--navy); border-bottom-color: var(--green); }

.tab-panel { display: none; padding: 30px 0 8px; }
.tab-panel.is-active { display: block; }

.tab-panel h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  margin: 26px 0 12px;
}
.tab-panel h3:first-child { margin-top: 0; }

.tab-panel p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-mute);
  max-width: 1040px;
  margin-bottom: 12px;
}

/* two-column feature checklist */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 10px 32px;
  max-width: 1100px;
  list-style: none;
  padding: 0;
}
.feature-list li {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-mute);
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.feature-list li::before { content: "✓"; color: var(--green); font-weight: 700; flex: none; }

/* anatomy groups (Head / Torso / Limbs) */
.anatomy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  max-width: 1100px;
}
.anatomy-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: #fff;
}
.anatomy-card__title { font-weight: 600; font-size: 14.5px; margin-bottom: 8px; }
.anatomy-card p { font-size: 13px; line-height: 1.6; color: var(--gray); margin: 0; }

/* ---------- specification tables ---------- */
.spec-tables { display: flex; flex-direction: column; gap: 28px; }

.spec-table {
  border-collapse: collapse;
  width: 100%;
  max-width: 900px;
  font-size: 13.5px;
}
.spec-table caption {
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  padding-bottom: 10px;
}
.spec-table th,
.spec-table td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
  color: var(--ink-mute);
}
.spec-table th {
  background: var(--bg-soft);
  color: var(--ink);
  font-weight: 600;
  font-size: 12.5px;
}
.spec-table td:first-child { font-weight: 500; color: var(--ink); }

/* ---------- sample scan gallery ---------- */
.scan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  max-width: 1100px;
}
.scan-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  margin: 0;
}
.scan-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.scan-card figcaption {
  background: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--gray);
  padding: 10px 14px;
}

/* =========================================================================
   4. RELATED PRODUCTS — reuses .product-grid / .product-card from styles.css
   ========================================================================= */
.related {
  max-width: 1520px;
  margin: 48px auto 0;
  padding: 0 var(--pad-x);
}

.related__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.4px;
  color: var(--ink);
  margin-bottom: 20px;
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .product-layout { grid-template-columns: 1fr; gap: 32px; }
  .gallery { position: static; }
  .gallery__thumbs { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 700px) {
  .product-layout { gap: 26px; padding-top: 18px; }
  .tab-bar { gap: 24px; }
  /* wide spec tables scroll sideways instead of breaking the page */
  .spec-table { display: block; overflow-x: auto; }
}

@media (max-width: 480px) {
  .gallery__thumbs { grid-template-columns: repeat(4, 1fr); }
  .gallery__main img { padding: 14px; }
  .summary__title { font-size: 23px; }
  /* qty + buttons stack full-width for easy tapping */
  .summary__actions { flex-direction: column; align-items: stretch; }
  .summary__actions .qty input { flex: 1; }
  /* single-column lists/grids so 340px minimums can't overflow the phone */
  .feature-list,
  .anatomy-grid,
  .scan-grid { grid-template-columns: 1fr; }
}
