/* Product detail page: shared, tenant-safe layout */

:root {
  --pdp-bg: #f6f7f9;
  --pdp-card: #ffffff;
  --pdp-soft: #f8fafc;
  --pdp-line: rgba(15, 23, 42, .12);
  --pdp-line-strong: rgba(15, 23, 42, .2);
  --pdp-text: #111827;
  --pdp-muted: #64748b;
  --pdp-accent: #d97706;
  --pdp-accent-strong: #ea580c;
  --pdp-ok: #15803d;
  --pdp-warn: #b45309;
  --pdp-danger: #b91c1c;
  --pdp-shadow: 0 14px 32px rgba(15, 23, 42, .08);
  --pdp-radius: 8px;
}

body.page-product.page-white .maincontainer {
  background: transparent;
}

body.page-product.page-white {
  background:
    radial-gradient(920px 420px at 0% -12%, rgba(217, 119, 6, .10), transparent 58%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.product-page {
  max-width: 1240px;
  margin: 0 auto 48px;
  padding: 18px 18px 0;
  color: var(--pdp-text);
}

.product-page--404 {
  min-height: 50vh;
  display: grid;
  place-items: center;
}

.product-surface {
  width: min(680px, 100%);
  border: 1px solid var(--pdp-line);
  border-radius: var(--pdp-radius);
  background: var(--pdp-card);
  padding: 26px;
  box-shadow: var(--pdp-shadow);
}

.product-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--pdp-muted);
}

.product-breadcrumbs a {
  color: #334155;
  text-decoration: none;
}

.product-breadcrumbs a:hover,
.product-breadcrumbs a:focus-visible {
  color: var(--pdp-accent-strong);
  text-decoration: underline;
}

.bc-sep {
  opacity: .52;
}

.bc-current {
  max-width: 42ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
  color: var(--pdp-text);
}

.product-media-card,
.product-purchase-card,
.product-description-card,
.product-params-card,
.pdp-faq-card {
  border: 1px solid var(--pdp-line);
  border-radius: var(--pdp-radius);
  background: var(--pdp-card);
  box-shadow: var(--pdp-shadow);
}

.product-h2 {
  margin: 0 0 14px;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--pdp-text);
}

.pdp-top {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) minmax(360px, 430px);
  gap: 18px;
  align-items: start;
}

.pdp-top--no-thumbs {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
}

.pdp-thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(620px, calc(100vh - 170px));
  overflow: auto;
  padding: 2px;
}

.pg-thumb,
.pg-more {
  width: 72px;
  aspect-ratio: 1;
  border: 1px solid var(--pdp-line);
  border-radius: var(--pdp-radius);
  background: #fff;
  padding: 7px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.pg-thumb:hover,
.pg-thumb:focus-visible {
  border-color: rgba(217, 119, 6, .48);
  transform: translateY(-1px);
}

.pg-thumb.is-active {
  border-color: rgba(217, 119, 6, .72);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, .14);
}

.pg-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pdp-hero,
.pdp-buy {
  min-width: 0;
}

.product-media-card {
  padding: clamp(14px, 2vw, 22px);
}

.product-media-wrapper {
  position: relative;
  display: block;
  min-height: 460px;
}

.pg-mainBtn {
  width: 100%;
  min-height: 460px;
  border: 0;
  border-radius: var(--pdp-radius);
  background:
    linear-gradient(135deg, rgba(248, 250, 252, .94), rgba(255, 255, 255, .98));
  padding: 12px;
  cursor: zoom-in;
  display: grid;
  place-items: center;
}

.product-main-image {
  width: 100%;
  height: min(58vh, 560px);
  min-height: 420px;
  object-fit: contain;
  display: block;
}

.product-purchase-card {
  position: sticky;
  top: 88px;
  padding: 20px;
}

.product-titleblock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--pdp-line);
}

.product-titlecopy {
  min-width: 0;
}

.product-category-link {
  display: inline-flex;
  margin: 0 0 8px;
  color: var(--pdp-accent);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0;
}

.product-category-link:hover,
.product-category-link:focus-visible {
  color: var(--pdp-accent-strong);
  text-decoration: underline;
}

.product-title-main {
  margin: 0;
  color: var(--pdp-text);
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.product-lead {
  margin: 12px 0 0;
  max-width: 62ch;
  color: #475569;
  font-size: 14px;
  line-height: 1.65;
}

.product-title-actions {
  display: flex;
  gap: 8px;
}

.product-share-mini {
  width: 38px;
  aspect-ratio: 1;
  border-radius: var(--pdp-radius);
  border: 1px solid rgba(15, 23, 42, .18);
  background: #111827;
  color: #fff;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  font-weight: 850;
  line-height: 1;
}

.product-share-mini:hover,
.product-share-mini:focus-visible {
  background: #0f172a;
  transform: translateY(-1px);
}

.product-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 0;
}

.product-fact {
  min-width: 0;
  border: 1px solid var(--pdp-line);
  border-radius: var(--pdp-radius);
  background: var(--pdp-soft);
  padding: 10px 11px;
}

.product-fact-label {
  display: block;
  margin: 0 0 4px;
  color: var(--pdp-muted);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0;
}

.product-fact-value {
  display: block;
  color: var(--pdp-text);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.product-fact-status {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.product-fact-status.is-in {
  color: #0f5132;
  background: #dcfce7;
  border-color: rgba(22, 163, 74, .28);
}

.product-fact-status.is-out {
  color: #7f1d1d;
  background: #fee2e2;
  border-color: rgba(220, 38, 38, .26);
}

.product-fact-status.is-backorder {
  color: #7c2d12;
  background: #ffedd5;
  border-color: rgba(234, 88, 12, .25);
}

.product-price-block {
  margin: 18px 0 16px;
}

.product-price-lg {
  color: var(--pdp-text);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.product-price-unit {
  margin-left: 6px;
  color: var(--pdp-muted);
  font-size: 13px;
  font-weight: 700;
}

.product-old-price {
  margin-top: 8px;
  color: var(--pdp-muted);
  font-size: 14px;
  text-decoration: line-through;
}

.product-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}

.product-row--qty {
  margin-top: 4px;
}

.product-row--qty.is-disabled {
  opacity: .82;
}

.product-page .category-product-qty {
  flex: 0 0 132px;
  height: 46px;
  border: 1px solid var(--pdp-line-strong);
  border-radius: var(--pdp-radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 42px minmax(44px, 1fr) 42px;
  background: #fff;
}

.product-page .category-product-qty .qty-btn,
.product-page .category-product-qty input {
  width: 100%;
  height: 44px;
  border: 0;
  color: var(--pdp-text);
  background: #fff;
  text-align: center;
  font-weight: 800;
}

.product-page .category-product-qty .qty-btn {
  cursor: pointer;
  font-size: 18px;
  background: var(--pdp-soft);
}

.product-page .category-product-qty .qty-btn:hover {
  background: #e2e8f0;
}

.product-add-btn {
  flex: 1 1 190px;
  min-height: 46px;
  border-radius: var(--pdp-radius);
  border: 1px solid var(--pdp-accent);
  background: linear-gradient(180deg, #f59e0b, #d97706);
  color: #fff;
  font-weight: 850;
  box-shadow: 0 12px 24px rgba(217, 119, 6, .22);
}

.product-add-btn:hover,
.product-add-btn:focus-visible {
  filter: brightness(.98);
  transform: translateY(-1px);
}

.product-page .product-add-btn:disabled,
.product-page .product-add-btn[disabled] {
  background: #e5e7eb;
  border-color: #cbd5e1;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
}

.product-stock-note {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 750;
}

.product-stock-note.is-out {
  color: var(--pdp-danger);
}

.product-stock-note.is-backorder {
  color: var(--pdp-warn);
}

.product-conversion-note {
  margin-top: 16px;
  border: 1px solid rgba(217, 119, 6, .18);
  border-radius: var(--pdp-radius);
  background: #fffbeb;
  padding: 13px 14px;
}

.product-conversion-note__title {
  margin: 0 0 8px;
  color: var(--pdp-text);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 850;
}

.product-conversion-note__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.product-conversion-note__list li {
  position: relative;
  padding-left: 17px;
  color: #475569;
  font-size: 12.5px;
  line-height: 1.55;
}

.product-conversion-note__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .65em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--pdp-ok);
}

.product-row--secondary {
  margin-top: 12px;
}

.product-page .product-row--secondary .pc-icon {
  width: 42px;
  aspect-ratio: 1;
  border-radius: var(--pdp-radius);
  border: 1px solid var(--pdp-line);
  background: #fff;
  color: var(--pdp-text);
  display: inline-grid;
  place-items: center;
  box-shadow: none;
}

.product-page .product-row--secondary .pc-icon:hover,
.product-page .product-row--secondary .pc-icon:focus-visible {
  border-color: rgba(217, 119, 6, .45);
  color: var(--pdp-accent-strong);
}

.product-page .product-row--secondary .pc-icon svg {
  width: 18px;
  height: 18px;
}

.product-trust {
  display: grid;
  gap: 10px;
}

.product-trust-link,
.product-info-item {
  border: 1px solid var(--pdp-line);
  border-radius: var(--pdp-radius);
  background: var(--pdp-soft);
  text-decoration: none;
}

.product-trust-link {
  display: block;
  padding: 11px 12px;
}

.product-trust-link strong,
.product-info-item-title {
  display: block;
  margin: 0 0 4px;
  color: var(--pdp-text);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 850;
}

.product-trust-link span,
.product-info-item-text {
  display: block;
  margin: 0;
  color: var(--pdp-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.pdp-bottom {
  margin-top: 18px;
}

.pdp-desc {
  display: grid;
  gap: 16px;
}

.product-description-card,
.product-params-card {
  padding: clamp(18px, 2.4vw, 26px);
}

.product-description-text {
  color: #263244;
  font-size: 15px;
  line-height: 1.75;
}

.product-description-text p:first-child {
  margin-top: 0;
}

.product-params-tableWrap {
  overflow: auto;
  border: 1px solid var(--pdp-line);
  border-radius: var(--pdp-radius);
}

.product-params-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.product-params-table th,
.product-params-table td {
  padding: 12px 14px;
  border-top: 1px solid var(--pdp-line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.5;
}

.product-params-table tr:first-child th,
.product-params-table tr:first-child td {
  border-top: 0;
}

.product-params-table th {
  width: 34%;
  color: #475569;
  background: var(--pdp-soft);
  font-weight: 800;
}

.product-info-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.product-info-item {
  padding: 14px;
}

.product-info-item-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--pdp-accent);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.product-info-item-link:hover,
.product-info-item-link:focus-visible {
  color: var(--pdp-accent-strong);
  text-decoration: underline;
}

.pdp-more {
  margin-top: 22px;
}

.pdp-more-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.pdp-more-link {
  color: var(--pdp-accent);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.pdp-more-link:hover,
.pdp-more-link:focus-visible {
  color: var(--pdp-accent-strong);
  text-decoration: underline;
}

.pdp-more-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.brand-helper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-helper-links a {
  border: 1px solid var(--pdp-line);
  border-radius: var(--pdp-radius);
  background: #fff;
  color: var(--pdp-text);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.brand-helper-links a:hover,
.brand-helper-links a:focus-visible {
  border-color: rgba(217, 119, 6, .4);
  color: var(--pdp-accent-strong);
}

.pdp-faq-card {
  padding: 6px;
}

.pdp-faq-list {
  display: grid;
  gap: 6px;
}

.pdp-faq-item {
  border: 1px solid var(--pdp-line);
  border-radius: var(--pdp-radius);
  background: #fff;
}

.pdp-faq-question {
  cursor: pointer;
  padding: 14px 16px;
  color: var(--pdp-text);
  font-size: 14px;
  font-weight: 850;
}

.pdp-faq-answer {
  padding: 0 16px 14px;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}

.pdp-faq-answer p {
  margin: 0;
}

.pdp-faq-answer a {
  color: var(--pdp-accent);
  font-weight: 750;
}

.pg-modal[hidden] {
  display: none;
}

.pg-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.pg-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .62);
}

.pg-modal__dialog {
  position: relative;
  width: min(980px, calc(100vw - 32px));
  margin: 32px auto;
  border: 1px solid var(--pdp-line);
  border-radius: var(--pdp-radius);
  background: #fff;
  padding: 14px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .35);
}

.pg-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  aspect-ratio: 1;
  border-radius: var(--pdp-radius);
  border: 1px solid var(--pdp-line);
  background: rgba(255, 255, 255, .94);
  color: var(--pdp-text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.pg-modal__stage {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.pg-nav {
  width: 48px;
  aspect-ratio: 1;
  border-radius: var(--pdp-radius);
  border: 1px solid var(--pdp-line);
  background: #fff;
  color: var(--pdp-text);
  cursor: pointer;
  font-size: 30px;
}

.pg-modal__figure {
  margin: 0;
}

.pg-modal__img {
  width: 100%;
  height: min(70vh, 620px);
  object-fit: contain;
  display: block;
}

.pg-modal__meta {
  display: flex;
  justify-content: center;
  margin: 10px 0 0;
  color: var(--pdp-muted);
  font-size: 12px;
}

.pg-modal__thumbs {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  overflow: auto;
  padding-bottom: 4px;
}

.pg-modal__thumbs button {
  width: 74px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  border: 1px solid var(--pdp-line);
  border-radius: var(--pdp-radius);
  background: #fff;
  padding: 7px;
  cursor: pointer;
}

.pg-modal__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@media (max-width: 1080px) {
  .pdp-top,
  .pdp-top--no-thumbs {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .pdp-top--no-thumbs {
    grid-template-columns: 1fr;
  }

  .pdp-buy {
    grid-column: 1 / -1;
  }

  .product-purchase-card {
    position: static;
  }

  .product-titleblock {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .product-info-list,
  .pdp-more-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .product-page {
    padding: 12px 12px 0;
    margin-bottom: 32px;
  }

  .bc-current {
    max-width: 28ch;
  }

  .pdp-top,
  .pdp-top--no-thumbs {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pdp-thumbs {
    order: 2;
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .pdp-hero {
    order: 1;
  }

  .pdp-buy {
    order: 3;
  }

  .pg-thumb,
  .pg-more {
    width: 68px;
    flex: 0 0 auto;
  }

  .product-media-card,
  .product-purchase-card,
  .product-description-card,
  .product-params-card {
    padding: 14px;
  }

  .product-media-wrapper,
  .pg-mainBtn {
    min-height: 310px;
  }

  .product-main-image {
    height: 330px;
    min-height: 280px;
  }

  .product-titleblock {
    grid-template-columns: 1fr;
  }

  .product-title-actions {
    justify-content: flex-start;
  }

  .product-facts {
    grid-template-columns: 1fr;
  }

  .product-row--qty {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .product-add-btn {
    min-width: 0;
  }

  .product-info-list,
  .pdp-more-grid {
    grid-template-columns: 1fr;
  }

  .pdp-more-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-params-table {
    min-width: 440px;
  }

  .pg-modal__dialog {
    margin: 14px auto;
  }

  .pg-modal__stage {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  .pg-nav {
    width: 40px;
    font-size: 24px;
  }

  .pg-modal__img {
    height: 360px;
  }
}

@media (max-width: 430px) {
  .product-row--qty {
    grid-template-columns: 1fr;
  }

  .product-page .category-product-qty {
    width: 100%;
    flex-basis: auto;
  }

  .product-main-image {
    height: 290px;
  }
}
