/* ─── Product detail page ───────────────────────────────────────────────────── */
.product-page {
  flex: 1;
  padding: 2rem 1.5rem 5rem;
}

.pp-container {
  max-width: 1100px;
  margin: 0 auto;
}

.pp-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #888;
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s;
}
.pp-back:hover { color: #111; }

/* ─── Layout ─────────────────────────────────────────────────────────────────── */
.pp-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 4rem;
  align-items: start;
}

/* ─── Gallery ─────────────────────────────────────────────────────────────────── */
.pp-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: sticky;
  top: 5rem;
}

.pp-gallery--empty {
  aspect-ratio: 1;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #ccc;
}

.pp-gallery__main {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f5f5f5;
}

.pp-gallery__main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.pp-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.9);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  transition: background 0.2s;
  z-index: 2;
}
.pp-arrow:hover { background: #fff; }
.pp-arrow--prev { left: 12px; }
.pp-arrow--next { right: 12px; }

.pp-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.pp-thumbs::-webkit-scrollbar { display: none; }

.pp-thumb {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid transparent;
  background: none;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.15s;
}
.pp-thumb.active { border-color: #111; }
.pp-thumb:hover:not(.active) { border-color: #ccc; }
.pp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ─── Info panel ─────────────────────────────────────────────────────────────── */
.pp-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 0.5rem;
}

.pp-category {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
}

.pp-name {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #111;
}

/* ─── Pricing ─────────────────────────────────────────────────────────────────── */
.pp-pricing {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pp-badge-offer {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  background: #111;
  color: #fff;
}

.pp-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
}

.pp-price--sale { color: #c0392b; }

.pp-price-orig {
  font-size: 1rem;
  color: #aaa;
  text-decoration: line-through;
}

/* ─── Stock ──────────────────────────────────────────────────────────────────── */
.pp-stock {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 2px;
  display: inline-block;
}
.pp-stock--ok  { background: #f0faf0; color: #27ae60; }
.pp-stock--low { background: #fff8e1; color: #e67e22; }
.pp-stock--out { background: #fdf0ee; color: #c0392b; }

/* ─── Ship ───────────────────────────────────────────────────────────────────── */
.pp-ship {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #555;
}

/* ─── Label ──────────────────────────────────────────────────────────────────── */
.pp-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 0.5rem;
}

/* ─── Sizes ──────────────────────────────────────────────────────────────────── */
.pp-sizes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pp-size-tag {
  padding: 0.4rem 0.85rem;
  border: 1px solid #e0e0e0;
  font-size: 0.82rem;
  font-weight: 500;
  color: #111;
  letter-spacing: 0.03em;
}

.pp-size-btn {
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.pp-size-btn:hover { border-color: #111; }
.pp-size-btn.active { background: #111; color: #fff; border-color: #111; }

.pp-size-selected { font-weight: 700; color: #111; }

.pp-size-err {
  font-size: 0.78rem;
  color: #e53935;
  margin-top: 0.4rem;
}

/* ─── CTA Buttons ────────────────────────────────────────────────────────────── */
.pp-cta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 1.25rem 0;
}

.pp-btn-cart {
  width: 100%;
  padding: 0.95rem;
  border: 1.5px solid #111;
  color: #111;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 2px;
  transition: background 0.18s, color 0.18s;
  cursor: pointer;
}
.pp-btn-cart:hover { background: #111; color: #fff; }
.pp-btn-cart.added { background: #111; color: #fff; }
.pp-btn-cart.disabled { opacity: 0.4; cursor: not-allowed; }

.pp-btn-buy {
  width: 100%;
  padding: 0.95rem;
  background: #111;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: opacity 0.18s;
  cursor: pointer;
}
.pp-btn-buy:hover { opacity: 0.82; }

.pp-btn-fav {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #e0e0e0;
  color: #888;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 2px;
  transition: border-color 0.15s, color 0.15s;
  cursor: pointer;
}
.pp-btn-fav:hover, .pp-btn-fav.active { border-color: #e53935; color: #e53935; }

/* ─── Trust badges ───────────────────────────────────────────────────────────── */
.pp-trust {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  background: #fafafa;
  border: 1px solid #efefef;
  border-radius: 4px;
}

.pp-trust__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #444;
  letter-spacing: 0.02em;
}

.pp-trust__item svg {
  flex-shrink: 0;
  color: #111;
}

/* ─── Customer photos (social proof) ─────────────────────────────────────────── */
.pp-customers {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #efefef;
}

.pp-customers__head {
  margin-bottom: 1rem;
}

.pp-customers__eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #888;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.pp-customers__title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.pp-customers__sub {
  font-size: 0.82rem;
  color: #666;
  line-height: 1.5;
}

.pp-customers__track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.pp-customers__track::-webkit-scrollbar {
  height: 4px;
}

.pp-customers__track::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

.pp-customers__item {
  flex: 0 0 140px;
  scroll-snap-align: start;
}

.pp-customers__photo-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  border-radius: 6px;
  overflow: hidden;
}

.pp-customers__item img {
  width: 140px;
  height: 175px;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  border: 1px solid #ececec;
}

.pp-customers__item figcaption {
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: #777;
  line-height: 1.35;
}

.pp-customers-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.pp-customers-lightbox img {
  max-width: min(92vw, 520px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
}

.pp-customers-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

@media (min-width: 768px) {
  .pp-customers__item {
    flex-basis: 160px;
  }

  .pp-customers__item img {
    width: 160px;
    height: 200px;
  }
}

/* ─── Easy returns ───────────────────────────────────────────────────────────── */
.pp-returns {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: #f5f5f5;
  border-radius: 12px;
}

.pp-returns__title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 0.35rem;
}

.pp-returns__text {
  font-size: 0.82rem;
  color: #666;
  line-height: 1.55;
  margin: 0;
}

.pp-returns__link {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  color: #666;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.pp-returns__link:hover {
  color: #111;
}

/* ─── Trust teaser (above add to cart) ───────────────────────────────────────── */
.trust-teaser__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
  padding: 0;
  border: none;
  background: none;
  font-size: 0.76rem;
  font-weight: 600;
  color: #555;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color 0.15s;
}

.trust-teaser__link::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f0fdf4;
  color: #15803d;
  font-size: 0.62rem;
  text-decoration: none;
}

.trust-teaser__link:hover {
  color: #111;
}

/* ─── Related products ───────────────────────────────────────────────────────── */
.pp-related {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #efefef;
}

.pp-related__title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.pp-related__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.pp-related-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.pp-related-card__media {
  position: relative;
  aspect-ratio: 1;
  background: #f5f5f5;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.55rem;
}

.pp-related-card__img,
.pp-related-card__empty {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pp-related-card__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: #bbb;
}

.pp-related-card__cat {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 0.2rem;
}

.pp-related-card__name {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pp-related-card__pricing {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.pp-related-card__price {
  font-size: 0.78rem;
  font-weight: 700;
}

.pp-related-card__price--sale {
  color: #c0392b;
}

.pp-related-card__orig {
  font-size: 0.72rem;
  color: #aaa;
  text-decoration: line-through;
}

@media (min-width: 640px) {
  .pp-related__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
}

/* ─── Description ─────────────────────────────────────────────────────────────── */
.pp-desc {
  padding-top: 0.5rem;
  border-top: 1px solid #f0f0f0;
}

.pp-desc p:last-child {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ─── Error ──────────────────────────────────────────────────────────────────── */
.pp-error {
  text-align: center;
  padding: 5rem 2rem;
  font-size: 1rem;
  color: #888;
}

.pp-back-link {
  display: inline-block;
  margin-top: 1rem;
  color: #111;
  text-decoration: underline;
  font-size: 0.9rem;
}

.product-page__loading {
  text-align: center;
  padding: 6rem;
  color: #aaa;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .pp-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .pp-gallery { position: static; }

  .pp-name { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .product-page { padding: 1.25rem 1rem 4rem; }
  .pp-name { font-size: 1.2rem; }
  .pp-price { font-size: 1.25rem; }
  .pp-thumb { width: 56px; height: 56px; }
}

/* ─── Reviews summary ─────────────────────────────────────────────────────── */
.pp-reviews-summary {
  margin: 0.35rem 0 0.75rem;
}

.pp-reviews-stars {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.pp-reviews-stars__icons {
  display: inline-flex;
  gap: 2px;
  color: #F59E0B;
  font-size: 1rem;
  line-height: 1;
}

.pp-reviews-stars__icons .pp-star--empty {
  color: #e5e7eb;
}

.pp-reviews-count {
  font-size: 0.78rem;
  color: #666;
}

.pp-reviews-empty {
  font-size: 0.78rem;
  color: #888;
  margin: 0;
}

.pp-reviews-first {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: #111;
  text-decoration: underline;
  cursor: pointer;
}

/* ─── DOP reference price ───────────────────────────────────────────────────── */
.pp-price-dop {
  display: block;
  width: 100%;
  font-size: 0.82rem;
  color: #777;
  margin-top: 0.15rem;
}

/* ─── Offer countdown ───────────────────────────────────────────────────────── */
.pp-offer-countdown {
  font-size: 0.78rem;
  font-weight: 600;
  color: #b45309;
  margin: 0.35rem 0 0;
  letter-spacing: 0.02em;
}

/* ─── Size urgency ──────────────────────────────────────────────────────────── */
.pp-size-urgency {
  font-size: 0.78rem;
  font-weight: 700;
  color: #dc2626;
  margin: 0.5rem 0 0;
}

/* ─── Reviews section ───────────────────────────────────────────────────────── */
.pp-reviews-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f0f0f0;
}

.pp-reviews-section__title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.pp-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pp-review-card {
  padding: 0.85rem 0;
  border-bottom: 1px solid #f5f5f5;
}

.pp-review-card:last-child {
  border-bottom: none;
}

.pp-review-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.pp-review-card__name {
  font-size: 0.82rem;
  font-weight: 700;
}

.pp-review-card__date {
  font-size: 0.72rem;
  color: #aaa;
}

.pp-review-card__text {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.6;
  white-space: pre-wrap;
}

.pp-reviews-write {
  margin-top: 1rem;
  background: none;
  border: 1px solid #ddd;
  padding: 0.55rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.pp-reviews-write:hover {
  background: #f9f9f9;
}

/* ─── Review modal form ─────────────────────────────────────────────────────── */
.pp-review-modal {
  max-width: 420px;
}

.pp-review-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pp-review-form__stars {
  display: flex;
  gap: 0.25rem;
  justify-content: center;
  margin: 0.25rem 0 0.5rem;
}

.pp-review-star {
  background: none;
  border: none;
  font-size: 1.75rem;
  color: #e5e7eb;
  cursor: pointer;
  padding: 0 0.15rem;
  line-height: 1;
  transition: color 0.15s, transform 0.15s;
}

.pp-review-star.active,
.pp-review-star:hover {
  color: #F59E0B;
  transform: scale(1.08);
}

.pp-review-form__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #888;
}

.pp-review-form__input {
  width: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.88rem;
  resize: vertical;
}

.pp-review-form__input:focus {
  outline: none;
  border-color: #111;
}

.pp-review-form__err {
  font-size: 0.78rem;
  color: #dc2626;
  margin: 0;
}

.pp-review-form__submit {
  margin-top: 0.25rem;
  background: #111;
  color: #fff;
  border: none;
  padding: 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.pp-review-form__submit:hover {
  opacity: 0.88;
}

.pp-review-form__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pp-review-form__optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #aaa;
}

.pp-review-form__photo {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pp-review-form__file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pp-review-form__photo-btn {
  display: inline-block;
  align-self: flex-start;
  border: 1px dashed #ccc;
  padding: 0.55rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  color: #444;
}

.pp-review-form__photo-btn:hover {
  border-color: #111;
  color: #111;
}

.pp-review-form__preview {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #eee;
}

.pp-review-form__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pp-review-form__photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.pp-review-form__hint {
  font-size: 0.72rem;
  color: #aaa;
  margin: -0.25rem 0 0;
}

.pp-review-card__photo {
  margin-top: 0.65rem;
  width: 100%;
  max-width: 220px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
}

.pp-review-card__photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
