/* ============================================================
   PRODUCT — page-specific layout (wrap/section primitives,
   typography, and the breadcrumb live in css/shared/site-shell.css).
   ============================================================ */

/* ---------- Gallery + buybox ---------- */

.site-shell .pdp-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: var(--grid-gap);
  align-items: start;
}

.site-shell .gallery {
  min-width: 0;
}

/* Desktop: the buybox is taller than the gallery, so the gallery pins under the header while the
   buybox scrolls past; once the grid row ends, the gallery releases and both move on together. */
@media (min-width: 1021px) {
  .site-shell .gallery {
    position: sticky;
    top: 112px;
  }
}

.site-shell .gallery-main {
  position: relative;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--mist);
  aspect-ratio: 1 / 1;
}

.site-shell .gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8%;
}

.site-shell .gallery-main--fill img {
  object-fit: cover;
  padding: 0;
}

/* On phones a shorter packshot frame lifts price and Add to cart toward the first screen. */
@media (max-width: 820px) {
  .site-shell .gallery-main:not(.gallery-main--fill) {
    aspect-ratio: 4 / 3;
  }
}

.site-shell .thumb-carousel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  min-width: 0;
}

.site-shell .thumb-strip {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.site-shell .thumb-strip::-webkit-scrollbar {
  display: none;
}

.site-shell .thumb-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 72px;
  height: 72px;
  border-radius: 0;
  overflow: hidden;
  background: var(--mist);
  border: 1px solid transparent;
  padding: 6px;
  cursor: pointer;
}

.site-shell .thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-shell .thumb-item.active {
  border-color: var(--ink);
}

.site-shell .thumb-nav {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0 0 2px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink-text);
  font: 400 1rem/1 var(--font-sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, opacity 0.2s;
}

.site-shell .thumb-nav:hover:not(:disabled) {
  border-color: var(--ink);
}

.site-shell .thumb-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Nothing to scroll: no arrows at all rather than two dead ones. */
.site-shell .thumb-carousel--static .thumb-nav {
  display: none;
}

.site-shell .buybox {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 640px;
}

.site-shell .group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-shell .group__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font: 600 0.8125rem/1.2 var(--font-sans);
  letter-spacing: 0.02em;
}

.site-shell .group__label span + span {
  font-weight: 400;
  color: var(--text-2);
}

.site-shell .panel {
  background: var(--mist);
  border-radius: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-shell .panel__section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.site-shell {
  --select: #3d7d82;
  --select-tint: #ecf3f3;
}

.site-shell .type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  width: 100%;
}

.site-shell .type-card {
  position: relative;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 20px 18px 18px;
  background: var(--white);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.25s, border-color 0.25s;
}

.site-shell .type-card:hover {
  border-color: var(--line);
}

.site-shell .type-card[aria-pressed="true"] {
  border-color: var(--select);
  box-shadow: inset 0 0 0 1px var(--select);
  background: var(--select-tint);
}

.site-shell .type-card__icon {
  align-self: flex-start;
  flex: none;
  box-sizing: border-box;
  margin-bottom: 2px;
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 50%;
  background: var(--mist);
  fill: none;
  stroke: var(--text-2);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.25s, background 0.25s;
}

.site-shell .type-card[aria-pressed="true"] .type-card__icon {
  background: #dfebec;
  stroke: var(--select);
}

.site-shell .type-card[aria-pressed="true"] .type-card__name {
  color: var(--ink-text);
}

.site-shell .type-card__tag {
  position: absolute;
  right: 10px;
  top: 10px;
}

.site-shell .type-card__name {
  font: 600 0.9375rem/1.3 var(--font-sans);
  padding-right: 64px;
}

.site-shell .type-card__price {
  font: 700 1.125rem/1.3 var(--font-sans);
}

.site-shell .type-card__was {
  margin-left: 8px;
  font: 400 0.8125rem/1.3 var(--font-sans);
  color: var(--text-2);
  text-decoration: line-through;
}

.site-shell .type-card__note {
  font: 400 0.8125rem/1.4 var(--font-sans);
  color: var(--text-2);
}

.site-shell .pill {
  display: inline-block;
  background: var(--taupe);
  color: var(--text);
  font: 600 0.6875rem/1.2 var(--font-sans);
  text-transform: uppercase;
  border-radius: 0;
  padding: 4px 8px;
  align-self: flex-start;
}

.site-shell .panel__label {
  margin: 0 0 -2px 4px;
  font: 600 0.9375rem/1.2 var(--font-sans);
}

.site-shell .panel__label--lg {
  margin: 0 0 -4px 4px;
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
}

.site-shell .panel__head {
  margin: 0 0 -4px 4px;
}

.site-shell .panel__head .panel__label--lg {
  margin: 0;
}

.site-shell .panel__sub {
  margin: 4px 0 0;
  font: 400 0.8125rem/1.3 var(--font-sans);
  color: var(--text-2);
}

.site-shell .tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.site-shell .tier-card {
  position: relative;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 10px 12px;
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: box-shadow 0.25s, border-color 0.25s;
}

.site-shell .tier-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.site-shell .tier-card__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.site-shell .tier-card:hover {
  border-color: var(--line);
}

.site-shell .tier-card[aria-pressed="true"],
.site-shell .tier-card.active {
  border-color: var(--select);
  box-shadow: inset 0 0 0 1px var(--select);
  background: var(--select-tint);
}

.site-shell .tier-card[aria-pressed="true"] .tier-card__qty,
.site-shell .tier-card.active .tier-card__qty {
  color: var(--ink-text);
}

.site-shell .tier-card__qty {
  font: 600 0.875rem/1.3 var(--font-sans);
}

.site-shell .tier-card__icon {
  flex: none;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  padding: 7px;
  border-radius: 50%;
  background: var(--mist);
  fill: none;
  stroke: var(--text-2);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.25s, background 0.25s;
}

.site-shell .tier-card[aria-pressed="true"] .tier-card__icon,
.site-shell .tier-card.active .tier-card__icon {
  background: #dfebec;
  stroke: var(--select);
}

.site-shell .tier-card__price {
  font: 700 1rem/1.3 var(--font-sans);
}

/* Shown only once the stepper reaches its limit. */
.site-shell .qty-hint {
  margin: 8px 0 0;
}

.site-shell .qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.site-shell .qty {
  display: inline-flex;
  align-items: center;
  height: 46px;
  border: 1px solid var(--text-2);
  border-radius: 0;
  overflow: hidden;
}

.site-shell .qty button {
  width: 44px;
  height: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.125rem;
}

.site-shell .qty button:hover:not(:disabled) {
  background: var(--mist);
}

.site-shell .qty button:disabled {
  opacity: 0.35;
  cursor: default;
}

.site-shell .qty output {
  min-width: 36px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.site-shell .perks {
  list-style: none;
  margin: 0;
  padding: 14px 8px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: var(--select-tint);
  border-radius: 0;
  font: 500 0.875rem/1.3 var(--font-sans);
  color: var(--text);
}

.site-shell .perks li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-inline: 12px;
  border-left: 1px solid var(--line);
}

.site-shell .perks li span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-shell .perks li b {
  font-weight: 600;
}

.site-shell .perks li small {
  font: 400 0.8125rem/1.3 var(--font-sans);
  color: var(--text-2);
}

.site-shell .perks li:first-child {
  border-left: none;
}

.site-shell .perks li::before {
  content: "";
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--select) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.3l2.6 2.6 5.4-5.6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

@media (max-width: 560px) {
  .site-shell .perks {
    padding-inline: 4px;
    font-size: 0.8125rem;
  }

  .site-shell .perks li {
    padding-inline: 8px;
    gap: 8px;
  }

  .site-shell .perks li::before {
    width: 22px;
    height: 22px;
    background-size: 15px 15px;
  }
}

/* ---------- Dose strip: the label's four amounts beside the buy button ---------- */

.site-shell .group__label a {
  display: inline-block;
  padding: 6px 0;
  margin: -6px 0;
  font-weight: 500;
  color: var(--ink-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Steps ---------- */

.site-shell .steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px);
  border-top: 1px solid var(--line);
  padding-top: clamp(28px, 3vw, 40px);
  margin-top: clamp(28px, 3vw, 40px);
}

.site-shell .step {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-shell .step__num {
  font: 600 1.5rem/1.2 var(--font-sans);
  color: var(--text-2);
}

/* ---------- Reviews ---------- */

.site-shell .reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px);
  border-top: 1px solid var(--line);
  padding-top: clamp(28px, 3vw, 40px);
  margin-top: clamp(28px, 3vw, 40px);
}

.site-shell .review {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-shell .review__who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

/* ---------- Closer ---------- */

.site-shell .closer__price {
  font: 600 1.5rem/1.2 var(--font-sans);
  font-variant-numeric: tabular-nums;
}

.site-shell .closer__price span {
  display: block;
  margin-top: 4px;
  font: 400 0.875rem/1.4 var(--font-sans);
  color: var(--text-2);
}

.site-shell .closer__in {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* ---------- Sticky buy bar ---------- */

.site-shell .buybar {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 140;
  width: min(540px, calc(100vw - 32px));
  box-sizing: border-box;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 6px 6px 6px 8px;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translate(-50%, calc(100% + 40px));
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-shell .buybar.show {
  transform: translate(-50%, 0);
}

.site-shell .buybar .btn {
  border-radius: 0;
  padding: 0 28px;
  height: 44px;
}

.site-shell .buybar__thumb {
  width: 36px;
  height: 36px;
  border-radius: 0;
  overflow: hidden;
  background: var(--mist);
  flex: none;
}

.site-shell .buybar__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-shell .buybar__info {
  flex: 1;
  min-width: 0;
}

.site-shell .buybar__name {
  font: 600 0.875rem/1.3 var(--font-sans);
}

.site-shell .buybar__price {
  font: 400 0.8125rem/1.3 var(--font-sans);
  color: var(--text-2);
}

@media (max-width: 1020px) {
  .site-shell .pdp-grid {
    grid-template-columns: 1fr;
  }

  .site-shell .steps,
  .site-shell .reviews-grid {
    grid-template-columns: 1fr;
  }

  /* Stacked layout: keep both columns a readable, centred width instead of stretching edge to edge. */
  .site-shell .gallery,
  .site-shell .buybox {
    width: 100%;
    max-width: 600px;
    margin-inline: auto;
  }
}

@media (max-width: 560px) {
  .site-shell .type-grid {
    grid-template-columns: 1fr;
  }

  .site-shell .type-card {
    padding: 16px;
  }

  .site-shell .type-card__name {
    padding-right: 96px;
  }

  .site-shell .tiers {
    gap: 8px;
  }

  .site-shell .tier-card {
    padding: 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .site-shell .buybox {
    gap: 24px;
  }

  .site-shell .gallery-main {
    border-radius: 0;
  }

  /* Thumbnails swipe on touch; the tiny arrows are hard to hit and add nothing. */
  .site-shell .thumb-nav {
    display: none;
  }

  .site-shell .thumb-item {
    width: 60px;
    height: 60px;
  }

  .site-shell .thumb-carousel {
    margin-top: 14px;
  }

  .site-shell .qty-row {
    flex-wrap: nowrap;
  }

  .site-shell .qty-row .btn {
    flex: 1;
    min-width: 0;
  }

  .site-shell .reviews-head .btn {
    width: 100%;
  }

  .site-shell .modal {
    padding: 20px;
  }

  .site-shell .modal__actions {
    flex-direction: column;
  }

  .site-shell .modal__actions .btn {
    width: 100%;
  }

  /* Sticky buy bar: thumb + price + button, respecting the home indicator. */
  .site-shell .buybar {
    gap: 12px;
  }

  .site-shell .buybar__name {
    display: none;
  }

  .site-shell .buybar .btn {
    flex: none;
  }

}

/* Toast: pill with a check badge (product page only) */
.site-shell .toast {
  bottom: 84px;
  transform: translateY(20px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 22px 8px 8px;
  border: none;
  border-radius: 0;
  background: var(--field);
  color: var(--on-field);
  font: 500 0.9375rem/1.2 var(--font-sans);
  letter-spacing: 0;
  text-transform: none;
  /* Long messages (errors) wrap instead of running off a narrow screen. */
  width: max-content;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  transition: opacity 0.4s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-shell .toast.show {
  transform: none;
}

/* After the base rule so it actually wins on phones. */
@media (max-width: 560px) {
  .site-shell .toast {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    font-size: 0.875rem;
  }
}

.site-shell .toast::before {
  content: "";
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #b9e6e0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4.6 9.3l2.9 2.9 5.9-6.1' fill='none' stroke='%231f5f63' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}

.site-shell .toast--error::before {
  background: var(--taupe) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M9 4.5v5.5' fill='none' stroke='%231c1a17' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='9' cy='13.2' r='1.2' fill='%231c1a17'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

/* Error toast: exclamation badge instead of the success check */
.site-shell .toast.toast--error::before {
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M9 4.5v5.5' fill='none' stroke='%23a3172b' stroke-width='2.2' stroke-linecap='round'/%3E%3Ccircle cx='9' cy='13.4' r='1.3' fill='%23a3172b'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

.site-shell .pill--stock {
  margin-left: 8px;
  background: var(--error);
  color: #fff;
}

.site-shell .type-card__save {
  align-self: flex-start;
}


.site-shell .step__lead {
  font-weight: 500;
  color: var(--text);
}

.site-shell .step__more {
  align-self: flex-start;
  padding: 0;
  background: none;
  border: 0;
  color: var(--heading);
  font: 600 .95rem/1.4 var(--font-sans);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.site-shell .step__more:focus-visible { outline: 2px solid var(--heading); outline-offset: 3px; }
