/* =========================================================
   Product page (PDP) — Optitechno
   BEM, all blocks are namespaced with "pdp-" to avoid
   collisions with the theme. Variables are scoped to .pdp.
   Breakpoints: ≤1199 tablet landscape · ≤899 tablet · ≤599 mobile
   ========================================================= */

.pdp,
.plp {
  --pdp-bg: #F5F7FA;
  --pdp-surface: #FFFFFF;
  --pdp-ink: #0B1530;
  --pdp-text: #2A3450;
  --pdp-text-2: #3C4660;
  --pdp-muted: #56607A;
  --pdp-muted-2: #7A839C;
  --pdp-line: #E2E6EE;
  --pdp-line-soft: #EEF1F6;
  --pdp-border: #D5DBE7;
  --pdp-primary: #1652F0;
  --pdp-primary-hover: #0F43CC;
  --pdp-primary-tint: #EAF0FE;
  --pdp-chip: #F0F3F9;
  --pdp-zebra: #FAFBFD;
  --pdp-success: #1A7A49;
  --pdp-success-dot: #1F8F55;
  --pdp-success-bg: #E7F5EC;
  --pdp-error: #C2362B;
  --pdp-dark: #0B1530;

  --pdp-r-sm: 12px;
  --pdp-r-md: 14px;
  --pdp-r-lg: 16px;
  --pdp-r-xl: 20px;
  --pdp-r-2xl: 24px;

  --pdp-font: gothampro, sans-serif;
  --pdp-gutter: 32px;
  --pdp-section-y: 56px;

  color: var(--pdp-ink);
  font-family: var(--pdp-font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* Фон страницы — только у самостоятельных страниц каталога и карточки.
   На главной тот же набор токенов нужен одному блоку с товарами, а не всей
   странице: у неё своя раскладка и свой фон. */
.pdp { background: var(--pdp-bg); }

/* Resets use :where() → zero specificity, so any BEM class overrides them */
.pdp *, .pdp *::before, .pdp *::after,
.plp *, .plp *::before, .plp *::after { box-sizing: border-box; }
.pdp-visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
:where(.pdp, .plp) img { display: block; max-width: 100%; height: auto; }
:where(.pdp, .plp) :where(button, input, textarea) { font: inherit; color: inherit; }
:where(.pdp, .plp) a { color: var(--pdp-primary); text-decoration: none; }
:where(.pdp, .plp) a:hover { color: var(--pdp-primary-hover); }
:where(.pdp, .plp) :where(ul, ol) { list-style: none; margin: 0; padding: 0; }
:where(.pdp, .plp) :where(dl, dd, p, h1, h2, h3) { margin: 0; }
:where(.pdp, .plp) :where(h1, h2, h3) { font-weight: 700; }

.pdp__container {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: var(--pdp-gutter);
  padding-right: var(--pdp-gutter);
}

/* ---------- Button ---------- */
.pdp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px;
  border: 1px solid transparent; border-radius: var(--pdp-r-md);
  font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.pdp-btn--lg { height: 52px; font-size: 15px; }
.pdp-btn--primary { background: var(--pdp-primary); color: #fff; }
.pdp-btn--primary:hover { background: var(--pdp-primary-hover); }
.pdp-btn--outline { background: var(--pdp-surface); border-color: var(--pdp-border); color: var(--pdp-ink); }
.pdp-btn--outline:hover { border-color: var(--pdp-ink); }
.pdp-btn--done { background: var(--pdp-success); }
.pdp-btn--done:hover { background: var(--pdp-success); }
.pdp-btn:focus-visible { outline: 2px solid var(--pdp-primary); outline-offset: 2px; }

/* ---------- "Added" state ----------
   cart-tooltip.js marks the button with .is-added while the confirmation is
   up. The site-wide rule for that state is written for .button, which this
   one is not, so it kept the ordinary blue and no tick. Green and a tick say
   "it worked" without having to read the word. */
.pdp .pdp-btn.is-added,
.pdp .pdp-btn.is-added:hover {
  background: var(--pdp-success);
  border-color: var(--pdp-success);
  color: #fff;
}
.pdp .pdp-btn.is-added::after { content: "✓"; }

/* ---------- Badge ---------- */
.pdp-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
}
.pdp-badge--success { background: var(--pdp-success-bg); color: var(--pdp-success); }
.pdp-badge--success::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pdp-success-dot);
}

/* ---------- Chips ---------- */
.pdp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pdp-chips__item {
  padding: 6px 12px; border-radius: 999px;
  background: var(--pdp-chip); color: var(--pdp-ink);
  font-size: 13px; font-weight: 500;
}

/* ---------- Card ---------- */
.pdp-card {
  display: flex; flex-direction: column; gap: 16px;
  padding: 28px;
  background: var(--pdp-surface);
  border: 1px solid var(--pdp-line);
  border-radius: var(--pdp-r-xl);
}
.pdp-card__head { display: flex; flex-direction: column; gap: 4px; }
.pdp-card__title { font-size: 20px; letter-spacing: -.01em; }
.pdp-card__subtitle { font-size: 13px; color: var(--pdp-muted); }
.pdp-card__text { font-size: 15px; line-height: 1.6; color: var(--pdp-text-2); text-wrap: pretty; }

/* =========================================================
   HERO
   ========================================================= */
.pdp-hero { padding-top: 24px; }

.pdp-breadcrumbs__list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--pdp-muted); }
.pdp-breadcrumbs__item { display: flex; align-items: center; gap: 6px; }
.pdp-breadcrumbs__item + .pdp-breadcrumbs__item::before { content: "/"; }
.pdp-breadcrumbs__item--current { color: var(--pdp-ink); font-weight: 500; }
.pdp .pdp-breadcrumbs__link { color: var(--pdp-muted); }
.pdp .pdp-breadcrumbs__link:hover { color: var(--pdp-ink); text-decoration: underline; }

.pdp-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  margin-top: 24px;
}

/* ---------- Gallery ---------- */
.pdp-gallery { display: flex; flex-direction: column; gap: 12px; }
.pdp-gallery__main {
  aspect-ratio: 5 / 4; overflow: hidden;
  background: var(--pdp-surface);
  border: 1px solid var(--pdp-line);
  border-radius: var(--pdp-r-2xl);
}
.pdp .pdp-gallery__img { width: 100%; height: 100%; object-fit: cover; }
.pdp-gallery__thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pdp-gallery__thumb {
  aspect-ratio: 5 / 4; padding: 0; overflow: hidden; cursor: pointer;
  background: var(--pdp-surface);
  border: 2px solid var(--pdp-line);
  border-radius: var(--pdp-r-md);
  transition: border-color .2s;
}
.pdp-gallery__thumb:hover { border-color: #B9C6E4; }
.pdp-gallery__thumb--active, .pdp-gallery__thumb--active:hover { border-color: var(--pdp-primary); }
.pdp .pdp-gallery__thumb-img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Info ---------- */
.pdp-info { display: flex; flex-direction: column; gap: 24px; }
.pdp-info__head { display: flex; flex-direction: column; gap: 14px; }
.pdp-info__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; }
.pdp-info__sku { color: var(--pdp-muted); }
.pdp-info__title {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05; letter-spacing: -.03em;
}

/* ---------- Summary (lead + key params) ---------- */
.pdp-summary {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--pdp-surface);
  border: 1px solid var(--pdp-line);
  border-radius: var(--pdp-r-lg);
}
.pdp-summary__lead {
  padding: 18px 18px 16px;
  font-size: 15px; line-height: 1.6; color: var(--pdp-text-2); text-wrap: pretty;
  border-bottom: 1px solid var(--pdp-line);
}
.pdp-summary__params { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pdp-summary__param { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; }
.pdp-summary__param:nth-child(odd) { border-right: 1px solid var(--pdp-line); }
.pdp-summary__param:nth-child(-n+2) { border-bottom: 1px solid var(--pdp-line); }
.pdp-summary__label { font-size: 12px; color: var(--pdp-muted); }
.pdp-summary__value { font-size: 14px; font-weight: 500; line-height: 1.4; }
.pdp .pdp-summary__link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-top: 1px solid var(--pdp-line);
  font-size: 14px; font-weight: 500;
  transition: background-color .2s;
}
.pdp .pdp-summary__link:hover { background: #F5F8FF; }

/* ---------- Buy box ---------- */
.pdp-buybox {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px;
  background: var(--pdp-surface);
  border: 1px solid var(--pdp-line);
  border-radius: var(--pdp-r-xl);
}
.pdp-buybox__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.pdp-buybox__price { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.pdp-buybox__note { font-size: 13px; color: var(--pdp-muted); }
.pdp-buybox__row { display: flex; flex-wrap: wrap; gap: 10px; }
.pdp-buybox__main { flex: 1 1 180px; }
.pdp-buybox__secondary { flex: 1 1 160px; }

/* ---------- Quantity ---------- */
.pdp-qty {
  display: flex; align-items: center; height: 52px; overflow: hidden;
  border: 1px solid var(--pdp-border); border-radius: var(--pdp-r-md);
}
.pdp-qty__btn {
  width: 44px; height: 100%; border: 0; background: transparent;
  font-size: 20px; cursor: pointer; transition: background-color .2s;
}
.pdp-qty__btn:hover { background: var(--pdp-chip); }
.pdp-qty__input {
  width: 48px; height: 100%; border: 0; background: transparent; text-align: center;
  font-size: 15px; -moz-appearance: textfield; appearance: textfield;
}
.pdp-qty__input::-webkit-outer-spin-button,
.pdp-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-qty__input:focus { outline: none; background: var(--pdp-chip); }

/* ---------- Perks ---------- */
.pdp-perks {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  font-size: 13px; line-height: 1.45;
}
.pdp-perks__item { display: flex; align-items: flex-start; gap: 12px; }
.pdp-perks__icon {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--pdp-primary-tint); color: var(--pdp-primary);
}
.pdp-perks__body { display: flex; flex-direction: column; gap: 2px; }
.pdp-perks__title { font-weight: 500; }
.pdp-perks__text { color: var(--pdp-muted); }

/* =========================================================
   SECTION NAV
   The export pinned this bar under the header. It is not pinned here: the
   site header is fixed and 140px tall, and a second bar stuck beneath it left
   too little of the page. Everything else about it is the export's.
   ========================================================= */
.pdp-nav {
  margin-top: 64px;
  border-bottom: 1px solid var(--pdp-line);
}
.pdp-nav__inner { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; }
.pdp-nav__inner::-webkit-scrollbar { display: none; }
.pdp .pdp-nav__link {
  flex: none; padding: 18px 0 16px;
  font-size: 15px; font-weight: 500; color: var(--pdp-muted-2);
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.pdp .pdp-nav__link:hover { color: var(--pdp-ink); }
.pdp .pdp-nav__link--active { color: var(--pdp-ink); border-bottom-color: var(--pdp-primary); }

/* =========================================================
   SECTIONS
   ========================================================= */
.pdp-section {
  display: flex; flex-direction: column; gap: 24px;
  padding: var(--pdp-section-y) 0 24px;
  scroll-margin-top: 72px;
}
.pdp-section--aside {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr);
  gap: 24px 64px;
}
.pdp-section__head { display: flex; flex-direction: column; gap: 12px; }
.pdp-section__eyebrow { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--pdp-primary); }
.pdp-section__title { font-size: 32px; line-height: 1.1; letter-spacing: -.02em; }

/* ---------- Description (Read more) ---------- */
.pdp-description { position: relative; display: flex; flex-direction: column; gap: 16px; max-width: 820px; min-width: 0; }
.pdp-description__body {
  display: flex; flex-direction: column; gap: 20px;
  max-height: 220px; overflow: hidden;
  transition: max-height .45s ease;
  font-size: 16px; line-height: 1.75; color: var(--pdp-text); text-wrap: pretty;
}
.pdp-description__body strong { font-weight: 700; color: var(--pdp-ink); }
.pdp-description__fade {
  position: absolute; left: 0; right: 0;
  bottom: 40px; /* toggle height + gap */
  height: 120px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(245, 247, 250, 0) 0%, var(--pdp-bg) 90%);
  transition: opacity .3s;
}
.pdp-description__toggle {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer;
  font-size: 15px; font-weight: 500; color: var(--pdp-primary);
}
.pdp-description__toggle:hover { color: var(--pdp-primary-hover); }
.pdp-description__toggle-icon { transition: transform .3s; }
.pdp-description--expanded .pdp-description__fade { opacity: 0; }
.pdp-description--expanded .pdp-description__toggle-icon { transform: rotate(180deg); }

/* ---------- Specs table (WooCommerce-like attributes) ---------- */
.pdp-specs {
  width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden;
  background: var(--pdp-surface);
  border: 1px solid var(--pdp-line);
  border-radius: var(--pdp-r-xl);
  font-size: 14px;
}
.pdp-specs__head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.pdp-specs__row:nth-child(even) { background: var(--pdp-zebra); }
.pdp-specs__name, .pdp-specs__value { padding: 14px 20px; text-align: left; vertical-align: top; }
.pdp-specs__row + .pdp-specs__row .pdp-specs__name,
.pdp-specs__row + .pdp-specs__row .pdp-specs__value { border-top: 1px solid var(--pdp-line-soft); }
.pdp-specs__name { width: 360px; font-weight: 500; color: var(--pdp-ink); }
.pdp-specs__value { line-height: 1.5; color: var(--pdp-text-2); }

/* ---------- Steps ---------- */
.pdp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pdp-steps__item {
  display: flex; flex-direction: column; gap: 20px; padding: 24px;
  background: var(--pdp-surface);
  border: 1px solid var(--pdp-line);
  border-radius: var(--pdp-r-xl);
}
.pdp-steps__num { font-size: 28px; color: var(--pdp-primary); }
.pdp-steps__text { font-size: 16px; font-weight: 500; line-height: 1.4; }

/* ---------- Shipping ---------- */
.pdp-shipping { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pdp-shipping__carriers { margin-top: auto; }
.pdp-shipping__incoterms {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding-top: 16px; border-top: 1px solid var(--pdp-line-soft);
}
.pdp-shipping__label { font-size: 13px; color: var(--pdp-muted); }
.pdp-shipping__note {
  padding: 14px 16px; border-radius: var(--pdp-r-sm);
  background: var(--pdp-primary-tint);
  font-size: 13px; line-height: 1.55;
}

.pdp-leadtimes { display: flex; flex-direction: column; }
.pdp-leadtimes__row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 14px 0; font-size: 14px;
}
.pdp-leadtimes__row + .pdp-leadtimes__row { border-top: 1px solid var(--pdp-line-soft); }
.pdp-leadtimes__label { color: var(--pdp-text-2); }
.pdp-leadtimes__value { flex: none; font-weight: 500; }

/* ---------- Facts ---------- */
.pdp-facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
  padding: 24px 0; border-top: 1px solid var(--pdp-line);
  font-size: 14px; line-height: 1.5;
}
.pdp-facts__item { display: flex; flex-direction: column; gap: 4px; }
.pdp-facts__title { font-weight: 500; }
.pdp-facts__text { color: var(--pdp-muted); }
.pdp .pdp-facts__link { font-weight: 500; }

/* ---------- Related ---------- */
.pdp-related { padding-bottom: 80px; }
.pdp-related__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.pdp .pdp-related__all { font-size: 14px; font-weight: 500; }
.pdp-related__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

.pdp .pdp-product-card {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  background: var(--pdp-surface); color: var(--pdp-ink);
  border: 1px solid var(--pdp-line);
  border-radius: var(--pdp-r-xl);
  transition: border-color .2s, box-shadow .2s;
}
.pdp .pdp-product-card:hover { color: var(--pdp-ink); border-color: #B9C6E4; box-shadow: 0 8px 24px rgba(11, 21, 48, .06); }
/* square, like the catalogue cards: 96% of the catalogue's photos are square,
   so 4:3 was cropping a quarter of the height off almost every one of them */
.pdp .pdp-product-card__img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.pdp-product-card__body { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; }
.pdp-product-card__info { display: flex; flex-direction: column; gap: 4px; }
.pdp-product-card__name { font-size: 17px; font-weight: 500; }
.pdp-product-card__price { font-size: 13px; color: var(--pdp-muted); }
.pdp-product-card__arrow {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--pdp-r-sm);
  background: var(--pdp-chip); color: var(--pdp-primary); font-weight: 500;
  transition: background-color .2s, color .2s;
}
.pdp .pdp-product-card:hover .pdp-product-card__arrow { background: var(--pdp-primary); color: #fff; }

/* =========================================================
   CONTACT
   ========================================================= */
.pdp-contact { background: var(--pdp-primary); color: #fff; scroll-margin-top: 56px; }
.pdp-contact__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px; align-items: start;
  padding-top: 80px; padding-bottom: 80px;
}
.pdp-contact__lab { display: flex; flex-direction: column; gap: 20px; max-width: 480px; }
.pdp-contact__eyebrow { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.pdp-contact__title { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.02; letter-spacing: -.03em; }
.pdp-contact__text { font-size: 17px; line-height: 1.6; text-wrap: pretty; }
.pdp-contact__offices {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px;
  margin-top: 16px; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .3);
  font-size: 14px; line-height: 1.6;
}
.pdp-contact__office { display: flex; flex-direction: column; font-style: normal; }
.pdp-contact__office-name { font-weight: 500; }
.pdp .pdp-contact__office-link { color: #fff; }
.pdp .pdp-contact__office-link:hover { color: #fff; text-decoration: underline; }

/* ---------- Form ---------- */
.pdp-form-wrap {
  padding: 32px;
  background: var(--pdp-surface); color: var(--pdp-ink);
  border-radius: var(--pdp-r-2xl);
}
.pdp-form { display: flex; flex-direction: column; gap: 16px; }
.pdp-form[hidden], .pdp-form-success[hidden] { display: none; }
.pdp-form__title { font-size: 24px; letter-spacing: -.02em; }
.pdp-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pdp-form__field { display: flex; flex-direction: column; gap: 6px; }
.pdp-form__label { font-size: 13px; font-weight: 500; }
.pdp-form__input {
  width: 100%; height: 48px; padding: 0 14px;
  background: var(--pdp-bg);
  border: 1px solid var(--pdp-border);
  border-radius: var(--pdp-r-sm);
  font-size: 15px; color: var(--pdp-ink);
  transition: border-color .2s, background-color .2s;
}
.pdp-form__input::placeholder { color: #8A93AB; }
.pdp-form__input:focus { outline: none; border-color: var(--pdp-primary); background: var(--pdp-surface); }
.pdp-form__input--textarea { height: auto; min-height: 128px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.pdp-form__input--invalid { border-color: var(--pdp-error); }
.pdp-form__footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: 4px; }

.pdp-form__check { position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; color: var(--pdp-muted); }
.pdp-form__check-input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; }
.pdp-form__check-box {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--pdp-surface); border: 1.5px solid #B4BCD0;
  transition: background-color .2s, border-color .2s;
}
.pdp-form__check-input:checked + .pdp-form__check-box { background: var(--pdp-primary); border-color: var(--pdp-primary); }
.pdp-form__check-input:checked + .pdp-form__check-box::after { content: "✓"; color: #fff; font-size: 12px; font-weight: 700; }
.pdp-form__check-input:focus-visible + .pdp-form__check-box { outline: 2px solid var(--pdp-primary); outline-offset: 2px; }
.pdp-form__error { font-size: 13px; font-weight: 500; color: var(--pdp-error); }

.pdp-form-success { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px 0; }
.pdp-form-success__icon {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--pdp-success-bg); color: var(--pdp-success);
  font-size: 22px; font-weight: 700;
}
.pdp-form-success__title { font-size: 24px; letter-spacing: -.02em; }
.pdp-form-success__text { font-size: 15px; line-height: 1.6; color: var(--pdp-muted); }
.pdp-form-success__again { margin-top: 8px; }

/* =========================================================
   STICKY BAR
   ========================================================= */
.pdp-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  pointer-events: none;
  opacity: 0; transform: translateY(120%);
  transition: transform .3s ease, opacity .3s ease;
}
.pdp-sticky--visible { opacity: 1; transform: translateY(0); }
.pdp-sticky__inner {
  display: flex; align-items: center; gap: 16px;
  max-width: 880px; margin: 0 auto;
  padding: 10px 10px 10px 12px;
  background: var(--pdp-dark); color: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(11, 21, 48, .25);
  pointer-events: auto;
}
.pdp .pdp-sticky__img { flex: none; width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.pdp-sticky__title { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdp-sticky__btn { height: 44px; padding: 0 18px; border-radius: var(--pdp-r-sm); }

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablet landscape / small laptop */
@media (max-width: 1199px) {
  .pdp { --pdp-gutter: 24px; }
  .pdp-hero__grid { gap: 32px; }
  .pdp-perks { grid-template-columns: 1fr; gap: 12px; }
  .pdp-section--aside { grid-template-columns: minmax(200px, 1fr) minmax(0, 2.5fr); gap: 24px 40px; }
  .pdp-specs__name { width: 280px; }
  .pdp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pdp-contact__inner { gap: 32px; }
}

/* Tablet portrait */
@media (max-width: 899px) {
  .pdp { --pdp-section-y: 48px; }
  .pdp-hero__grid { grid-template-columns: 1fr; }
  .pdp-gallery { max-width: 640px; }
  .pdp-perks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .pdp-nav { margin-top: 48px; }
  .pdp-section--aside { grid-template-columns: 1fr; gap: 20px; }
  .pdp-section__title { font-size: 28px; }
  .pdp-specs__name { width: 40%; }
  .pdp-steps { grid-template-columns: 1fr; }
  .pdp-steps__item { flex-direction: row; align-items: center; gap: 20px; padding: 20px; }
  .pdp-steps__num { flex: none; font-size: 24px; }
  .pdp-shipping { grid-template-columns: 1fr; }
  .pdp-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pdp-contact__inner { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 56px; }
  .pdp-contact__lab { max-width: none; }
}

/* Mobile */
@media (max-width: 599px) {
  .pdp { --pdp-gutter: 16px; --pdp-section-y: 40px; }
  .pdp-hero { padding-top: 16px; }
  .pdp-breadcrumbs__list { font-size: 12px; }
  .pdp-hero__grid { gap: 24px; margin-top: 16px; }
  .pdp-gallery__main { border-radius: var(--pdp-r-xl); }
  .pdp-gallery__thumbs { gap: 8px; }
  .pdp-gallery__thumb { border-radius: 10px; }
  .pdp-info { gap: 20px; }

  .pdp-summary__params { grid-template-columns: 1fr; }
  .pdp-summary__param:nth-child(odd) { border-right: 0; }
  .pdp-summary__param:nth-child(-n+3) { border-bottom: 1px solid var(--pdp-line); }

  .pdp-buybox { padding: 16px; }
  .pdp-buybox__main { flex-basis: 160px; }
  .pdp-buybox__secondary { flex: 1 1 100%; }

  .pdp-perks { grid-template-columns: 1fr; gap: 12px; }


  .pdp-nav { margin-top: 40px; }
  .pdp-nav__inner { gap: 20px; }
  .pdp .pdp-nav__link { padding: 14px 0 12px; font-size: 14px; }

  .pdp-section__title { font-size: 24px; }
  .pdp-description__body { font-size: 15px; line-height: 1.7; }

  /* Specs: responsive table — each row becomes a card, label comes from data-label.
     Row header <th> stays in the a11y tree (visually hidden), so screen readers
     announce "Operating range, 0.8–1.6 µm" while the ::before label is decorative. */
  .pdp-specs, .pdp-specs tbody, .pdp-specs__row, .pdp-specs__value { display: block; width: 100%; }
  .pdp-specs { border-radius: var(--pdp-r-lg); }
  .pdp-specs__row { padding: 12px 16px; }
  .pdp-specs__row + .pdp-specs__row { border-top: 1px solid var(--pdp-line-soft); }
  .pdp-specs__row + .pdp-specs__row .pdp-specs__value { border-top: 0; }
  .pdp-specs__name { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
  .pdp-specs__value { display: flex; flex-direction: column; gap: 2px; padding: 0; font-size: 15px; color: var(--pdp-ink); }
  .pdp-specs__value::before {
    content: attr(data-label);
    content: attr(data-label) / "";
    font-size: 12px; font-weight: 500; color: var(--pdp-muted);
  }

  .pdp-card { padding: 20px; }
  .pdp-leadtimes__row { flex-direction: column; gap: 2px; }
  .pdp-facts { grid-template-columns: 1fr; gap: 16px; }

  .pdp-related { padding-bottom: 56px; }
  .pdp-related__grid { grid-template-columns: 1fr; }

  .pdp-contact__inner { padding-top: 48px; padding-bottom: 48px; }
  .pdp-contact__offices { grid-template-columns: 1fr; }
  .pdp-form-wrap { padding: 20px; border-radius: var(--pdp-r-xl); }
  .pdp-form__row { grid-template-columns: 1fr; }
  .pdp-form__submit { width: 100%; }

  .pdp-sticky { padding-left: 8px; padding-right: 8px; }
  .pdp-sticky__inner { gap: 12px; }
  .pdp .pdp-sticky__img { width: 40px; height: 40px; }
  .pdp-sticky__title { font-size: 13px; }
  .pdp-sticky__btn { padding: 0 14px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .pdp *, .pdp *::before, .pdp *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* =========================================================
   WordPress integration
   Everything below is added on top of the markup export:
   the fixed site header, data that comes from the database
   instead of the mockup, and the Contact Form 7 output.
   ========================================================= */

/* ---------- Fixed site header ----------
   The theme's header is position:fixed, 140px tall (90px below 1200px).
   The page reserves the room itself instead of relying on the .products
   class, and every anchor clears it. */
.pdp {
  --pdp-header-h: 140px;
  padding-top: var(--pdp-header-h);
}
.pdp .pdp-section { scroll-margin-top: calc(var(--pdp-header-h) + 24px); }
.pdp .pdp-contact { scroll-margin-top: calc(var(--pdp-header-h) + 16px); }

/* ---------- Space between sections ----------
   The theme spaces every <section> on the site:
   "section:not(:first-child) {padding: 90px 0 95px}". One element of
   specificity, and it outweighed the export's own .pdp-section — which is
   what made the gaps enormous. Hence the .pdp prefix on each rule here.

   The export itself had spaced the sections for a page with a nav pinned
   beside them; with the nav standing still at the top, 56px above plus 24px
   below reads as a gap rather than a seam, so it is halved. */
.pdp .pdp-section {
  padding-top: calc(var(--pdp-section-y) / 2);
  padding-bottom: 12px;
}
.pdp .pdp-related { padding-bottom: 80px; }
.pdp .pdp-contact { padding-top: 0; padding-bottom: 0; }

@media (max-width: 599px) {
  .pdp .pdp-related { padding-bottom: 56px; }
}

@media (max-width: 1200px) {
  .pdp { --pdp-header-h: 90px; }
}

/* ---------- Resets ----------
   The export resets with :where(), which has zero specificity on purpose so
   that BEM classes win. Against the theme that backfires: "ul", "a" and "h1"
   carry one element each and beat zero, so the theme's own resets won.

   The answer is one element of specificity and not a grain more — the .pdp
   class sits inside :where() so it adds nothing, and this file loads after the
   theme, which settles the tie. Writing ".pdp ul" instead would have been one
   class too many: it beat ".pdp-facts {padding: 24px 0}" and flattened the row
   of facts against its rule, and ".pdp a" beat ".pdp-btn--primary" and left
   "Add to quote" blue on blue. */
:where(.pdp, .plp) :is(p, dl, dd, dt, h1, h2, h3) { margin: 0; }
:where(.pdp, .plp) :is(ul, ol) { margin: 0; padding: 0; list-style: none; }
:where(.pdp, .plp) li { margin: 0; }
:where(.pdp, .plp) li::before,
:where(.pdp, .plp) li::marker { content: none; }
:where(.pdp, .plp) img { display: block; max-width: 100%; height: auto; }
:where(.pdp, .plp) button { font-family: inherit; }

/* The theme paints every heading in its own navy (".h1, h1 {color:#00226C}").
   Headings take the colour of whatever they sit in again — which is what makes
   the heading on the blue contact block white. */
:where(.pdp, .plp) :is(h1, h2, h3) { color: inherit; }
:where(.pdp, .plp) a { color: var(--pdp-primary); }
:where(.pdp, .plp) a:hover { color: var(--pdp-primary-hover); }

/* "Add to quote" is the WooCommerce link, not a <button>: :hover on the rule
   above outweighs a plain class, so the button states say it themselves. */
.pdp-btn--primary,
.pdp-btn--primary:hover,
.pdp-btn--done,
.pdp-btn--done:hover { color: #fff; }
.pdp-btn--outline,
.pdp-btn--outline:hover { color: var(--pdp-ink); }

/* ---------- Breadcrumbs ----------
   Yoast prints nested <span> elements with "/" between them, and it is the
   only thing on the site that also emits BreadcrumbList schema, so its markup
   is kept and only typeset here. */
.pdp-breadcrumbs {
  font-size: 13px; line-height: 1.6; color: var(--pdp-muted);
}
.pdp .pdp-breadcrumbs a { color: var(--pdp-muted); }
.pdp .pdp-breadcrumbs a:hover { color: var(--pdp-ink); text-decoration: underline; }
.pdp .pdp-breadcrumbs .breadcrumb_last { color: var(--pdp-ink); font-weight: 500; }

@media (max-width: 599px) {
  .pdp-breadcrumbs { font-size: 12px; }
}

/* ---------- Gallery ----------
   Optics are photographed on white and are rarely 5:4, so the photo is fitted
   rather than cropped: "cover" cut the edges off a product on most cards. */
.pdp .pdp-gallery__img { object-fit: contain; padding: 24px; }
.pdp .pdp-gallery__thumb-img { object-fit: contain; padding: 6px; }

/* The export laid the thumbnails out as a four-column grid. Products here
   carry up to a dozen photos, and the ones past the fourth dropped onto a
   second row with empty space beside them. One scrolling row instead: four
   still fill the width exactly, anything beyond that scrolls. */
.pdp-gallery__thumbs-wrap { position: relative; }
.pdp .pdp-gallery__thumbs {
  --pdp-thumb-gap: 12px;
  --pdp-thumb-visible: 4;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: calc(
    (100% - (var(--pdp-thumb-visible) - 1) * var(--pdp-thumb-gap)) / var(--pdp-thumb-visible)
  );
  gap: var(--pdp-thumb-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* the 2px focus ring of the active thumbnail must not be clipped away */
  padding: 2px;
  margin: -2px;
}
.pdp .pdp-gallery__thumbs::-webkit-scrollbar { display: none; }
.pdp-gallery__thumb { scroll-snap-align: start; }

.pdp-gallery__arrow {
  position: absolute; top: 50%; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  transform: translateY(-50%);
  background: var(--pdp-surface); color: var(--pdp-ink);
  border: 1px solid var(--pdp-border); border-radius: 50%;
  box-shadow: 0 4px 14px rgba(11, 21, 48, .12);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.pdp-gallery__arrow:hover { border-color: var(--pdp-ink); }
.pdp-gallery__arrow:focus-visible { outline: 2px solid var(--pdp-primary); outline-offset: 2px; }
.pdp-gallery__arrow[hidden] { display: none; }
.pdp-gallery__arrow--prev { left: -6px; }
.pdp-gallery__arrow--next { right: -6px; }

@media (max-width: 599px) {
  .pdp .pdp-gallery__img { padding: 16px; }
  .pdp .pdp-gallery__thumbs { --pdp-thumb-gap: 8px; }
  .pdp-gallery__arrow { width: 30px; height: 30px; }
  .pdp-gallery__arrow--prev { left: -4px; }
  .pdp-gallery__arrow--next { right: -4px; }
}

/* ---------- Sticky bar vs the modals ----------
   The quote modals sit at z-index 11 and the bar at 30, so it covered the
   form it had just opened. The theme marks an open modal by putting the class
   "hidden" on <html> — the same signal it uses to stop the page scrolling —
   and all four modals set it, so the bar steps aside for every one of them.
   visibility keeps it out of the tab order as well. */
html.hidden .pdp-sticky {
  opacity: 0;
  visibility: hidden;
  transform: translateY(120%);
  pointer-events: none;
}

/* ---------- Floating widgets ----------
   Three things float over the page: the theme's own call menu
   (.fixed-contact, z-index 9999), the CookieYes revisit button and the
   Tawk.to bubble, which sits at z-index 2000000000 and cannot be outranked.
   So they are moved out of the way instead of fought over.

   This file only loads on product pages, so the rest of the site is
   untouched. Tawk.to has no stable selector — its container id is generated
   per page load — and is switched off through its own API in pdp.js.

   While a modal is open nothing may float over it. */
html.hidden .fixed-contact,
html.hidden .cky-btn-revisit-wrapper {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.fixed-contact,
.cky-btn-revisit-wrapper { transition: opacity .25s ease, visibility .25s ease; }

/* Narrow screens: the sticky bar runs the full width and its button lands in
   the same bottom-right corner as the call menu. The bar is the offer the
   visitor is looking at, so it has the corner while it is on screen; wider
   than this the bar is 880px centred and nothing overlaps. */
@media (max-width: 940px) {
  html.pdp-bar-visible .fixed-contact,
  html.pdp-bar-visible .cky-btn-revisit-wrapper {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

/* ---------- Availability ----------
   Three WooCommerce stock statuses, not just the one in the mockup. */
.pdp-badge--in { background: var(--pdp-success-bg); color: var(--pdp-success); }
.pdp-badge--in::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pdp-success-dot);
}
.pdp-badge--backorder { background: #FDF1DF; color: #8A5A00; }
.pdp-badge--backorder::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: #B97E12;
}
.pdp-badge--out { background: var(--pdp-chip); color: var(--pdp-muted); }
.pdp-badge--out::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--pdp-muted-2);
}

/* ---------- Price ----------
   WooCommerce returns the price as markup, and with no prices in the catalogue
   that markup is the "Price on request" line. */
.pdp-buybox__price .price-on-request,
.pdp-buybox__price .woocommerce-Price-amount { font: inherit; color: inherit; }
.pdp-product-card__price .price-on-request { font: inherit; color: inherit; }

/* ---------- Perks ----------
   The number of items is up to the client, so the row fits whatever it gets
   instead of assuming three. */
.pdp-perks { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.pdp .pdp-perks__title { color: inherit; }
.pdp a.pdp-perks__title:hover { color: var(--pdp-primary); text-decoration: underline; }

@media (max-width: 1199px) {
  .pdp-perks { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
}
@media (max-width: 899px) {
  .pdp-perks { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
}
@media (max-width: 599px) {
  .pdp-perks { grid-template-columns: 1fr; }
}

/* ---------- Description ----------
   The text comes from the editor, so it can bring lists and links of its own. */
.pdp-description__body ul,
.pdp-description__body ol { padding-left: 20px; }
.pdp-description__body ul { list-style: disc; }
.pdp-description__body ol { list-style: decimal; }
.pdp-description__body li { margin-bottom: 6px; }
.pdp-description__body li::marker { content: unset; }
.pdp-description__body a { text-decoration: underline; }
.pdp-description__body h2 {
  font-size: 22px; line-height: 1.3; letter-spacing: -.01em; text-transform: none;
}
.pdp-description__body h3 {
  font-size: 18px; line-height: 1.35; text-transform: none;
}
.pdp-description__body img { border-radius: var(--pdp-r-sm); }
/* 437 descriptions carry a table; the theme already wraps wide ones in a
   scrolling region, and here the gap of the column spaces them */
.pdp-description__body .table-scroll { margin: 0; }
.pdp-description__body table { background: var(--pdp-surface); }

/* ---------- Specifications ----------
   main.min.css draws a black 1px border around every table cell on the site,
   which boxed in each row here. The table keeps only the hairline between its
   rows, which the base rules above set with a higher specificity than this
   reset. Imported values are long, so names have to be allowed to wrap. */
.pdp-specs th,
.pdp-specs td { border: 0; }
.pdp-specs__name { word-break: break-word; }
.pdp-specs__value { word-break: break-word; }

/* =========================================================
   CONTACT FORM 7
   The same footer-form-en form the rest of the site uses, so submissions keep
   arriving where they did. Only its appearance is set here — the form itself
   is not touched.
   ========================================================= */
/* the heading sits outside the form, so the gap between them is set here
   rather than by the form's own flex column */
.pdp-form-wrap { display: flex; flex-direction: column; gap: 16px; }
.pdp-form-wrap .wpcf7 { margin: 0; }
.pdp-form-wrap .wpcf7-form { display: flex; flex-direction: column; gap: 16px; }
.pdp-form-wrap .screen-reader-response { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.pdp-form-wrap .hidden-fields-container { display: none; }

.pdp-form-wrap .main--form__block { display: flex; flex-direction: column; gap: 6px; }
.pdp-form-wrap .main--form__block > label { font-size: 13px; font-weight: 500; color: var(--pdp-ink); }
.pdp-form-wrap .wpcf7-form-control-wrap { display: block; }

.pdp-form-wrap input[type="text"],
.pdp-form-wrap input[type="email"],
.pdp-form-wrap input[type="tel"],
.pdp-form-wrap textarea {
  width: 100%; height: 48px; padding: 0 14px;
  background: var(--pdp-bg);
  border: 1px solid var(--pdp-border);
  border-radius: var(--pdp-r-sm);
  font-family: inherit; font-size: 15px; color: var(--pdp-ink);
  transition: border-color .2s, background-color .2s;
}
/* the form is Contact Form 7's, and it asks for rows="10" — 251px of empty
   box that towered over the text beside it. Four lines is enough to start
   writing in, and the corner still drags it taller. */
.pdp-form-wrap textarea {
  height: 120px;
  min-height: 120px;
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
}
.pdp-form-wrap input::placeholder,
.pdp-form-wrap textarea::placeholder { color: #8A93AB; }
.pdp-form-wrap input:focus,
.pdp-form-wrap textarea:focus { outline: none; border-color: var(--pdp-primary); background: var(--pdp-surface); }
.pdp-form-wrap .wpcf7-not-valid { border-color: var(--pdp-error); }
.pdp-form-wrap .wpcf7-not-valid-tip { margin-top: 4px; font-size: 12px; color: var(--pdp-error); }

.pdp-form-wrap .main--form__footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 16px; margin-top: 4px;
}
.pdp-form-wrap .main--form__check { display: flex; align-items: center; }
.pdp-form-wrap .main--form__check input[type="checkbox"] { position: absolute; width: 20px; height: 20px; opacity: 0; margin: 0; }
.pdp-form-wrap .main--form__check label {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: 13px; line-height: 1.4; color: var(--pdp-muted);
}
.pdp-form-wrap .main--form__check label::before {
  content: ""; flex: none;
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--pdp-surface); border: 1.5px solid #B4BCD0;
  transition: background-color .2s, border-color .2s;
}
.pdp-form-wrap .main--form__check input[type="checkbox"]:checked + label::before {
  background: var(--pdp-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3.5 8.5 3 3 6-7'/%3E%3C/svg%3E") center / 13px no-repeat;
  border-color: var(--pdp-primary);
}
.pdp-form-wrap .main--form__check input[type="checkbox"]:focus-visible + label::before { outline: 2px solid var(--pdp-primary); outline-offset: 2px; }
.pdp-form-wrap .main--form__check a { color: var(--pdp-primary); text-decoration: underline; }

.pdp-form-wrap .wpcf7-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 24px;
  background: var(--pdp-primary); color: #fff;
  border: 1px solid transparent; border-radius: var(--pdp-r-md);
  font-family: inherit; font-size: 15px; font-weight: 500; line-height: 1; white-space: nowrap;
  cursor: pointer; transition: background-color .2s;
}
.pdp-form-wrap .wpcf7-submit:hover { background: var(--pdp-primary-hover); }
.pdp-form-wrap .wpcf7-spinner { margin: 0 0 0 12px; }

.pdp-form-wrap .wpcf7-response-output {
  margin: 0; padding: 12px 14px;
  border-width: 1px; border-radius: var(--pdp-r-sm);
  font-size: 13px; line-height: 1.5;
}

@media (max-width: 599px) {
  .pdp-form-wrap .main--form__footer { flex-direction: column; align-items: stretch; }
  .pdp-form-wrap .wpcf7-submit { width: 100%; }
}
