/* ============================================================
   C&S AIR PRODUCTS — INDIVIDUAL PRODUCT PAGE
   Extends styles.css. Reuses the same design tokens (colors,
   type, spacing, radii) defined in :root there.

   Mobile-first: unqueried rules below are the small-screen
   (< 768px) styles. min-width media queries layer up:
     @media (min-width: 768px)  → tablet and up
     @media (min-width: 1200px) → desktop only
   ============================================================ */

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 14px;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--color-mid-gray); font-weight: 400; }

/* ---------- Product Hero ---------- */
.product-hero { padding: 32px 0 40px; }
.product-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: start;
}

/* Gallery */
.gallery__main {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  max-width: 420px;
  margin: 0 auto;
}
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }

.gallery__thumbs {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  max-width: 420px;
  margin-inline: auto;
}
.gallery__thumb {
  width: 84px;
  height: 84px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition);
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumb:hover { border-color: var(--color-mid-gray); }
.gallery__thumb.is-active { border-color: var(--color-navy); border-width: 2px; padding: 9px; }

/* Feature badges */
.feature-badges {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px 28px;
  margin-top: 26px;
  max-width: none;
  margin-inline: auto;
}
.feature-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.feature-badge svg { flex-shrink: 0; color: var(--color-navy); }

/* Info column */
.product-hero__info h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -.01em;
  margin-bottom: 14px;
}
.product-hero__accent {
  width: 60px;
  height: 4px;
  background: var(--color-teal);
  border-radius: 2px;
  margin-bottom: 16px;
}
.product-hero__subtitle {
  font-size: 17px;
  color: var(--color-text-light);
  margin-bottom: 24px;
}
.product-hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.product-hero__actions .btn { flex: 1; }
.btn--navy {
  background: var(--color-navy);
  color: var(--color-white);
  border-color: var(--color-navy);
}
.btn--navy:hover { background: var(--color-navy-dark); border-color: var(--color-navy-dark); }

/* Info panel: applications + documents */
.info-panel {
  background: var(--color-off-white);
  border-radius: var(--radius-md);
  padding: 26px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}
.info-panel__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.applications-list li {
  position: relative;
  padding: 7px 0 7px 16px;
  font-size: 14px;
  color: var(--color-text);
}
.applications-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-navy);
}
.info-panel__divider {
  border-left: none;
  padding-left: 0;
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
}
.doc-links { display: flex; flex-direction: column; }
.doc-links li { padding: 8px 0; }
.doc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}
.doc-link__title { flex: 1; min-width: 0; }
.doc-link__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}
.doc-link__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--color-teal);
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.doc-link__action:hover { background: var(--color-white); color: var(--color-navy); }
.doc-link__icon {
  flex-shrink: 0;
  width: 20px;
  height: 24px;
  border-radius: 3px;
  background: var(--color-navy);
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.doc-link__icon::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 6px 6px 0;
  border-color: transparent rgba(255,255,255,.6) transparent transparent;
}
.doc-link__icon span {
  font-family: var(--font-display);
  font-size: 6px;
  font-weight: 800;
  color: var(--color-white);
  letter-spacing: .3px;
  margin-bottom: 3px;
}
.doc-category { margin-top: 18px; }
.doc-category:first-child { margin-top: 0; }
.doc-category__title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: 6px;
}
.doc-empty { font-size: 14px; color: var(--color-text-light); }

/* ---------- Overview ---------- */
.overview { background: var(--color-off-white); padding: 64px 0; }
.overview__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}
.overview__grid h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 18px;
}
.overview__grid p {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--color-text-light);
}

.spec-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 14px;
}
.spec-label::after { content: ''; flex: 1; height: 2px; background: var(--color-teal); }

.spec-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
/* .spec-table tr:not(:last-child) td { border-bottom: 1px solid var(--color-border); }
.spec-table td {
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.6;
  vertical-align: top;
  color: var(--color-text-light);
}
.spec-table td:first-child {
  font-weight: 700;
  color: var(--color-text);
  width: 32%;
  white-space: nowrap;
} */
.spec-table p:not(:last-child) { border-bottom: 1px solid var(--color-border); }
.spec-table p {
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.6;
  vertical-align: top;
  color: var(--color-text-light);
}

/* ============================================================
   RESPONSIVE — TABLET AND UP (≥ 768px)
   ============================================================ */
@media (min-width: 768px) {
  .info-panel { grid-template-columns: 1fr 1fr; }
  .info-panel__full { grid-column: 1 / -1; }
  .info-panel__divider {
    border-left: 1px solid var(--color-border);
    padding-left: 26px;
    border-top: none;
    padding-top: 0;
  }
  .feature-badges { grid-template-columns: 1fr 1fr; }
  .product-hero__actions .btn { flex: initial; }
  .spec-table td { padding: 14px 18px; font-size: 14px; }
}

/* ============================================================
   RESPONSIVE — DESKTOP (≥ 1200px)
   ============================================================ */
@media (min-width: 1200px) {
  .product-hero { padding: 48px 0 56px; }
  .product-hero__grid {
    grid-template-columns: minmax(0, 440px) 1fr;
    gap: 56px;
  }
  /* No gallery to make room for — let the products area use the full width. */
  .product-hero__grid--products { grid-template-columns: 1fr; }
  .gallery__main { max-width: none; margin: 0; }
  .gallery__thumbs { max-width: none; margin-inline: 0; }
  .feature-badges { max-width: 440px; margin-inline: 0; }
  .overview__grid { grid-template-columns: 1fr 1fr; gap: 64px; }
}

/* ============================================================
   CATEGORY DETAIL — LEFT NAV (children + grandchildren of the
   top-level category). Stacks above the content on mobile/
   tablet; becomes a sticky sidebar at the same breakpoint the
   hero grid switches to two columns.
   ============================================================ */
.category-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}

.category-nav {
  background: var(--color-off-white);
  border-radius: var(--radius-md);
  padding: 20px;
}
.category-nav__root {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--color-text);
  text-decoration: none;
  margin-bottom: 10px;
}
.category-nav__root:hover { color: var(--color-teal); }
.category-nav__root.is-active { color: var(--color-teal); }

.category-nav__list { list-style: none; }
.category-nav__list--nested { margin-left: 14px; margin-top: 4px; }
.category-nav__item { margin-top: 4px; }
.category-nav__item > a {
  display: block;
  padding: 4px 0;
  font-size: 14px;
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition);
}
.category-nav__item > a:hover { color: var(--color-teal); }
.category-nav__item.is-ancestor > a { font-weight: 700; color: var(--color-navy); }
.category-nav__item.is-active > a { font-weight: 700; color: var(--color-teal); }

.category-layout__main { min-width: 0; }

@media (min-width: 1200px) {
  .category-layout { grid-template-columns: 260px 1fr; gap: 40px; }
  .category-nav { position: sticky; top: calc(var(--header-h) + var(--topbar-h) + 20px); }
}

/* ============================================================
   CATEGORY DETAIL — PRODUCTS PANEL
   Replaces the categories/applications .info-panel content
   (not the panel itself) whenever the current category has
   related products. Sized with auto-fill so it adapts to the
   .product-hero__info column's width rather than the viewport.
   ============================================================ */
.info-panel--products { display: block; }

.product-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px;
}

.product-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.product-tile:hover {
  border-color: var(--color-teal);
  box-shadow: var(--shadow-sm);
}
.product-tile__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.product-tile__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-tile__name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
}
