/* ========================================
   PRODUCT — Страница товара
   ======================================== */

/* --- Gallery --- */
.product-gallery {
  width: 540px;
  flex-shrink: 0;
}

.product-gallery__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 48px;
  overflow: hidden;
  background: var(--gray-light);
}

.product-gallery__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* --- Thumbnails --- */
.product-gallery__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.product-gallery__thumbs::-webkit-scrollbar { display: none; }

.product-gallery__thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.product-gallery__thumb.active {
  border-color: var(--green-btn, #4CAF50);
}

.product-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Tags --- */
.product-info__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-info__tag {
  font-family: 'Onest', sans-serif;
  font-weight: 500;
  font-size: 13px;
  padding: 6px 14px;
  background: var(--gray-light, #f5f5f5);
  border-radius: 100px;
  color: var(--gray-text, #888);
}

/* --- Info panel --- */
.product-info-panel {
  flex: 1;
  min-width: 0;
  border-radius: 48px;
}

.product-info__title {
  font-family: 'Onest', sans-serif;
  font-weight: 800;
  font-size: 28px;
  line-height: 1.2;
  color: var(--black);
}

.product-info__subtitle {
  font-family: 'Onest', sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: var(--gray-sub);
  margin-top: 4px;
}

.product-info__description {
  font-family: 'Onest', sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  color: var(--black);
  opacity: 0.72;
}

/* --- Детали товара --- */
.product-info__details {
  display: flex;
  gap: 32px;
}

.product-detail-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-detail-row__icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: contain;
}

.product-detail-row__text {
  font-family: 'Onest', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--black);
}

/* --- Цена и кнопка --- */
.product-info__pricing {
  display: flex;
  align-items: center;
  gap: 24px;
}

.product-info__price-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-info__price {
  font-family: 'Onest', sans-serif;
  font-weight: 800;
  font-size: 28px;
  color: var(--black);
}

.product-info__old-price {
  font-family: 'Onest', sans-serif;
  font-weight: 400;
  font-size: 18px;
  color: var(--gray-text);
  text-decoration: line-through;
}

.product-info__buy-btn {
  flex: 1;
}

.product-info__buy-icon {
  width: 28px;
  height: 28px;
}

/* --- Похожие товары --- */
.similar-panel {
  width: 100%;
  max-width: 1400px;
  padding: 32px 24px;
  background: var(--white);
  border-radius: 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.similar-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
  padding: 4px 0;
}

.similar-scroll::-webkit-scrollbar {
  display: none;
}

.similar-scroll .product-card {
  min-width: 220px;
  max-width: 220px;
  flex-shrink: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1280px) {
  .product-gallery {
    width: 440px;
  }
}

@media (max-width: 1024px) {
  .product-main {
    flex-direction: column;
  }

  .product-gallery {
    width: 100%;
  }

  .product-gallery__image-wrap {
    border-radius: 32px;
    max-height: 500px;
    aspect-ratio: auto;
  }

  .product-info-panel {
    width: 100%;
    border-radius: 32px;
  }

  .similar-panel {
    border-radius: 32px;
  }
}

@media (max-width: 768px) {
  .product-info__title {
    font-size: 22px;
  }

  .product-info__price {
    font-size: 22px;
  }

  .product-info__pricing {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .product-info__details {
    flex-direction: column;
    gap: 16px;
  }

  .similar-scroll .product-card {
    min-width: 180px;
    max-width: 180px;
  }
}
