/* Catalogue + product detail (loaded after style.css & pages.css) */

.cat-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }  /* products: 2 per row on mobile */
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-rows: 190px auto; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.pcard:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(15,20,25,.12); }
.pcard__media { position: relative; background: linear-gradient(160deg, var(--bg), var(--ph-1)); display: grid; place-items: center; }
.pcard__media img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.pcard__wave { position: absolute; top: 12px; left: 12px; font-size: .72rem; font-weight: 700; color: var(--accent); background: var(--surface); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; }
.pcard__body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.pcard__body h3 { font-size: 1.1rem; }
.pcard__body p { color: var(--ink-2); font-size: .92rem; }
.pcard__specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pcard__specs div { background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.pcard__specs small { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.pcard__specs b { font-family: var(--font-display); font-size: .85rem; }
.pcard__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.pcard__ind { font-size: .76rem; color: var(--ink-3); }
.pcard--mini { grid-template-rows: 140px auto; box-shadow: none; }
.pcard--mini h3 { font-size: 1rem; }
.pcard--mini p { font-size: .85rem; }

.keyspecs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.keyspecs div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.keyspecs small { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.keyspecs b { font-family: var(--font-display); font-size: .95rem; color: var(--ink); }
.phero__media--product { background: #fff; border: 0; padding: 20px; }
.phero__media--product img { width: 100%; height: 100%; object-fit: contain; }

.mats { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mats small { flex-basis: 100%; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.mats span { font-size: .8rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }

.works { display: grid; gap: 12px; }
.work { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.work span { font-family: var(--font-display); font-weight: 800; color: var(--accent); font-size: .9rem; }
.work strong { font-family: var(--font-display); font-size: 1rem; }
.work p { color: var(--ink-2); font-size: .9rem; }

.models--dark .model { background: var(--dark-2); border-color: var(--dark-line); }
.models--dark .model small { color: var(--ink-3); }

.gallery--4 figcaption { display: flex; flex-direction: column; }
.gallery--4 figcaption strong { font-size: .85rem; color: var(--ink); }
.gallery--4 figcaption span { font-size: .76rem; color: var(--ink-3); }

.other-cats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

@media (min-width: 900px) {
  .cat-grid, .cat-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }  /* products: 4 per row on desktop */
  .acc--2 { grid-template-columns: 1fr 2fr; }  /* sources + attachments only: fill the row */
  .acc--2 .acc__group:last-child .acc__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pcard { grid-template-rows: 230px auto; }
  .pcard__body { padding: 22px; }
  .keyspecs { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 620px; }
  .works { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .gallery--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }  /* samples: 4 per row on desktop */
}

/* ---- image wells: contain the picture, never let it spill ---- */
.pcard__media, .solution__media, .bcard__img, .model__img, .format__img, .mcard__img, .phero__media--product, .fmt i, .accstrip__i img, .acc__grid img, .acc-item img, .hero__img--photo {
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pcard__media img, .solution__media img, .bcard__img img, .model__img img, .format__img img, .fmt i img, .phero__media--product img {
  width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; display: block;
}
.pcard__media { padding: 14px; }
.solution__media { padding: 14px; }
/* clean image wells: background-free cutouts on plain white, lifted with a soft shadow
   (.pcard--clean on product cards, .is-clean on solution / page-hero media) */
.pcard--clean .pcard__media, .solution .solution__media.is-clean { background: var(--surface); border-bottom: 1px solid var(--line); }
.pcard--clean .pcard__media { padding: 34px 14px 10px; }
.solution .solution__media.is-clean { padding: 18px 20px; }
.solution .solution__media.is-clean::after { display: none; }
.phero__media.is-clean { background: radial-gradient(60% 60% at 50% 55%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 72%), linear-gradient(160deg, #f7fbff, #e8f2fd); padding: 18px; }
.pcard--clean .pcard__media img, .solution__media.is-clean img, .phero__media.is-clean img { width: 100%; height: 100%; object-fit: contain; padding: 0; filter: drop-shadow(0 12px 14px rgba(10, 30, 80, .22)) drop-shadow(0 2px 3px rgba(10, 30, 80, .14)); transition: transform .35s ease; }
.pcard--clean:hover .pcard__media img, .solution:hover .solution__media.is-clean img { transform: scale(1.05); }
/* page-hero machine slider (js/hero-slider.js): next slide comes in from the right, current leaves left */
.phero__media.hslide { position: relative; padding: 0; }
.hslide__track { position: absolute; inset: 0 0 44px; }
.hslide__slide { position: absolute; inset: 0; padding: 18px 22px 0; transform: translateX(100%); visibility: hidden; }
.hslide__slide.is-active, .hslide__slide.is-out { visibility: visible; transition: transform .7s cubic-bezier(.65, 0, .35, 1), visibility 0s; }
.hslide__slide.is-active { transform: none; }
.hslide__slide.is-out { transform: translateX(-100%); }
.hslide__bar { position: absolute; left: 16px; right: 16px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hslide__cap { font-size: .8rem; font-weight: 700; color: var(--ink); background: var(--surface); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hslide__dots { display: flex; gap: 6px; flex: 0 0 auto; }
.hslide__dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--accent) 30%, transparent); cursor: pointer; transition: width .3s, background .3s; }
.hslide__dots button[aria-current] { width: 22px; background: var(--accent); }
@media (prefers-reduced-motion: reduce) { .hslide__slide.is-active, .hslide__slide.is-out { transition: none; } }
@media (max-width: 899px) {
  .cat-grid .pcard--clean { grid-template-rows: 160px auto; }
  .pcard--clean .pcard__media { padding: 28px 8px 6px; }
}

.bcard__img { padding: 18px; min-height: 180px; }
.bcard__img img { max-height: 240px; }
.bcard--big .bcard__img img { max-height: 400px; }
.model__img { padding: 8px; }
.format__img { padding: 6px; }
.phero__media--product { padding: 20px; }
.pcard__specs b, .mcard__spec b { white-space: nowrap; font-size: .76rem; letter-spacing: -0.01em; }
.keyspecs b { white-space: nowrap; }
.pcard__specs div { padding: 8px 8px; }
.pcard__specs div { min-width: 0; overflow: hidden; }
.pcard__specs { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Products 2 per row on mobile: one spec per line so values are not cut off */
@media (max-width: 899px) {
  .cat-grid .pcard__specs { grid-template-columns: 1fr; gap: 4px; }
  .cat-grid .pcard__specs div { padding: 6px 8px; }
  .cat-grid .pcard__specs b { display: block; font-size: .8rem; overflow-wrap: anywhere; }
}

/* ---- build formats: 5 per row with a square image well, so each machine reads clearly ---- */
.model__img { height: auto; aspect-ratio: 1 / 1; padding: 10px; }
.model__img img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; }
@media (min-width: 900px) {
  .models { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
}

/* Compact, transparent sample beside the Fiber sheet overview. */
.section--fiber-sheet-overview { padding-block: 32px; }
.section--fiber-sheet-overview .feature {
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}
.section--fiber-sheet-overview .feature__media {
  width: min(100%, 280px);
  min-height: 0;
  justify-self: center;
  align-self: center;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.section--fiber-sheet-overview .feature__media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
@media (min-width: 900px) {
  .section--fiber-sheet-overview .feature {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
  }
}

/* Show Fiber sheet samples as complete cutouts on the page background. */
.gallery--cutouts .gallery__img { background: transparent; }
.gallery--cutouts .gallery__img img { object-fit: contain; padding: 12px; }

/* Keep full machine silhouettes inside their wells and below the wavelength badge. */
.pcard__media { min-width: 0; min-height: 0; }
.pcard--clean .pcard__media { padding-top: 44px; }
.pcard--clean .pcard__media img { min-width: 0; min-height: 0; }
.pcard--clean:hover .pcard__media img { transform: none; }
.phero__media--product img { width: 100%; height: 100%; min-height: 0; padding: 0; }
.bento .bcard__img img { width: 100%; height: 100%; max-height: 100%; padding: 0; object-fit: contain; }

/* Give accessory groups a soft blue shadow consistent with the product cards. */
#accessories .acc__group {
  box-shadow: 0 4px 12px rgba(10, 60, 110, .06), 0 12px 28px rgba(10, 116, 214, .10);
}

/* Sample tiles stay square whatever the photo's shape (a tall photo used to stretch its tile). */
.gallery__img { position: relative; min-height: 0; }
.gallery__img img { position: absolute; inset: 0; }
/* 3D marking samples: whole photo visible, centred in the tile */
.gallery--fit .gallery__img { background: #fff; border: 1px solid var(--line); }
.gallery--fit .gallery__img img { object-fit: contain; padding: 16px; }
/* Overview photo (background removed) shown whole and centred */
.feature__media--centred { position: relative; aspect-ratio: 4 / 3; min-height: 0; background: radial-gradient(60% 55% at 50% 50%, #fff, #eef2f7); }
.feature__media--centred img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 22px; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(15, 35, 64, .18)); }

/* ---- Accessories & options: highlighted configurator band (product pages) ----
   Dark band with the spectrum line from the logo's prism; one step visible at a time. */
.section.cfg { position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(90% 120% at 100% 0%, #1b4b88 0%, rgba(27, 75, 136, 0) 55%), radial-gradient(70% 90% at 0% 100%, #122d55 0%, rgba(18, 45, 85, 0) 60%), #0a1a33; }
.section.cfg::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, #7b4dff, #3d8bff 30%, #18b07a 48%, #ef8a1f 70%, #e23a55); }
.cfg .kicker { color: #8fcbff; }
.cfg h2 { color: #fff; }
.cfg__head { display: grid; gap: 20px; align-items: end; margin-bottom: 28px; }
.cfg__lead { margin: 10px 0 0; max-width: 56ch; color: rgba(255, 255, 255, .74); font-size: 1rem; }
.cfg__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.cfg__all { color: #cfe6ff; font-weight: 700; font-size: .92rem; text-decoration: underline; text-underline-offset: 3px; }
.cfg__all:hover { color: #fff; }
@media (min-width: 900px) { .cfg__head { grid-template-columns: 1fr auto; } .cfg__cta { justify-content: flex-end; } }

.cfg__steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 18px; }
.cfg__step { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; text-align: left; cursor: pointer;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); color: #fff; font: inherit; transition: background .2s, border-color .2s, color .2s; }
.cfg__step:hover { background: rgba(255, 255, 255, .11); }
.cfg__step:focus-visible { outline: 2px solid #8fcbff; outline-offset: 2px; }
.cfg__num { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: .95rem;
  background: rgba(255, 255, 255, .12); }
.cfg__label { display: flex; flex-direction: column; font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.2; }
.cfg__label small { font-family: var(--font-body); font-weight: 600; font-size: .78rem; color: rgba(255, 255, 255, .6); margin-top: 3px; }
.cfg__step.is-on { background: #fff; border-color: #fff; color: var(--ink); }
.cfg__step.is-on .cfg__num { background: var(--ink); color: #fff; }
.cfg__step.is-on .cfg__label small { color: var(--ink-3); }
.cfg__step.is-on::after { content: ''; position: absolute; left: 16px; right: 16px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #7b4dff, #3d8bff 30%, #18b07a 48%, #ef8a1f 70%, #e23a55); }

.cfg__pane[hidden] { display: none; }
.cfg__pane.is-on { animation: cfgIn .28s ease-out; }
@keyframes cfgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cfg__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.cfg__item { margin: 0; background: #fff; border-radius: 18px; padding: 10px 10px 12px; text-align: center; box-shadow: 0 10px 26px rgba(0, 0, 0, .22); }
.cfg__img { position: relative; aspect-ratio: 1; border-radius: 12px; background: #fff; overflow: hidden; }
.cfg__img img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 12px; object-fit: contain; }
.cfg__item figcaption { margin-top: 8px; color: var(--ink); font-weight: 700; font-size: .86rem; line-height: 1.25; }
@media (prefers-reduced-motion: reduce) { .cfg__pane.is-on { animation: none; } .cfg__step { transition: none; } }
