/* Product page styles: every rule is scoped to #product-details. */
#product-details {
  --pd-ink: #172033;
  --pd-muted: #657087;
  --pd-red: #a80f16;
  --pd-red-dark: #7f080d;
  --pd-line: #e1e5ec;
  --pd-soft: #f5f7fa;
  background: #fff;
  color: var(--pd-ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
  padding: 34px 20px 80px;
}

#product-details *,
#product-details *::before,
#product-details *::after {
  box-sizing: border-box;
}

#product-details h1,
#product-details h2,
#product-details h3 {
  font-family: "Oswald", sans-serif;
}

#product-details .pd-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

#product-details .pd-breadcrumbs {
  margin: 0 0 22px;
}

#product-details .pd-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

#product-details .pd-breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: #aab1bf;
}

#product-details .pd-breadcrumbs a {
  color: var(--pd-muted);
  text-decoration: none;
}

#product-details .pd-breadcrumbs a:hover {
  color: var(--pd-red);
}

#product-details .pd-product {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: 58px;
  align-items: start;
  padding: 24px 0 52px;
}

#product-details .pd-gallery {
  position: sticky;
  top: 84px;
  align-self: start;
  min-width: 0;
}

#product-details .pd-image-link {
  position: relative;
  display: flex;
  min-height: 420px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--pd-line);
  border-radius: 24px;
  background: linear-gradient(145deg, #fff 15%, #f2f4f7 100%);
  box-shadow: 0 24px 55px rgba(23, 32, 51, 0.09);
}

#product-details .pd-image-link img {
  display: block;
  width: 94%;
  height: auto;
  max-height: 365px;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.35s ease;
}

#product-details .pd-image-link:hover img {
  transform: scale(1.025);
}

#product-details .pd-image-badge {
  position: absolute;
  z-index: 1;
  top: 18px;
  left: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--pd-ink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#product-details .pd-enlarge {
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: var(--pd-muted);
  font-size: 13px;
  font-weight: 600;
}

#product-details .pd-thumb-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

#product-details .pd-thumb-strip a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--pd-line);
  border-radius: 10px;
}

#product-details .pd-thumb-strip img {
  display: block;
  width: 75px;
  height: auto;
}

#product-details .pd-eyebrow,
#product-details .pd-section-kicker {
  margin: 0 0 6px;
  color: var(--pd-red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#product-details h1 {
  margin: 0 0 11px;
  color: var(--pd-ink);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

#product-details .pd-sku {
  display: inline-flex;
  margin: 0 0 22px;
  padding: 6px 11px;
  border: 1px solid var(--pd-line);
  border-radius: 6px;
  color: var(--pd-muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}

#product-details .pd-sku strong {
  margin-left: 5px;
  color: var(--pd-ink);
}

#product-details .pd-lead {
  margin: 0 0 22px;
  color: var(--pd-muted);
  font-size: 16px;
  line-height: 1.65;
}

#product-details .pd-variants {
  margin: 0 0 24px;
  padding: 18px 18px 6px;
  border: 1px solid var(--pd-line);
  border-radius: 14px;
  background: var(--pd-soft);
}

#product-details .pd-variants h2 {
  margin: 0 0 2px;
  color: var(--pd-ink);
  font-size: 17px;
  font-weight: 700;
}

/* Server-rendered variant links, scoped to this product page only. */
#product-details .pd-variants > p {
  margin: 8px 0 14px;
  color: var(--pd-muted);
  font-size: 13px;
}

#product-details .pd-option-group {
  margin: 16px 0;
}

#product-details .pd-option-group h3 {
  margin: 0 0 8px;
  color: var(--pd-muted);
  font-size: 16px;
  line-height: 1.4;
}

#product-details .pd-option-group h3 strong {
  color: var(--pd-ink);
}

#product-details .pd-variant-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

#product-details .pd-variant-links a {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--pd-line);
  border-radius: 8px;
  background: #fff;
  color: var(--pd-ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}

#product-details .pd-variant-links a:hover,
#product-details .pd-all-variant-grid a:hover {
  border-color: var(--pd-red);
}

#product-details .pd-variant-links a.is-selected,
#product-details .pd-all-variant-grid a.is-selected {
  border-color: var(--pd-red);
  background: #fff4f4;
  box-shadow: inset 0 0 0 1px var(--pd-red);
}

#product-details a:focus-visible {
  outline: 2px solid var(--pd-red);
  outline-offset: 3px;
}

#product-details .pd-variant-links span {
  font-size: 14px;
  font-weight: 700;
}

#product-details .pd-variant-links small {
  color: var(--pd-muted);
  font-size: 11px;
}

#product-details .pd-variant-links .pd-option-change {
  color: var(--pd-red-dark);
}

#product-details .pd-all-variant-grid a > span {
  overflow-wrap: anywhere;
}

#product-details .pd-thumb-strip:empty {
  display: none;
}

/* --- Legacy cascading selector (includes/templates/selector.php) blended into the new layout --- */
#product-details .pd-variants form[name="form"] .text14 {
  display: none;
  /* replaced by the h2 above */
}

#product-details .pd-variants form[name="form"] p {
  margin: 0 0 14px;
}

#product-details .pd-variants form[name="form"] .alignleft {
  float: none;
  margin: 0 0 6px;
}

#product-details .pd-variants form[name="form"] .text10 {
  color: var(--pd-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#product-details .pd-variants form[name="form"] select.form-control {
  display: block;
  width: 100%;
  max-width: 320px;
  padding: 5px 12px;
  border: 1px solid var(--pd-line);
  border-radius: 8px;
  background: #fff;
  color: var(--pd-ink);
  font-size: 14px;
}

#product-details .pd-variants form[name="form"] select.form-control:focus {
  border-color: var(--pd-red);
  outline: none;
}

/* SKU / price line that includes/templates/swap.php echoes right after the form */
#product-details .pd-variants .text10 {
  color: var(--pd-muted);
  font-size: 13px;
}

#product-details .pd-variants .text10 b {
  color: var(--pd-ink);
}

#product-details .pd-highlights {
  display: grid;
  gap: 12px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

#product-details .pd-highlights li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  color: #394359;
}

#product-details .pd-highlights i {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  margin-top: 2px;
  border-radius: 50%;
  background: #e9f5ee;
  color: #198754;
  font-size: 11px;
}

#product-details .pd-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#product-details .pd-btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border: 1px solid var(--pd-red);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: 0.2s ease;
}

#product-details .pd-btn-primary {
  background: var(--pd-red);
  color: #fff;
  box-shadow: 0 10px 24px rgba(168, 15, 22, 0.2);
}

#product-details .pd-btn-primary:hover {
  border-color: var(--pd-red-dark);
  background: var(--pd-red-dark);
  color: #fff;
  transform: translateY(-1px);
}

#product-details .pd-btn-secondary {
  background: #fff;
  color: var(--pd-red);
}

#product-details .pd-btn-secondary:hover {
  background: #fff5f5;
  color: var(--pd-red-dark);
}

#product-details .pd-help {
  margin: 14px 0 0;
  color: var(--pd-muted);
  font-size: 12px;
}

#product-details .pd-edit-link {
  display: inline-block;
  margin: 6px 0 0;
  color: var(--pd-red);
  font-size: 12px;
  font-weight: 700;
}

#product-details .pd-section-nav {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  overflow-x: auto;
  margin-bottom: 54px;
  padding: 8px;
  border: 1px solid var(--pd-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(23, 32, 51, 0.07);
  scrollbar-width: none;
}

#product-details .pd-section-nav::-webkit-scrollbar {
  display: none;
}

#product-details .pd-section-nav a {
  flex: 1 0 auto;
  padding: 10px 20px;
  border-radius: 7px;
  color: var(--pd-muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

#product-details .pd-section-nav a:hover,
#product-details .pd-section-nav a:focus {
  background: var(--pd-soft);
  color: var(--pd-red);
}

#product-details .pd-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 62px;
  align-items: start;
}

#product-details .pd-section {
  scroll-margin-top: 90px;
  margin-bottom: 66px;
}

#product-details .pd-section h2 {
  margin: 0 0 18px;
  color: var(--pd-ink);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

#product-details .pd-section > p:not(.pd-section-kicker) {
  margin: 0 0 25px;
  color: var(--pd-muted);
  font-size: 16px;
}

#product-details .pd-spec-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--pd-line);
  border-radius: 14px;
}

#product-details .pd-spec-list div {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--pd-line);
}

#product-details .pd-spec-list div:nth-child(odd) {
  border-right: 1px solid var(--pd-line);
}

#product-details .pd-spec-list div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

#product-details .pd-spec-list dt {
  color: var(--pd-muted);
  font-size: 13px;
  font-weight: 500;
}

#product-details .pd-spec-list dd {
  margin: 0;
  color: var(--pd-ink);
  font-size: 13px;
  font-weight: 800;
}

#product-details .pd-all-variant-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#product-details .pd-all-variant-grid a {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  overflow: hidden;
  padding: 11px;
  border: 1px solid var(--pd-line);
  border-radius: 12px;
  background: #fff;
  color: var(--pd-ink);
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

#product-details .pd-all-variant-grid a:hover {
  border-color: #d3a2a5;
  transform: translateY(-2px);
}

#product-details .pd-all-variant-grid img {
  display: block;
  width: 78px;
  height: 58px;
  border-radius: 7px;
  object-fit: contain;
  background: var(--pd-soft);
}

#product-details .pd-all-variant-grid a > span {
  display: grid;
  min-width: 0;
}

#product-details .pd-all-variant-grid strong {
  font-size: 13px;
  line-height: 1.35;
}

#product-details .pd-download {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--pd-line);
  border-radius: 12px;
  margin-bottom: 12px;
  color: var(--pd-ink);
  text-decoration: none;
  transition: 0.2s ease;
}

#product-details .pd-download:hover {
  border-color: #d3a2a5;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.07);
  transform: translateY(-2px);
}

#product-details .pd-download-icon {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 9px;
  background: #fff1f1;
  color: var(--pd-red);
  font-size: 20px;
}

#product-details .pd-download-body {
  display: grid;
  flex: 1;
}

#product-details .pd-download small {
  color: var(--pd-muted);
  font-size: 12px;
}

#product-details .pd-download > i {
  color: var(--pd-red);
}

#product-details .pd-accessory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

#product-details .pd-accessory-grid a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--pd-line);
  border-radius: 12px;
  color: var(--pd-ink);
  text-align: center;
  text-decoration: none;
}

#product-details .pd-accessory-grid img {
  display: block;
  width: 100px;
  height: 75px;
  object-fit: contain;
  background: var(--pd-soft);
  border-radius: 8px;
}

#product-details .pd-accessory-grid small {
  color: var(--pd-muted);
  font-size: 12px;
  line-height: 1.45;
}

#product-details .pd-accessory-grid a:hover {
  border-color: #d3a2a5;
  background: #fffafa;
}

#product-details .pd-faq {
  font-size: 14px;
  color: var(--pd-muted);
}

#product-details .pd-support-card {
  padding: 28px;
  border-radius: 16px;
  background: var(--pd-ink);
  color: #fff;
  box-shadow: 0 18px 38px rgba(23, 32, 51, 0.15);
  display: none !important;
}

#product-details .pd-support-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 19px;
}

#product-details .pd-support-card h2 {
  margin: 0 0 9px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
}

#product-details .pd-support-card p {
  margin: 0 0 20px;
  color: #c6ccda;
  font-size: 13px;
}

#product-details .pd-support-card a {
  display: block;
  padding: 11px 16px;
  border-radius: 7px;
  background: var(--pd-red);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

#product-details .pd-support-card a:hover {
  background: #c5161f;
}

#product-details .pd-related {
  padding: 20px;
  border: 1px solid var(--pd-line);
  border-radius: 14px;
  background: #fff;
}

#product-details .pd-related h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
}

#product-details .pd-related-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#product-details .pd-related-list a {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--pd-ink);
  text-decoration: none;
  font-size: 13px;
}

#product-details .pd-related-list img {
  display: block;
  width: 56px;
  height: 42px;
  object-fit: contain;
  background: var(--pd-soft);
  border-radius: 6px;
}

@media (max-width: 991px) {
  #product-details {
    padding-top: 24px;
  }

  #product-details .pd-product {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  #product-details .pd-gallery {
    position: static;
  }

  #product-details .pd-image-link {
    min-height: 360px;
  }

  #product-details .pd-content-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

}

@media (max-width: 700px) {
  #product-details {
    padding-right: 15px;
    padding-left: 15px;
  }

  #product-details .pd-product {
    padding-top: 8px;
  }

  #product-details .pd-image-link {
    min-height: 275px;
    border-radius: 16px;
  }

  #product-details .pd-image-badge {
    top: 12px;
    left: 12px;
  }

  #product-details .pd-enlarge {
    right: 12px;
    bottom: 10px;
  }

  #product-details .pd-section-nav {
    margin-right: -15px;
    margin-left: -15px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  #product-details .pd-accessory-grid,
  #product-details .pd-all-variant-grid {
    grid-template-columns: 1fr;
  }

  #product-details .pd-spec-list {
    grid-template-columns: 1fr;
  }

  #product-details .pd-spec-list div,
  #product-details .pd-spec-list div:nth-child(odd),
  #product-details .pd-spec-list div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--pd-line);
  }

  #product-details .pd-spec-list div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 440px) {
  #product-details .pd-variant-links {
    grid-template-columns: 1fr;
  }
  #product-details .pd-image-link {
    min-height: 235px;
  }

  #product-details .pd-image-badge {
    font-size: 10px;
  }

  #product-details .pd-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #product-details .pd-image-link img,
  #product-details .pd-btn,
  #product-details .pd-download {
    transition: none;
  }
}
