/* ==========================================================================
   pdp.css — Product Detail Page (shared by product-item + product-kit)
   Reuses section-head, kit-grid/kit-card and testimonials (sections.css).
   Interaction handled by js/pdp.js.
   ========================================================================== */

.pdp {
  padding-block: var(--section-space-s);
  padding-inline: var(--space-gutter);
}

.pdp-breadcrumb {
  max-width: var(--container);
  margin-inline: auto;
  margin-bottom: var(--space-l);
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--graphite);
}

.pdp-breadcrumb a {
  color: var(--deep-ocean);
  transition: color var(--duration-fast);
}

.pdp-breadcrumb a:hover {
  color: var(--terracotta);
}

.pdp-top {
  max-width: var(--container);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-2xl);
  align-items: start;
}

/* --- Gallery --- */
.pdp-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

/* Desktop: keep the gallery in view while the buy/detail column scrolls.
   Sticks below the 74px sticky nav, within the .pdp-top grid row. */
@media (min-width: 901px) {
  .pdp-gallery {
    position: sticky;
    top: calc(74px + var(--space-s));
    align-self: start;
  }
}

.pdp-main-img {
  aspect-ratio: 1 / 1;
  background-color: var(--coastal-soft);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
}

.pdp-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2xs);
}

.pdp-thumb {
  aspect-ratio: 1 / 1;
  background-color: var(--coastal-soft);
  background-size: cover;
  background-position: center;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--duration-fast), transform var(--duration-fast) var(--ease-out);
}

.pdp-thumb:hover {
  transform: translateY(-2px);
}

.pdp-thumb.is-active {
  border-color: var(--terracotta);
}

.pdp-thumb:focus-visible {
  outline: 2px solid var(--deep-ocean);
  outline-offset: 2px;
}

/* --- Right column: buy box + details, scrolls past the sticky gallery --- */
.pdp-main-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-l);
  min-width: 0;
}

/* Inline detail blocks (were a separate full-width band; now beside the image) */
.pdp-overview,
.pdp-included,
.pdp-specs {
  border-top: 1px solid var(--hairline);
  padding-top: var(--space-l);
}

/* Full product description (from the docx) */
.pdp-overview p {
  font-size: var(--text-lead);
  color: var(--charcoal);
  line-height: 1.7;
  max-width: 62ch;
}

.pdp-included h2,
.pdp-specs h2 {
  font-size: var(--text-h3);
  font-weight: 800;
  margin-bottom: var(--space-m);
}

.pdp-included h2 em,
.pdp-specs h2 em {
  font-style: italic;
  font-weight: 500;
  color: var(--terracotta);
}

/* --- Info column --- */
.pdp-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  align-items: flex-start;
}

.pdp-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--terracotta);
}

.pdp-info h1 {
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.03;
}

.pdp-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-small);
  color: var(--graphite);
}

.pdp-rating a {
  color: var(--deep-ocean);
  text-decoration: underline;
}

.pdp-rating a:hover {
  color: var(--terracotta);
}

.pdp-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-s);
}

.pdp-price .amount {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(30px, 3.4vw, 42px);
  color: var(--deep-ocean);
  line-height: 1;
}

.pdp-price .from {
  font-size: var(--text-small);
  color: var(--graphite);
}

.pdp-desc {
  color: var(--charcoal);
  line-height: 1.65;
  max-width: 52ch;
}

/* --- Variants --- */
.pdp-variants {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: var(--space-2xs);
}

.v-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--graphite);
}

.v-btns {
  display: flex;
  gap: var(--space-s);
  flex-wrap: wrap;
}

.v-btn {
  flex: 1 1 0;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  background: var(--off-white);
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: var(--space-s) var(--space-m);
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--charcoal);
  transition: border-color var(--duration-fast), background var(--duration-fast),
              box-shadow var(--duration-fast);
}

.v-btn small {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-small);
  color: var(--graphite);
}

.v-btn:hover {
  border-color: var(--coastal-blue);
}

.v-btn.is-selected {
  border-color: var(--deep-ocean);
  background: var(--coastal-soft);
  box-shadow: inset 0 0 0 1px var(--deep-ocean);
}

.v-btn.is-selected small {
  color: var(--deep-ocean);
}

.v-note {
  font-size: var(--text-small);
  color: var(--graphite);
  margin-top: var(--space-2xs);
}

/* --- Buy row --- */
.pdp-buy {
  display: flex;
  align-items: stretch;
  gap: var(--space-s);
  width: 100%;
  flex-wrap: wrap;
  margin-top: var(--space-2xs);
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qty-stepper button {
  width: 46px;
  min-height: 50px;
  display: grid;
  place-items: center;
  color: var(--deep-ocean);
  background: var(--off-white);
  transition: background var(--duration-fast);
}

.qty-stepper button:hover {
  background: var(--pebble);
}

.qty-stepper .qv {
  min-width: 42px;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-body);
}

.pdp-buy .btn-primary {
  flex: 1 1 auto;
  justify-content: center;
}

/* --- Trust row --- */
.pdp-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-s);
  width: 100%;
  margin-top: var(--space-s);
  padding-top: var(--space-m);
  border-top: 1px solid var(--hairline);
}

.t-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.t-item .material-symbols-outlined {
  font-size: 26px;
  color: var(--eucalypt);
  margin-bottom: 4px;
}

.t-item strong {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-small);
  color: var(--deep-ocean);
}

.t-item span {
  font-size: 12px;
  color: var(--graphite);
  line-height: 1.35;
}

/* --- Detail: included + specs --- */
.pdp-detail {
  padding-block: var(--section-space-s);
  padding-inline: var(--space-gutter);
  background: var(--pebble);
}

.pdp-detail-grid {
  max-width: var(--container);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.pdp-detail-grid h2 {
  font-size: var(--text-h3);
  font-weight: 800;
  margin-bottom: var(--space-m);
}

.pdp-detail-grid h2 em {
  font-style: italic;
  font-weight: 500;
  color: var(--terracotta);
}

.included-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.included-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-s);
  align-items: start;
  color: var(--charcoal);
  line-height: 1.5;
  font-size: var(--text-small);
}

.included-list li .material-symbols-outlined {
  color: var(--eucalypt);
  font-size: 22px;
  margin-top: 1px;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table th,
.spec-table td {
  text-align: left;
  padding: var(--space-s) 0;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
  font-size: var(--text-small);
  line-height: 1.45;
}

.spec-table th {
  width: 38%;
  color: var(--deep-ocean);
  font-family: var(--font-heading);
  font-weight: 700;
  padding-right: var(--space-s);
}

.spec-table td {
  color: var(--graphite);
}

/* --- Upsell sections --- */
.pdp-upsell {
  padding-block: var(--section-space-s);
  padding-inline: var(--space-gutter);
}

.pdp-upsell.alt {
  background: var(--pebble);
}

.pdp-upsell .section-head {
  max-width: var(--container);
  margin-inline: auto;
}

.pdp-upsell .kit-grid {
  max-width: var(--container);
  margin-inline: auto;
}

/* Trade-up banner */
.trade-up {
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-l);
  flex-wrap: wrap;
  background: var(--deep-ocean);
  border-radius: var(--radius-lg);
  padding: var(--space-l);
}

.tu-text h3 {
  color: var(--off-white);
  font-size: var(--text-h3);
  font-weight: 700;
  max-width: 24ch;
}

.tu-text h3 em {
  font-style: italic;
  font-weight: 500;
  color: var(--coastal-blue);
}

.tu-text p {
  color: var(--coastal-blue);
  line-height: 1.6;
  margin-top: var(--space-2xs);
  max-width: 56ch;
}

.trade-up .btn-primary {
  flex-shrink: 0;
}

/* Frequently bought together */
.bought {
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-l);
  flex-wrap: wrap;
  background: var(--off-white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-l);
}

.bought-items {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  flex-wrap: wrap;
  flex: 1 1 auto;
}

.bt-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: var(--space-s);
  align-items: center;
  min-width: 190px;
}

.bt-thumb {
  grid-column: 1;
  grid-row: 1 / span 3;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background-color: var(--coastal-soft);
  background-size: cover;
  background-position: center;
}

.bt-name {
  grid-column: 2;
  font-weight: 600;
  font-size: var(--text-small);
  color: var(--charcoal);
  line-height: 1.2;
}

.bt-price {
  grid-column: 2;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-small);
  color: var(--deep-ocean);
}

.bt-check {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--graphite);
  cursor: pointer;
}

.bt-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--terracotta);
}

.bt-plus {
  flex-shrink: 0;
  font-size: 24px;
  font-weight: 300;
  color: var(--graphite);
}

.bought-buy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2xs);
  flex-shrink: 0;
  text-align: right;
}

.bt-total-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--graphite);
}

.bt-total {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(24px, 3vw, 32px);
  color: var(--deep-ocean);
  line-height: 1;
}

/* --- Reviews --- */
.pdp-reviews {
  padding-block: var(--section-space-m);
  padding-inline: var(--space-gutter);
  background: var(--pebble);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .pdp-top,
  .pdp-detail-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

@media (max-width: 560px) {
  .bought,
  .trade-up {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .bought-buy {
    align-items: stretch;
    text-align: left;
  }

  .bought-buy .btn-primary {
    justify-content: center;
  }

  /* Keep the trust row as a single row (3 columns) on mobile too */
  .pdp-trust {
    gap: var(--space-2xs);
  }

  .pdp-trust .t-item strong {
    font-size: 12px;
  }

  .pdp-trust .t-item span {
    font-size: 10.5px;
  }

  .pdp-trust .t-item .material-symbols-outlined {
    font-size: 22px;
  }
}
