/* Compact PDP (makeup-like) — phones + tablets < 1024 */

.gallery__stage {
  position: relative;
}

.gallery__overlays {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.gallery__badges {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-1);
  pointer-events: none;
}

.wish-btn--gallery {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--c-head);
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 1023px) {
  .breadcrumbs--pdp {
    margin-bottom: var(--sp-3);
    font-size: 11px;
  }

  .pdp {
    gap: var(--sp-4);
  }

  .pdp__gallery {
    order: 1;
    margin-inline: calc(-1 * var(--page-pad-x, 16px));
  }

  .pdp__info {
    order: 2;
  }

  .pdp__buy {
    order: 3;
  }

  .pdp__lead,
  .pdp__highlights,
  .pdp__info .badge,
  .pdp__badges {
    display: none;
  }

  .pdp__brand {
    text-align: center;
  }

  .pdp__title {
    text-align: center;
    font-size: 1.35rem;
  }

  .pdp__type {
    text-align: center;
  }

  .pdp__rating {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .buybox {
    border: 0;
    border-radius: 0;
    padding: 0;
    gap: var(--sp-3);
  }

  .buybox__price-row {
    justify-content: center;
  }

  .buybox__price {
    justify-content: center;
  }

  .wish-btn--buybox {
    display: none;
  }

  .product__price {
    font-size: 1.5rem;
  }

  .buybox__actions .qty {
    display: none;
  }

  .buybox__buy {
    width: 100%;
    flex: 1 1 auto;
    border-radius: 2px;
    min-height: 48px;
  }

  .buybox__meta {
    justify-content: space-between;
  }

  .gallery__thumbs,
  .gallery__thumbs-row {
    display: none;
  }

  .gallery__overlays {
    display: block;
  }
}

/* Gallery slider */
.gallery__viewport {
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--c-paper);
  border: 1px solid var(--c-line-soft);
  border-radius: var(--radius-lg);
}

.gallery__track {
  display: flex;
  height: 100%;
  transition: transform 0.28s ease;
  will-change: transform;
}

.gallery__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

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

@media (max-width: 1023px) {
  .pdp__gallery {
    margin-inline: 0;
  }

  .gallery__viewport {
    width: min(300px, 100%);
    height: 300px;
    max-height: 300px;
    margin-inline: auto;
    aspect-ratio: unset;
    border-radius: 0;
    border: 0;
    background: #fff;
  }

  .gallery__track,
  .gallery__slide {
    height: 300px;
  }

  .gallery__slide img {
    width: 100%;
    height: 300px;
    max-height: 300px;
    object-fit: contain;
  }
}

.gallery__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  margin-top: var(--sp-3);
}

/* Volume strip (mobile / tablet) */
.variant-strip {
  display: grid;
  gap: var(--sp-2);
}

.product-variant--desktop {
  display: none;
}

@media (min-width: 1024px) {
  .variant-strip,
  .pdp-sticky,
  .gallery__controls,
  .gallery__overlays {
    display: none;
  }

  .gallery__thumbs-row {
    display: flex;
  }

  .product-variant--desktop {
    display: block;
  }

  .pdp__gallery {
    margin-inline: 0;
  }
}

.gallery__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--c-head);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--transition), opacity var(--transition);
}

.gallery__arrow svg {
  display: block;
  width: 22px;
  height: 40px;
}

.gallery__arrow:hover,
.gallery__arrow:focus-visible {
  color: var(--c-head);
}

.gallery__arrow:disabled,
.gallery__arrow.is-disabled,
.gallery__arrow[aria-disabled='true'] {
  color: #c8c8c8;
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.gallery__dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gallery__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #cfcfcf;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.gallery__dot.is-active {
  background: #111;
}

/* Volume strip — layout helpers (visibility: блок вище + desktop media) */
.variant-strip__label {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-head);
}

.variant-strip__track {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.variant-strip__track::-webkit-scrollbar {
  display: none;
}

.variant-strip__chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--c-line);
  border-radius: 2px;
  background: #fff;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--c-ink);
  scroll-snap-align: start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.variant-strip__chip.is-selected {
  border-color: #111;
  border-bottom-width: 2px;
}

.variant-strip__chip.is-disabled,
.variant-strip__chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.variant-strip__thumb {
  width: 28px;
  height: 28px;
  overflow: hidden;
  background: #f7f7f7;
}

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

/* Sticky buy bar — вимкнено на всіх брейкпоінтах */
.pdp-sticky {
  display: none;
}

@supports (-webkit-touch-callout: none) {
  .variant-strip__chip,
  .gallery__arrow {
    min-height: 44px;
  }
}

/* Gift promo banner */
.gift-promo {
  --gift-accent: var(--c-accent, #1a1a1a);
  --gift-accent-end: color-mix(in srgb, var(--gift-accent) 55%, #9b6bff);
  position: relative;
  margin: var(--sp-4) 0;
  padding: 16px 18px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--gift-accent) 0%, var(--gift-accent-end) 100%);
  color: #fff;
  -webkit-font-smoothing: antialiased;
}

.gift-promo__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.gift-promo__icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: var(--gift-accent);
}

.gift-promo__title {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
}

.gift-promo__info {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  padding: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.gift-promo__info.is-open,
.gift-promo__info:hover {
  background: rgba(255, 255, 255, 0.16);
}

.gift-promo__text {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.45;
  opacity: 0.96;
}

.gift-promo__tooltip {
  position: absolute;
  z-index: 5;
  top: var(--gift-tip-top, calc(100% + 8px));
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: 8px;
  background: #2a2a2a;
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 400;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.gift-promo__tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: var(--gift-tip-arrow-left, 50%);
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: #2a2a2a;
  transform: rotate(45deg);
}

.gift-promo__tooltip[hidden] {
  display: none;
}

@media (min-width: 768px) {
  .gift-promo {
    padding: 18px 20px;
  }
}

@supports not (background: color-mix(in srgb, black 50%, white)) {
  .gift-promo {
    background: linear-gradient(90deg, var(--gift-accent) 0%, #5a4a7a 100%);
  }
}
