/* feetcounter.com — shared styles for individual product pages (products/{SKU}/index.html)
   Self-contained, static pages: same institutional palette as catalog.css but duplicated
   here (no PHP includes) so each product folder stays fully portable. */

:root {
  --header-bg: #082A63;
  --blue: #0B3D91;
  --blue-hover: #1557C0;
  --red: #B5121B;
  --red-dark: #7F0D14;
  --gold: #D99A16;
  --gold-light: #F2B632;
  --charcoal: #252B33;
  --text: #3F4852;
  --text-dim: #5D6773;
  --border: #D8DEE6;
  --bg-alt: #F4F6F8;
  --white: #FFFFFF;
  --radius: 8px;
}

* { box-sizing: border-box; }

html { overflow-x: hidden; }
body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--white);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}
a { color: var(--blue); }
a:hover { color: var(--blue-hover); }

/* Top bar: same centered, big-logo identity as the catalog's .site-header,
   duplicated here (no PHP include) so each product folder stays portable. */
.p-topnav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  background: var(--white);
  border-bottom: 3px solid var(--blue);
  padding: 1.5rem 1.25rem 1rem;
}
.p-logo { display: inline-flex; align-items: center; line-height: 0; }
.p-logo img { height: 72px; width: auto; display: block; }
.p-nav-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 960px;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}
.p-nav-link {
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
}
.p-nav-link:hover { background: #e8eefb; color: var(--blue); border-color: var(--blue); }

/* Featured product banner (e.g. MSJY316W, the product feetcounter.com is
   named after) — a small blue ribbon above the header, plus a matching
   accent border on the header itself. Opt-in via "featured": true in
   products_data.json, so it stays usable for any future flagship product. */
.p-featured-banner {
  max-width: 960px;
  margin: 1.5rem auto 0;
  padding: 0.5rem 1.25rem;
  text-align: center;
  color: var(--blue);
  background: linear-gradient(90deg, #eaf1fb, #dbe9fa, #eaf1fb);
  border: 1px solid #c9dcf5;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Header: hero tile + name + category */
.p-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 960px;
  margin: 1.75rem auto 1.5rem;
  padding: 0 1.25rem;
  flex-wrap: wrap;
}
.p-header-featured .p-tile { border: 2px solid var(--blue-hover); box-shadow: 0 0 0 4px #eaf1fb; }
.p-header-featured .p-heading h1 { color: var(--blue); }
.p-tile {
  width: 130px;
  height: 130px;
  border-radius: 12px;
  flex-shrink: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.p-tile img { width: 100%; height: 100%; object-fit: contain; padding: 0.5rem; }
.p-category { margin: 0 0 0.3rem; color: var(--blue); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.p-heading h1 { margin: 0 0 0.3rem; font-size: 1.9rem; color: var(--charcoal); }
.p-sku { margin: 0; color: var(--text-dim); font-size: 0.95rem; font-family: "SFMono-Regular", Consolas, monospace; }
.p-buy {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.6rem 1.15rem;
  border-radius: 6px;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}
.p-buy:hover { background: var(--red-dark); color: var(--white); }
.p-buy.contact { background: var(--blue); }
.p-buy.contact:hover { background: var(--blue-hover); }

.p-buy-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.p-buy-row .p-buy { margin-top: 0.75rem; }
.p-buy-secondary {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.6rem 1.15rem;
  border-radius: 6px;
  background: var(--white);
  color: var(--blue);
  border: 1px solid var(--blue);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}
.p-buy-secondary:hover { background: #eaf1fb; color: var(--blue-hover); }
.p-buy-phone { margin: 0.5rem 0 0; font-size: 0.85rem; color: var(--text-dim); }

/* Site's namesake product gets its own accented shortcut in every product
   page's light topnav, mirroring .site-nav a.nav-feet in catalog.css. */
.p-nav-feet {
  color: var(--blue) !important;
  background: #eaf1fb;
  border-color: #c9dcf5 !important;
}
.p-nav-feet:hover { background: #dbe9fa; }

/* Body: spec sidebar + content */
.p-body {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.p-props {
  flex: 0 0 280px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: sticky;
  top: 1rem;
}
.p-props h2 { margin: 0 0 0.75rem; font-size: 1rem; color: var(--charcoal); }
.p-props dl { margin: 0; }
.p-props .prop { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-top: 1px solid var(--border); font-size: 0.88rem; }
.p-props .prop:first-child { border-top: none; }
.p-props dt { color: var(--text-dim); margin: 0; }
.p-props dd { margin: 0; text-align: right; font-weight: 600; color: var(--charcoal); word-break: break-word; }

.p-content { flex: 1 1 auto; min-width: 0; }
.p-section { margin-bottom: 1.75rem; }
.p-section h2 { font-size: 1.2rem; margin: 0 0 0.6rem; padding-bottom: 0.3rem; border-bottom: 2px solid var(--border); color: var(--charcoal); }
.p-section p { margin: 0 0 0.75rem; }
.p-section ul { margin: 0 0 0.75rem; padding-left: 1.2rem; }
.p-section li { margin-bottom: 0.3rem; }

.p-gallery { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.p-gallery img {
  width: 130px;
  height: 130px;
  object-fit: contain;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem;
}
/* An individual gallery image (e.g. an application/installation photo) can
   carry its own caption without disturbing the flex row it sits in. */
.p-gallery-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; max-width: 130px; }
.p-gallery-figure img { width: 130px; height: 130px; }
.p-gallery-figure figcaption { font-size: 0.68rem; color: var(--text-dim); text-align: center; line-height: 1.3; }

/* ---------- FAQ ---------- */
.p-faq-list { margin: 0; }
.p-faq-item { padding: 0.9rem 0; border-top: 1px solid var(--border); }
.p-faq-item:first-child { border-top: none; padding-top: 0; }
.p-faq-item dt { font-weight: 700; color: var(--charcoal); margin: 0 0 0.35rem; }
.p-faq-item dd { margin: 0; color: var(--text); }

/* ---------- Comparison table (Related Products) ---------- */
.p-compare-table { overflow-x: auto; margin-bottom: 1.1rem; }
.p-compare-table table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.p-compare-table th, .p-compare-table td { padding: 0.55rem 0.75rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.p-compare-table th { color: var(--text-dim); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.03em; }

/* Related Products — same category as this item, grouped by the same 9
   categories used to filter the homepage catalog. */
.p-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}
.p-related-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.p-related-card:hover {
  box-shadow: 0 6px 16px rgba(8, 42, 99, 0.12);
  transform: translateY(-2px);
}
.p-related-img {
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.p-related-img img { width: 100%; height: 100%; object-fit: contain; padding: 0.5rem; }
.p-related-name { font-size: 0.85rem; font-weight: 700; color: var(--charcoal); line-height: 1.3; }
.p-related-sku { font-size: 0.72rem; color: var(--text-dim); font-family: "SFMono-Regular", Consolas, monospace; }
.p-related-badge { font-size: 0.7rem; font-weight: 700; color: var(--red); }

.p-footer {
  max-width: 960px;
  margin: 2.5rem auto 0;
  padding: 1.25rem 1.25rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
}
.p-footer a { color: var(--blue); }

@media (max-width: 760px) {
  .p-body { flex-direction: column; }
  .p-props { flex-basis: auto; width: 100%; position: static; }
  .p-related-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .p-topnav { padding: 1rem 0.85rem 0.85rem; }
  .p-logo img { height: 48px; }
  .p-nav-link { padding: 0.35rem 0.6rem; font-size: 0.76rem; }
  .p-header { gap: 0.9rem; margin: 1.25rem auto 1.1rem; }
  .p-tile { width: 88px; height: 88px; border-radius: 10px; }
  .p-heading h1 { font-size: 1.4rem; }
  .p-props { padding: 1rem; }
  .p-props .prop { flex-wrap: wrap; gap: 0.1rem 1rem; }
  .p-props dd { text-align: left; }
  .p-gallery img { width: 100px; height: 100px; }
  .p-gallery-figure, .p-gallery-figure img { width: 100px; max-width: 100px; height: 100px; }
  .p-related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Image lightbox (hero + gallery, click to zoom) ---------- */
.p-zoomable { cursor: zoom-in; transition: opacity 0.1s ease; }
.p-zoomable:hover { opacity: 0.88; }

.p-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  background: rgba(8, 10, 15, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.p-lightbox.is-open { opacity: 1; pointer-events: auto; }
.p-lightbox-img {
  max-width: min(92vw, 1100px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.p-lightbox-caption {
  position: absolute;
  bottom: 1.25rem;
  left: 0;
  right: 0;
  text-align: center;
  color: #e8edf2;
  font-size: 0.85rem;
}
.p-lightbox-close,
.p-lightbox-prev,
.p-lightbox-next {
  position: absolute;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.p-lightbox-close:hover,
.p-lightbox-prev:hover,
.p-lightbox-next:hover { background: rgba(255, 255, 255, 0.28); }
.p-lightbox-close { top: 1.25rem; right: 1.25rem; }
.p-lightbox-prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.p-lightbox-next { right: 1.25rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 560px) {
  .p-lightbox { padding: 1rem 0.5rem; }
  .p-lightbox-close, .p-lightbox-prev, .p-lightbox-next { width: 38px; height: 38px; font-size: 1.3rem; }
  .p-lightbox-close { top: 0.6rem; right: 0.6rem; }
  .p-lightbox-prev { left: 0.4rem; }
  .p-lightbox-next { right: 0.4rem; }
}

/* ---------- Wide layout (opt-in via "wide": true) ---------- */
/* Lets one page's header/body/footer use nearly the full viewport instead
   of the usual 960px column — for a page with enough content (a long specs
   table, a big gallery) that the normal width feels cramped. */
body.p-wide .p-featured-banner,
body.p-wide .p-header,
body.p-wide .p-body,
body.p-wide .p-footer {
  max-width: 1620px;
  width: 86%;
}
@media (max-width: 900px) {
  body.p-wide .p-featured-banner,
  body.p-wide .p-header,
  body.p-wide .p-body,
  body.p-wide .p-footer {
    width: 100%;
  }
}
/* On a wide page the sidebar can afford a bit more room, and the gallery/
   related grids get an extra column since there's more horizontal space. */
body.p-wide .p-props { flex: 0 0 380px; }
body.p-wide .p-gallery img { width: 150px; height: 150px; }
body.p-wide .p-gallery-figure, body.p-wide .p-gallery-figure img { width: 150px; max-width: 150px; height: 150px; }
body.p-wide .p-related-grid { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) {
  body.p-wide .p-related-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Featured-page hero photo: stays in its original spot on the left, sized
   to match the width of the specifications sidebar next to it below. No
   padding/frame around the photo itself — just a soft drop shadow so it
   still reads as a distinct element on the white page. */
body.p-wide .p-header-featured .p-tile {
  width: 380px;
  height: 380px;
  padding: 0;
  border: none;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(8, 42, 99, 0.16);
}
body.p-wide .p-header-featured .p-tile img { padding: 0; }
@media (max-width: 900px) {
  body.p-wide .p-header-featured .p-tile { width: 260px; height: 260px; }
}

/* Larger SKU on the featured hero — it's a key identifier on this page. */
body.p-wide .p-header-featured .p-sku { font-size: 1.3rem; }

/* Three-column featured header: photo / title block / benefits box.
   Sized so the benefits card reads as a companion to the specs sidebar
   below it — narrower than the photo (it's a short bullet list, not an
   image), while the title block gets whatever room is left over. */
body.p-wide .p-header-featured {
  align-items: stretch;
  flex-wrap: nowrap;
}
body.p-wide .p-header-featured .p-tile { flex: 0 0 380px; }
body.p-wide .p-header-featured .p-heading {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
body.p-wide .p-header-benefits {
  flex: 0 0 300px;
  border-left: 2px solid var(--border);
  padding: 0.2rem 0 0.2rem 1.5rem;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
body.p-wide .p-header-benefits h2 { margin: 0 0 0.6rem; font-size: 1rem; color: var(--charcoal); }
body.p-wide .p-header-benefits ul { margin: 0; padding-left: 1.1rem; }
body.p-wide .p-header-benefits li { margin-bottom: 0.4rem; font-size: 0.85rem; line-height: 1.4; }
body.p-wide .p-header-benefits li:last-child { margin-bottom: 0; }

@media (max-width: 1300px) {
  body.p-wide .p-header-featured { flex-wrap: wrap; row-gap: 0.75rem; }
  body.p-wide .p-header-benefits { flex: 1 1 100%; order: 3; padding-top: 0; }
}
@media (max-width: 900px) {
  body.p-wide .p-header-featured .p-tile { flex-basis: auto; }
}
@media (max-width: 760px) {
  /* Stack and center: photo, then the title block, both centered instead
     of sitting flush left — reads better once they're no longer side by
     side next to the benefits column. */
  body.p-wide .p-header-featured {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  body.p-wide .p-header-featured .p-tile { margin: 0 auto; }
  body.p-wide .p-header-featured .p-heading {
    align-items: center;
    text-align: center;
  }
}

/* ---------- Shipping Information box (below the gallery) ---------- */
/* A second, visually distinct card for package weight/dimensions — kept
   apart from the physical product specs in the sidebar. Opt-in via a
   "shipping_specs" array in products_data.json. */
.p-shipping-box {
  margin: 0;
  max-width: 420px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.p-shipping-box .prop {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
}
.p-shipping-box .prop:first-child { border-top: none; }
.p-shipping-box dt { color: var(--text-dim); margin: 0; }
.p-shipping-box dd { margin: 0; text-align: right; font-weight: 600; color: var(--charcoal); }
