.product-detail-overlay {
  position: absolute;
  inset: 0;
  z-index: 35;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.product-detail-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.product-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 23, 19, 0.28);
  backdrop-filter: blur(6px);
}

.product-detail-sheet {
  position: absolute;
  inset: 0;
  background: #fffaf5;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  transform: translateY(28px);
  transition: transform 240ms ease;
}

.product-detail-overlay.is-open .product-detail-sheet {
  transform: translateY(0);
}

.product-detail-chrome {
  position: absolute;
  top: calc(12px + var(--safe-top));
  left: 12px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  background: transparent;
  border: 0;
  pointer-events: none;
}

.detail-back-button {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 181, 137, 0.2);
  box-shadow: var(--shadow-float);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.product-detail-chrome .detail-back-button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(45, 35, 28, 0.16);
  pointer-events: auto;
}

.detail-share-button {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 248, 241, 0.94);
  border: 1px solid rgba(255, 107, 0, 0.22);
  color: #b75b19;
  box-shadow: 0 10px 24px rgba(45, 35, 28, 0.12);
  display: grid;
  place-items: center;
  padding: 0;
  pointer-events: auto;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.detail-share-button:hover {
  background: rgba(255, 243, 232, 0.98);
  border-color: rgba(255, 107, 0, 0.34);
  box-shadow: 0 12px 26px rgba(45, 35, 28, 0.15);
}

.detail-share-button:focus-visible {
  outline: 2px solid rgba(255, 107, 0, 0.34);
  outline-offset: 2px;
}

.detail-back-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-share-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-detail-chrome__copy {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.product-detail-chrome__eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}

#productDetailChromeTitle {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 800;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.product-detail-scroll {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 24px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.product-detail-scroll::-webkit-scrollbar,
.detail-gallery::-webkit-scrollbar,
.detail-recommendations__row::-webkit-scrollbar {
  display: none;
}

.product-detail-content {
  display: grid;
  gap: 0;
  padding-bottom: 14px;
}

.detail-card,
.detail-choice-card,
.detail-description-card,
.detail-delivery-card,
.detail-recommendations {
  margin: 14px 16px 0;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(22, 101, 52, 0.08);
  border-radius: 26px;
  box-shadow: 0 16px 34px rgba(45, 35, 28, 0.075);
}

.detail-hero {
  position: relative;
  background: #fff2e7;
}

.detail-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  background: linear-gradient(180deg, #fff4eb 0%, #fce1cc 100%);
  aspect-ratio: 3 / 4;
  height: auto;
}

.detail-gallery__slide {
  position: relative;
  scroll-snap-align: start;
  min-width: 100%;
  overflow: hidden;
}

.detail-gallery__slide img,
.detail-gallery__slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-gallery__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(15, 91, 52, 0.3);
  font-size: clamp(46px, 16vw, 78px);
  font-weight: 800;
}

.detail-hero-actions {
  position: absolute;
  top: calc(12px + var(--safe-top));
  right: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 9px;
}

.detail-hero-button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(45, 35, 28, 0.16);
  color: var(--brand-deep);
  display: grid;
  place-items: center;
  opacity: 1;
}

.detail-hero-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-gallery__dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
}

.detail-gallery__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(159, 139, 123, 0.28);
  transition: transform 160ms ease, background-color 160ms ease;
}

.detail-gallery__dot.is-active {
  background: var(--brand-main);
  transform: scale(1.15);
}

.detail-info-panel {
  position: relative;
  z-index: 2;
  margin-top: -18px;
  padding: 18px 18px 17px;
  background: #fffaf5;
  border-radius: 28px 28px 0 0;
  display: grid;
  gap: 8px;
  box-shadow: 0 -16px 34px rgba(45, 35, 28, 0.08);
}

.detail-card__eyebrow {
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 91, 52, 0.07);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(15, 91, 52, 0.72);
  font-weight: 850;
  line-height: 1;
}

.detail-info-header {
  display: grid;
  gap: 8px;
}

.detail-title {
  font-size: clamp(1.52rem, 7.6vw, 2.18rem);
  line-height: 1.06;
  font-weight: 900;
  color: var(--text-strong);
  letter-spacing: -0.035em;
}

.detail-price-block {
  margin-top: 2px;
  padding: 12px 13px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 91, 52, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.detail-price-row {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
}

.detail-compare-price {
  color: rgba(116, 104, 94, 0.58);
  font-size: 15px;
  font-weight: 650;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.detail-actual-price {
  font-size: clamp(1.92rem, 9vw, 2.36rem);
  line-height: 1;
  font-weight: 900;
  color: var(--brand-deep);
  letter-spacing: -0.04em;
}

.detail-quantity-selector {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.detail-quantity-selector__header,
.detail-quantity-selector__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-quantity-selector__label,
.detail-quantity-selector__total strong {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 900;
}

.detail-quantity-selector__stock,
.detail-quantity-selector__total span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
}

.detail-quantity-selector__controls {
  width: max-content;
  max-width: 100%;
  display: inline-grid;
  grid-template-columns: 34px minmax(34px, auto) 34px;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 145, 102, 0.1);
}

.detail-quantity-selector__button {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-deep);
  font-size: 19px;
  font-weight: 900;
}

.detail-quantity-selector__button:disabled {
  opacity: 0.45;
}

.detail-quantity-selector__value {
  min-width: 24px;
  text-align: center;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 900;
}

.detail-info-row {
  min-height: 34px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.25;
  font-weight: 800;
}

.detail-info-row--delivery {
  background: rgba(15, 91, 52, 0.055);
  color: var(--brand-deep);
}

.detail-info-row--bought {
  background: rgba(255, 107, 0, 0.075);
  color: #8b4b1f;
}

.detail-delivery-card {
  padding: 15px;
  display: grid;
  gap: 13px;
}

.detail-delivery-card__header {
  display: grid;
  gap: 7px;
}

.detail-delivery-card__header h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 17px;
  line-height: 1.2;
}

.detail-delivery-card__copy,
.detail-delivery-card__note {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.detail-delivery-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.detail-delivery-fact {
  min-width: 0;
  min-height: 74px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(15, 91, 52, 0.055);
  border: 1px solid rgba(15, 91, 52, 0.08);
  display: grid;
  align-content: center;
  gap: 5px;
}

.detail-delivery-fact span {
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.detail-delivery-fact strong {
  color: var(--brand-deep);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.detail-delivery-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.detail-delivery-actions .primary-button,
.detail-delivery-actions .secondary-button {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  font-size: 13px;
}

.nearby-alternatives-overlay {
  position: fixed;
  z-index: 70;
}

.nearby-alternatives-sheet {
  inset: auto 0 0;
  max-height: min(78vh, 720px);
  min-height: 360px;
}

.nearby-alternatives-scroll {
  padding: 0 16px 20px;
}

.nearby-alternatives-content {
  display: grid;
  gap: 12px;
}

.nearby-alternatives-list {
  display: grid;
  gap: 10px;
}

.nearby-alternative-card {
  min-height: 104px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 91, 52, 0.08);
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
}

.nearby-alternative-card__media {
  position: relative;
  min-width: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff2e7;
}

.nearby-alternative-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nearby-alternative-card__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(15, 91, 52, 0.28);
  font-weight: 900;
}

.nearby-alternative-card__body {
  min-width: 0;
  display: grid;
  gap: 7px;
  align-content: center;
}

.nearby-alternative-card__body strong {
  color: var(--text-strong);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 900;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.nearby-alternative-card__body span {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 750;
}

.nearby-alternative-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.nearby-alternative-card__actions .primary-button,
.nearby-alternative-card__actions .secondary-button {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 12px;
}

.nearby-alternatives-state {
  min-height: 160px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(15, 91, 52, 0.08);
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
  text-align: center;
}

.detail-info-row__icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(45, 35, 28, 0.06);
}

.detail-info-row__text {
  min-width: 0;
}

.detail-description-card {
  padding: 19px;
  display: grid;
  gap: 11px;
}

.detail-description-text {
  color: rgba(75, 66, 59, 0.86);
  font-size: 14.5px;
  line-height: 1.72;
}

.detail-choice-card,
.detail-recommendations {
  padding: 19px;
  display: grid;
  gap: 16px;
}

.detail-choice-card__header,
.detail-recommendations__header {
  display: grid;
  gap: 6px;
}

.detail-choice-card__header h3,
.detail-recommendations__header h3 {
  font-size: 1.04rem;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.015em;
}

.detail-choice-card__header p,
.detail-recommendations__header p {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.detail-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 9px;
}

.detail-choice-pill {
  min-height: 46px;
  padding: 0 17px;
  border-radius: 999px;
  border: 1px solid rgba(15, 91, 52, 0.1);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.detail-choice-pill.is-active {
  color: var(--brand-deep);
  background: linear-gradient(180deg, rgba(15, 91, 52, 0.11), rgba(15, 91, 52, 0.07));
  border-color: rgba(15, 91, 52, 0.38);
  box-shadow:
    0 11px 20px rgba(15, 91, 52, 0.11),
    inset 0 0 0 1px rgba(255, 255, 255, 0.58);
}

.detail-choice-pill:active,
.recommendation-card:active,
.detail-back-button:active,
.detail-share-button:active {
  transform: scale(0.98);
}

.detail-choice-pill__swatch {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(80, 62, 49, 0.16);
  flex-shrink: 0;
}

.detail-recommendations__row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(152px, 168px);
  gap: 13px;
  overflow-x: auto;
  padding: 1px 1px 3px;
}

.recommendation-card {
  border-radius: 22px;
  border: 1px solid rgba(15, 91, 52, 0.09);
  background: #ffffff;
  padding: 9px;
  display: grid;
  gap: 11px;
  text-align: left;
  box-shadow: 0 12px 24px rgba(45, 35, 28, 0.08);
}

.recommendation-card__media {
  position: relative;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #fff0e4 0%, #ffe1cd 100%);
}

.recommendation-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recommendation-card__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(93, 68, 49, 0.55);
  font-size: 22px;
  font-weight: 800;
}

.recommendation-card__body {
  display: grid;
  gap: 5px;
  padding: 0 2px 2px;
}

.recommendation-card__title {
  font-size: 13.5px;
  line-height: 1.32;
  font-weight: 850;
  min-height: 35px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.recommendation-card__price {
  color: var(--brand-deep);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.recommendation-card__compare {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  text-decoration: line-through;
}

.recommendation-card__delivery {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
}

.product-detail-action-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(15, 91, 52, 0.08);
  box-shadow: 0 -14px 28px rgba(45, 35, 28, 0.1);
}

.product-detail-action-bar .action-button {
  min-height: 52px;
  border-radius: 17px;
  font-size: 14px;
}

.product-detail-action-bar .action-button:disabled {
  opacity: 0.5;
}

@media (max-width: 370px) {
  .detail-gallery {
    aspect-ratio: 3 / 4;
  }

  .detail-info-panel {
    padding: 17px 14px 15px;
  }

  .detail-choice-card,
  .detail-description-card,
  .detail-recommendations {
    margin-left: 12px;
    margin-right: 12px;
    padding: 16px;
  }

  .detail-title {
    font-size: 1.28rem;
  }

  .detail-choice-group {
    gap: 8px;
  }

  .detail-choice-pill {
    min-height: 42px;
    padding: 0 15px;
  }

  .product-detail-action-bar {
    gap: 10px;
    padding-left: 14px;
    padding-right: 14px;
  }
}
