/* Страница товара */

.product-page {
  padding-top: calc(var(--header-h) + var(--safe-top, 0px) + 16px);
  padding-bottom: 48px;
}

.product-back {
  display: inline-flex;
  align-items: center;
  margin-bottom: 24px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--cream-muted);
  transition: color 0.2s;
}
.product-back:hover { color: var(--ember); }

.product-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  color: var(--cream-muted);
}
.product-breadcrumb a:hover { color: var(--ember); }
.product-breadcrumb span:last-child {
  color: var(--cream);
}

.product-layout {
  display: grid;
  gap: 40px;
  align-items: start;
}

@media (min-width: 900px) {
  .product-layout {
    grid-template-columns: 1.05fr 1fr;
    gap: 56px;
  }
}

/* Gallery */
.product-gallery__main {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.product-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-gallery__thumbs {
  display: flex;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.product-gallery__thumbs li {
  flex: 0 0 auto;
}
.product-gallery__thumbs::-webkit-scrollbar { display: none; }
.product-gallery__thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  padding: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  opacity: 0.65;
  transition: opacity 0.2s, border-color 0.2s;
}
.product-gallery__thumb.is-active,
.product-gallery__thumb:hover {
  opacity: 1;
  border-color: var(--ember);
}
.product-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Info */
.product-info__category {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
}
.product-info__status {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--gold);
}
.product-info__status--hit {
  background: var(--gold);
  color: var(--bg);
}
.product-info__status--new {
  background: var(--olive);
}
.product-info__status--popular {
  background: #2f6db3;
}
.product-info__status--chef {
  background: #7447a8;
}
.product-info__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 10px;
}
.product-info__weight {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--cream-muted);
}
.product-info__price-box {
  margin-bottom: 8px;
}
.product-info__old-price {
  margin: 0 0 4px;
  font-size: 0.95rem;
  color: var(--cream-muted);
  text-decoration: line-through;
}
.product-info__price {
  margin: 0 0 6px;
  font-size: 2rem;
  font-weight: 600;
  color: var(--cream);
}
.product-info__price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--cream-muted);
}
.product-info__subtitle {
  margin: 0 0 24px;
  font-size: 0.9rem;
  color: var(--gold);
}
.product-info__discount {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--ember);
  font-weight: 500;
}

.product-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.product-qty__label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--cream-muted);
}
.product-qty__controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.product-qty__controls button {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--cream);
  font-size: 1.2rem;
  line-height: 1;
}
.product-qty__controls span {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
  font-size: 1.05rem;
}

.product-info .btn--primary { margin-bottom: 10px; }
.product-info .btn--ghost { margin-bottom: 28px; }

.product-info__details {
  margin-bottom: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.product-info__details h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 12px;
}
.product-info__details p {
  margin: 0;
  color: var(--cream-muted);
  line-height: 1.65;
}

.product-info__facts {
  margin: 0;
  padding: 0;
  list-style: none;
}
.product-info__facts li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--cream-muted);
}
.product-info__facts li:last-child { border-bottom: none; }
.product-info__facts strong {
  display: block;
  color: var(--cream);
  font-weight: 600;
  margin-bottom: 2px;
}

/* Related */
.related {
  padding: 48px 0 24px;
  border-top: 1px solid var(--border);
}
.related__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 0 0 24px;
}
.related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.related-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.related-card:hover {
  border-color: rgba(232, 90, 44, 0.35);
  transform: translateY(-3px);
}
.related-card img {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
}
.related-card h3 {
  margin: 0;
  padding: 10px 12px 4px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
}
.related-card p {
  margin: 0;
  padding: 0 12px 12px;
  font-weight: 600;
  color: var(--ember);
  font-size: 0.9rem;
}
.related-card__old-price {
  display: block;
  margin-bottom: 2px;
  font-size: 0.74rem;
  color: var(--cream-muted);
  text-decoration: line-through;
}

.product-order-cta {
  padding: 32px 0 48px;
}
.product-order-cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.product-order-cta__inner p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.product-not-found {
  text-align: center;
  padding: 64px 0;
}
.product-not-found h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0 0 12px;
}
.product-not-found p {
  color: var(--cream-muted);
  margin: 0 0 24px;
}

@media (max-width: 768px) {
  .product-page {
    padding-bottom: 24px;
  }
  .product-back {
    margin-bottom: 16px;
    min-height: 44px;
    align-items: center;
  }
  .product-gallery__main {
    aspect-ratio: 1;
  }
  .product-info__price {
    font-size: 1.75rem;
  }
  .product-order-cta__inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .product-order-cta__inner .btn {
    width: 100%;
  }
}
