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

.product-main {
  width: 100%;
  box-sizing: border-box;
}

.product-page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 16px 20px 56px;
  box-sizing: border-box;
  min-width: 0;
}

.product-page__inner {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.product-page__breadcrumb {
  margin-bottom: 20px;
  width: 100%;
  min-width: 0;
  /* Одна строка: длинные названия уходят в горизонтальный скролл */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.product-page__breadcrumb-track {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px 10px;
  font-family: "Manrope-SemiBold", Helvetica, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
  min-height: 1.35em;
}

.product-page__breadcrumb-track > * {
  flex-shrink: 0;
}

#product-bc-cats {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px 10px;
}

.product-page__crumb {
  color: var(--neutral-200);
  text-decoration: none;
  opacity: 0.55;
}

.product-page__crumb:hover {
  opacity: 0.9;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.product-page__crumb--muted {
  opacity: 0.55;
  cursor: default;
}

.product-page__crumb--muted:hover {
  text-decoration: none;
}

.product-page__crumb--current {
  opacity: 1;
  font-weight: 500;
  cursor: default;
}

.product-page__crumb--current:hover {
  text-decoration: none;
}

.product-page__crumb-sep {
  opacity: 0.35;
  user-select: none;
}

.product-page__state {
  font-family: "Manrope-SemiBold", Helvetica, sans-serif;
  font-size: 16px;
  padding: 32px 8px;
  color: var(--neutral-200);
  opacity: 0.65;
}

.product-page__state--error {
  color: #b00020;
  opacity: 1;
}

.product-page__title {
  margin: 0 0 24px;
  font-family: "Manrope-Bold", Helvetica, system-ui, sans-serif;
  font-weight: 500;
  font-size: 28px;
  letter-spacing: 0.28px;
  line-height: 36.4px;
  color: var(--neutral-200);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  min-width: 0;
}

.product-page__panel-title {
  margin: -4px 0 0;
  padding: 0;
  font-family: "Manrope-Bold", Helvetica, system-ui, sans-serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.18px;
  line-height: 1.35;
  color: var(--neutral-200);
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}

.product-page__hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Одна линия: квадратное фото и панель одной высоты (десктоп) */
.product-page__hero-main {
  display: flex;
  align-items: stretch;
  gap: 28px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.product-page__hero-media {
  flex: 0 0 min(100%, 520px);
  width: min(100%, 520px);
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.product-page__figure {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--neutralgray);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.product-page__figure--has-photo,
.product-page__figure--has-photo .product-page__img {
  cursor: zoom-in;
}

.product-page__figure--interactive-gallery .product-page__img {
  cursor: ew-resize;
}

.product-page__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.product-page__gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 10px rgba(26, 26, 26, 0.14);
  color: var(--neutral-200);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.product-page__figure:hover .product-page__gallery-nav,
.product-page__gallery-nav:focus-visible {
  opacity: 1;
}

.product-page__gallery-nav[hidden] {
  display: none !important;
}

.product-page__gallery-nav--prev {
  left: 12px;
}

.product-page__gallery-nav--next {
  right: 12px;
}

.product-page__gallery-nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}

.product-page__gallery-nav:focus-visible {
  outline: 2px solid var(--colors-100);
  outline-offset: 2px;
}

.product-page__gallery-zoom {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 12px;
  border: none;
  border-radius: 999px;
  background: rgba(26, 26, 26, 0.78);
  color: #fff;
  font-family: "Manrope-SemiBold", Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.product-page__figure:hover .product-page__gallery-zoom,
.product-page__gallery-zoom:focus-visible {
  opacity: 1;
}

.product-page__gallery-zoom[hidden] {
  display: none !important;
}

.product-page__gallery-zoom:hover {
  background: rgba(26, 26, 26, 0.9);
}

.product-page__gallery-zoom:focus-visible {
  outline: 2px solid var(--colors-100);
  outline-offset: 2px;
}

.product-page__gallery-zoom-icon {
  font-size: 14px;
  line-height: 1;
  transform: scaleX(-1);
}

.product-page__gallery-counter {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(26, 26, 26, 0.72);
  color: #fff;
  font-family: "Manrope-SemiBold", Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1;
  pointer-events: none;
}

.product-page__gallery-counter[hidden] {
  display: none !important;
}

.product-page__img-placeholder {
  font-family: "Manrope-SemiBold", Helvetica, sans-serif;
  font-size: 15px;
  color: rgba(26, 26, 26, 0.35);
}

.product-page__img[hidden],
.product-page__img-placeholder[hidden] {
  display: none;
}

.product-page__img:not([hidden]) ~ .product-page__img-placeholder {
  display: none;
}

.product-page__colors {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-page__colors[hidden] {
  display: none;
}

.product-page__colors-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-page__color-btn {
  min-height: 40px;
  padding: 8px 16px;
  border: 1.5px solid var(--neutralgray);
  border-radius: 10px;
  background: #fff;
  font-family: "Manrope-SemiBold", Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.2;
  color: var(--neutral-200);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.product-page__color-btn:hover {
  border-color: var(--colors-100);
}

.product-page__color-btn--active {
  border-color: var(--colors-100);
  background: var(--colors-100);
  color: var(--neutral-100);
}

.product-page__color-btn:focus-visible {
  outline: 2px solid var(--colors-100);
  outline-offset: 2px;
}

.product-page__colors--need-choice .product-page__colors-options {
  outline: 2px solid var(--colors-300);
  outline-offset: 4px;
  border-radius: 12px;
}

.product-page__favorite {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 10px rgba(26, 26, 26, 0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-200);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.product-page__favorite:hover {
  transform: scale(1.06);
  background: #fff;
}

.product-page__favorite:focus-visible {
  outline: 2px solid var(--colors-100);
  outline-offset: 2px;
}

.product-page__favorite-icon {
  font-size: 22px;
  line-height: 1;
  display: block;
  font-family: "Manrope-Bold", Helvetica, sans-serif;
}

.product-page__favorite--active {
  color: #c62828;
}

.product-page__badges {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.product-page__badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-family: "Manrope-Bold", Helvetica, sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #1a1a1a;
}

.product-page__badge--new {
  background: #ffe900;
}

.product-page__badge--hit {
  background: #c4e400;
}

.product-page__badge--promo {
  background: var(--colors-100, #2f2fbb);
  color: #fff;
}

.product-page__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.product-page__thumbs[hidden] {
  display: none;
}

.product-page__thumb {
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #ffffff;
  flex-shrink: 0;
}

.product-page__thumb[hidden] {
  display: none;
}

.product-page__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #ffffff;
}

.product-page__thumb--active {
  border-color: var(--colors-100);
}

.product-page__panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px 28px 32px;
  background: var(--neutral-100);
  border: 1px solid var(--neutralgray);
  border-radius: 24px;
  box-sizing: border-box;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.product-page__meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  min-width: 0;
}

.product-page__sku {
  margin: 0;
  font-family: "Manrope-SemiBold", Helvetica, sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: rgba(26, 26, 26, 0.5);
  flex-shrink: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-page__rating {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  min-width: 0;
}

.product-page__rating-row {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  white-space: nowrap;
}

/* Звёзды рейтинга: фон + заполнение по доле avg/max */
.product-page__stars-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  vertical-align: middle;
}

.product-page__stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  line-height: 1;
  flex-shrink: 0;
}

.product-page__stars--fg {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  width: 0;
  pointer-events: none;
}

.product-page__star {
  display: block;
  font-size: 17px;
  flex-shrink: 0;
}

.product-page__star--bg {
  color: rgba(26, 26, 26, 0.18);
}

.product-page__star--fg {
  color: #ffc400;
  text-shadow: 0 0 0 rgba(0, 0, 0, 0.06);
}

.product-page__rating-caption {
  margin: 0;
  font-family: "Manrope-Medium", "Manrope-SemiBold", Helvetica, system-ui, sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.16px;
  line-height: 1.3;
  color: var(--neutral-200);
  opacity: 0.5;
  white-space: nowrap;
}

.product-page__rating-gap {
  white-space: pre;
}

.product-page__prices-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

/* Гость: только розница на всю ширину */
.product-page__prices-row--guest {
  grid-template-columns: 1fr;
}

.product-page__prices-row--guest .product-page__price-box--retail {
  max-width: 100%;
}

.product-page__price-box {
  min-width: 0;
  padding: 16px 20px;
  border: 1px solid var(--neutralgray);
  border-radius: 16px;
  box-sizing: border-box;
}

.product-page__price-box--retail,
.product-page__price-box--wholesale {
  width: 100%;
}

.product-page__wholesale-tiers {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-page__wholesale-tiers[hidden] {
  display: none !important;
}

.product-page__wholesale-tier {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: rgba(26, 26, 26, 0.62);
}

.product-page__wholesale-tier--active {
  color: var(--colors-100, #2f2fbb);
  font-weight: 700;
}

.product-page__wholesale-moq {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(26, 26, 26, 0.72);
}

.product-page__wholesale-moq[hidden],
.product-page__wholesale-add[hidden] {
  display: none !important;
}

.product-page__wholesale-add {
  margin-top: 12px;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(47, 47, 187, 0.28);
  border-radius: 12px;
  background: #fff;
  color: #2f2fbb;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.product-page__wholesale-add:hover {
  background: rgba(47, 47, 187, 0.06);
}

.product-page__auth-hints {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 0;
}

/* display:flex выше перебивал бы нативное скрытие по атрибуту hidden */
.product-page__auth-hints[hidden] {
  display: none !important;
}

.product-page__hint-line {
  margin: 0;
  padding: 12px 16px;
  box-sizing: border-box;
  width: 100%;
  font-family: "Manrope-SemiBold", Helvetica, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(26, 26, 26, 0.7);
  background: #ebebeb;
  border: 1px solid #c9c9c9;
  border-radius: 12px;
}

.product-page__hint-rest {
  color: rgba(26, 26, 26, 0.65);
}

.product-page__price-label {
  font-family: "Manrope-SemiBold", Helvetica, sans-serif;
  font-size: 13px;
  color: var(--neutral-200);
  margin: 0 0 8px;
}

.product-page__price-row {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}

.product-page__price-old {
  font-family: "Manrope-Medium", Helvetica, sans-serif;
  font-size: 16px;
  color: rgba(26, 26, 26, 0.45);
  text-decoration: line-through;
}

.product-page__price-old[hidden] {
  display: none;
}

.product-page__price-val {
  font-family: "Manrope-Bold", Helvetica, sans-serif;
  font-weight: 500;
  font-size: 22px;
  color: var(--neutral-200);
}

.product-page__price-unit {
  font-family: "Manrope-SemiBold", Helvetica, sans-serif;
  font-size: 14px;
  color: var(--neutral-200);
}

.product-page__panel-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
  padding-top: 4px;
}

.product-page__stock {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 9px;
  min-height: 36px;
  padding: 7px 12px;
  margin: 0;
  max-width: 100%;
  border: 1px solid rgba(47, 47, 187, 0.2);
  border-radius: 10px;
  background: rgba(47, 47, 187, 0.06);
  color: var(--colors-100, #2f2fbb);
  box-sizing: border-box;
}

.product-page__stock-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  box-sizing: border-box;
  border: 1.5px solid var(--colors-100, #2f2fbb);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: var(--colors-100, #2f2fbb);
  flex-shrink: 0;
}

.product-page__stock--out {
  border-color: rgba(180, 35, 24, 0.18);
  background: rgba(180, 35, 24, 0.06);
  color: var(--store-danger, #b42318);
}

.product-page__stock--out .product-page__stock-mark {
  border-color: currentColor;
  color: currentColor;
  font-size: 11px;
}

.product-page__stock-text {
  font-family: var(--store-font, "Onest", "Manrope", system-ui, sans-serif);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  color: inherit;
}

.product-page__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  padding-top: 0;
}

.product-page__cart.catalog-product-card__cart {
  flex: 0 0 auto;
  min-width: unset;
  width: auto;
  height: 42px;
  padding: 0 20px;
  border-radius: 12px;
  justify-content: center;
  gap: 8px;
}

.product-page__cart.catalog-product-card__cart .catalog-product-card__cart-text {
  flex: 0 0 auto;
  text-align: center;
}

.product-page__cart.catalog-product-card__cart .catalog-product-card__cart-icon {
  width: 22px;
  height: 22px;
}

.product-page__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-page__quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1.5px solid #3434c9;
  border-radius: 12px;
  background: #fff;
  color: #3434c9;
  font-family: var(--store-font, "Onest", "Manrope", system-ui, sans-serif);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-page__quick-btn:hover,
.product-page__quick-btn[aria-expanded="true"] {
  background: #3434c9;
  color: #fff;
}

.product-page__quick-btn:active {
  transform: scale(0.98);
}

.product-page__quick-btn--wa {
  border-color: #1f9d55;
  color: #167a42;
}

.product-page__quick-btn--wa:hover {
  background: #1f9d55;
  color: #fff;
}

.product-page__quick-btn[hidden] {
  display: none;
}

.product-page__quick-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(52, 52, 201, 0.14);
  border-radius: 14px;
  background: rgba(52, 52, 201, 0.04);
}

.product-page__quick-form[hidden] {
  display: none;
}

.product-page__quick-lead {
  margin: 0;
  color: #3d3d56;
  font-size: 14px;
  line-height: 1.45;
}

.product-page__quick-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 10px;
}

.product-page__quick-field {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #5b5b74;
}

.product-page__quick-field input {
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d6d6e6;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 15px;
  color: #1c1c2e;
}

.product-page__quick-field input:focus {
  outline: 2px solid rgba(52, 52, 201, 0.35);
  outline-offset: 1px;
  border-color: #3434c9;
}

.product-page__quick-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.product-page__quick-submit {
  justify-self: start;
  min-height: 42px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: var(--colors-100, #2f2fbb);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-page__quick-submit:hover {
  background: #24249a;
}

.product-page__quick-submit:active {
  transform: scale(0.98);
}

.product-page__quick-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.product-page__quick-status {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.product-page__quick-status:empty {
  display: none;
}

.product-page__quick-status--ok {
  color: #19733b;
}

.product-page__quick-status--error {
  color: #b42318;
}

.product-page__quick-form--done .product-page__quick-fields,
.product-page__quick-form--done .product-page__quick-submit,
.product-page__quick-form--done .product-page__quick-lead {
  display: none;
}

@media (max-width: 640px) {
  .product-page__quick-btn {
    flex: 1 1 100%;
    min-height: 46px;
  }

  .product-page__quick-fields {
    grid-template-columns: 1fr;
  }

  .product-page__quick-submit {
    justify-self: stretch;
    min-height: 46px;
  }
}

.product-page__details {
  margin-bottom: 48px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.product-page__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid rgba(26, 26, 26, 0.1);
  margin-bottom: 20px;
}

.product-page__tab {
  padding: 12px 18px;
  margin: 0 0 -1px;
  border: 1px solid transparent;
  border-radius: 10px 10px 0 0;
  background: transparent;
  font-family: "Manrope-SemiBold", Helvetica, sans-serif;
  font-size: 15px;
  color: rgba(26, 26, 26, 0.45);
  cursor: pointer;
}

.product-page__tab:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.product-page__tab--active {
  color: var(--colors-100, #2f2fbb);
  background: var(--neutral-100);
  border-color: rgba(26, 26, 26, 0.1);
  border-bottom-color: var(--neutral-100);
}

/* Активная вкладка задаёт высоту; скрытая вынесена из потока — длинный список отзывов не оставляет пустоту под «Описание» */
.product-page__panels {
  position: relative;
  display: block;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.product-page__panel-block {
  min-width: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 8px 4px 24px;
  overflow-x: hidden;
}

.product-page__panel-block:not(.product-page__panel-block--active) {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
}

.product-page__panel-block--active {
  position: relative;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

.product-page__description {
  margin: 0;
  font-family: "Manrope-SemiBold", Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--neutral-200);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

.product-delivery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 1080px;
}

.product-delivery-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  min-height: 128px;
  padding: 20px;
  border: 1px solid rgba(26, 26, 26, 0.09);
  border-radius: 14px;
  background: #fff;
  box-sizing: border-box;
}

.product-delivery-card__number {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  border-radius: 10px;
  background: var(--colors-300, #ffe900);
  color: #1a1a1a;
  font-family: "Manrope-Bold", Helvetica, sans-serif;
  font-size: 12px;
}

.product-delivery-card h3 {
  margin: 1px 0 7px;
  color: var(--neutral-200);
  font-family: "Manrope-Bold", Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.35;
}

.product-delivery-card p {
  margin: 0;
  color: rgba(26, 26, 26, 0.65);
  font-family: "Manrope-SemiBold", Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.65;
}

@media (max-width: 700px) {
  .product-delivery-grid { grid-template-columns: 1fr; }
  .product-delivery-card { min-height: 0; padding: 16px; }
}

.product-commerce-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 1180px;
}

.product-commerce-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(26, 26, 26, 0.09);
  border-radius: 18px;
  background: #fff;
  box-shadow: none;
}

.product-commerce-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--colors-300, #ffe900);
  content: "";
}

.product-commerce-card--payment::before {
  background: var(--colors-100, #3232c7);
}

.product-commerce-card__header {
  display: flex;
  align-items: center;
  min-height: 104px;
  padding: 26px 28px 20px;
  box-sizing: border-box;
}

.product-commerce-card--delivery .product-commerce-card__header {
  background: linear-gradient(135deg, rgba(255, 233, 0, 0.14), #fff 68%);
}

.product-commerce-card--payment .product-commerce-card__header {
  background: linear-gradient(135deg, rgba(50, 50, 199, 0.05), #fff 68%);
}

.product-commerce-card__header h2 {
  margin: 0 0 6px;
  color: var(--neutral-200);
  font-family: "Manrope-Bold", Helvetica, sans-serif;
  font-size: 24px;
  line-height: 1.15;
}

.product-commerce-card__header p {
  margin: 0;
  color: rgba(26, 26, 26, 0.55);
  font-family: "Manrope-SemiBold", Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.5;
}

.product-commerce-card__body {
  padding: 4px 28px 28px;
}

.product-commerce-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-commerce-list__item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(26, 26, 26, 0.075);
}

.product-commerce-list__item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.product-commerce-list__marker {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--colors-300, #ffe900);
  box-shadow: inset 0 0 0 1px rgba(26, 26, 26, 0.35);
}

.product-commerce-card--payment .product-commerce-list__marker {
  background: var(--colors-100, #3232c7);
}

.product-commerce-list__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.product-commerce-list__copy strong {
  color: var(--neutral-200);
  font-family: "Manrope-Bold", Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.35;
}

.product-commerce-list__copy > span {
  color: rgba(26, 26, 26, 0.58);
  font-family: "Manrope-SemiBold", Helvetica, sans-serif;
  font-size: 11px;
  line-height: 1.55;
}

.product-commerce-list__status {
  padding: 20px 0 4px;
  color: rgba(26, 26, 26, 0.48);
  font-family: "Manrope-SemiBold", Helvetica, sans-serif;
  font-size: 12px;
}

@media (max-width: 900px) {
  .product-commerce-info { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .product-commerce-card { border-radius: 17px; }
  .product-commerce-card__header { min-height: 94px; padding: 22px 18px 14px; }
  .product-commerce-card__header h2 { font-size: 20px; }
  .product-commerce-card__body { padding: 0 18px 20px; }
}

.product-specs {
  margin: 0;
  padding: 0;
  max-width: 640px;
}

.product-specs__empty {
    margin: 0;
    font-size: 14px;
    color: rgba(26, 26, 26, 0.55);
}

.product-specs__row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 14px;
}

.product-specs__row:last-child {
  margin-bottom: 0;
}

.product-specs__term,
.product-specs__value {
  margin: 0;
  font-family: "Manrope-SemiBold", Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--neutral-200);
}

.product-specs__term {
  flex: 0 0 auto;
  white-space: nowrap;
}

.product-specs__leader {
  flex: 1 1 auto;
  min-width: 24px;
  height: 1px;
  margin: 0;
  align-self: center;
  border: none;
  border-bottom: 1px dotted rgba(26, 26, 26, 0.28);
}

.product-specs__value {
  flex: 0 0 auto;
  max-width: 55%;
  text-align: right;
  word-break: break-word;
}

/* Отзывы — ширина как у «Описание» (во всю панель) */
.product-reviews {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.product-review-form {
  padding: 20px;
  border-radius: 12px;
  background: rgba(26, 26, 26, 0.03);
  border: 1px solid rgba(26, 26, 26, 0.08);
  box-sizing: border-box;
}

.product-review-form__title {
  margin: 0 0 8px;
  font-family: "Manrope-Bold", Helvetica, system-ui, sans-serif;
  font-size: 17px;
  color: var(--neutral-200);
}

.product-review-form__hint {
  margin: 0 0 16px;
  font-family: "Manrope-SemiBold", Helvetica, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(26, 26, 26, 0.55);
}

.product-review-form__fields[hidden] {
  display: none;
}

.product-review-form__stars-field {
  margin: 0 0 16px;
  padding: 0;
  border: none;
}

.product-review-form__legend {
  padding: 0;
  margin-bottom: 8px;
  font-family: "Manrope-SemiBold", Helvetica, system-ui, sans-serif;
  font-size: 14px;
  color: var(--neutral-200);
}

.product-review-stars-input {
  display: flex;
  gap: 4px;
  align-items: center;
}

.product-review-stars-input__btn {
  margin: 0;
  padding: 4px 6px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: rgba(26, 26, 26, 0.2);
  cursor: pointer;
  border-radius: 6px;
  transition:
    color 180ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 180ms cubic-bezier(0.32, 0.72, 0, 1);
}

.product-review-stars-input__btn:hover {
  transform: translateY(-1px) scale(1.06);
}

.product-review-stars-input__btn:focus-visible {
  outline: 2px solid var(--colors-100);
  outline-offset: 2px;
}

.product-review-stars-input__btn--on {
  color: var(--colors-300);
}

.product-review-form__label-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.product-review-form__label-span {
  font-family: "Manrope-SemiBold", Helvetica, system-ui, sans-serif;
  font-size: 14px;
  color: var(--neutral-200);
}

.product-review-form__textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(26, 26, 26, 0.12);
  font-family: "Manrope-SemiBold", Helvetica, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--neutral-200);
  background: var(--neutral-100);
  resize: vertical;
  min-height: 100px;
}

.product-review-form__input {
  min-height: 0;
  resize: none;
}

.product-review-form__textarea::placeholder {
  color: rgba(26, 26, 26, 0.35);
}

.product-review-form__textarea:focus {
  outline: none;
  border-color: rgba(26, 26, 26, 0.28);
}

.product-review-form__submit {
  padding: 12px 22px;
  border: none;
  border-radius: 10px;
  font-family: "Manrope-SemiBold", Helvetica, system-ui, sans-serif;
  font-size: 15px;
  cursor: pointer;
  background: var(--neutral-200);
  color: var(--neutral-100);
}

.product-review-form__submit:hover {
  opacity: 0.92;
}

.product-review-form__submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.product-review-form__error {
  margin: 12px 0 0;
  font-family: "Manrope-SemiBold", Helvetica, system-ui, sans-serif;
  font-size: 14px;
  color: #b00020;
}

.product-reviews__heading {
  margin: 0 0 16px;
  font-family: "Manrope-Bold", Helvetica, system-ui, sans-serif;
  font-size: 17px;
  color: var(--neutral-200);
}

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

.product-review-card {
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid rgba(26, 26, 26, 0.1);
  background: var(--neutral-100);
  box-sizing: border-box;
}

.product-review-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 6px;
}

.product-review-card__author {
  font-family: "Manrope-Bold", Helvetica, system-ui, sans-serif;
  font-size: 15px;
  color: var(--neutral-200);
}

.product-review-card__stars {
  display: inline-flex;
  gap: 2px;
  font-size: 15px;
  line-height: 1;
}

.product-review-card__star {
  color: rgba(26, 26, 26, 0.18);
}

.product-review-card__star--on {
  color: #c9a227;
}

.product-review-card__date {
  display: block;
  margin-bottom: 10px;
  font-family: "Manrope-SemiBold", Helvetica, system-ui, sans-serif;
  font-size: 12px;
  color: rgba(26, 26, 26, 0.45);
}

.product-review-card__text {
  margin: 0;
  font-family: "Manrope-SemiBold", Helvetica, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--neutral-200);
  white-space: pre-wrap;
  word-break: break-word;
}

.product-reviews__empty {
  margin: 0;
  font-family: "Manrope-SemiBold", Helvetica, system-ui, sans-serif;
  font-size: 14px;
  color: rgba(26, 26, 26, 0.5);
}

/* Два промо-баннера-картинки как на главной, над «Похожие продукты». */
.product-page__promo {
  margin: 0 0 48px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Шапка блока как на главной: .shelf-section__header + .section-header (style.css) */
.page .product-page__similar[hidden] {
  display: none;
}

.product-page__similar .section-header__title {
  margin: 0;
}

.product-page__similar-track {
  width: 100%;
  margin-top: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.product-page__similar-track::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.product-page__similar-track .product-page__similar-grid.catalog-products {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
  align-items: stretch;
  justify-items: stretch;
}

@media (max-width: 900px) {
  .product-page {
    padding: 12px 16px 40px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .product-main {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .product-page__breadcrumb {
    margin-bottom: 12px;
  }

  .product-page__breadcrumb-track {
    font-size: 13px;
    gap: 6px 8px;
  }

  .product-page__state {
    padding: 24px 4px;
    font-size: 15px;
  }

  .product-page__hero {
    gap: 12px;
    margin-bottom: 28px;
  }

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

  .product-page__hero-media {
    flex: none;
    width: 100%;
    max-width: 100%;
  }

  .product-page__figure {
    border-radius: 16px;
  }

  .product-page__favorite {
    width: 40px;
    height: 40px;
    top: 10px;
    right: 10px;
  }

  .product-page__favorite-icon {
    font-size: 20px;
  }

  .product-page__badges {
    top: 10px;
    left: 10px;
    gap: 6px;
  }

  .product-page__badge {
    padding: 5px 10px;
    font-size: 10px;
  }

  .product-page__thumbs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    margin-top: 10px;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }

  .product-page__thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
  }

  .product-page__panel {
    padding: 18px 16px 22px;
    border-radius: 18px;
    gap: 14px;
    min-height: unset !important;
    max-height: none !important;
    overflow-y: visible !important;
  }

  .product-page__panel-title {
    font-size: 17px;
    -webkit-line-clamp: 5;
    line-clamp: 5;
  }

  .product-page__meta {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px 16px;
  }

  .product-page__sku {
    font-size: 14px;
  }

  .product-page__rating {
    width: 100%;
    justify-content: flex-start;
  }

  .product-page__rating-row {
    flex-wrap: wrap;
    white-space: normal;
    gap: 8px;
  }

  .product-page__rating-caption {
    white-space: normal;
    font-size: 15px;
  }

  .product-page__prices-row:not(.product-page__prices-row--guest) {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .product-page__price-box {
    padding: 14px 16px;
    border-radius: 14px;
  }

  .product-page__price-val {
    font-size: 19px;
  }

  .product-page__hint-line {
    padding: 10px 14px;
    font-size: 13px;
  }

  .product-page__panel-footer {
    gap: 14px;
  }

  .product-page__stock-text {
    font-size: 14px;
  }

  .product-page__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .product-page__actions .catalog-product-card__qty {
    width: 100%;
    justify-content: center;
    max-width: 100%;
  }

  .product-page__cart.catalog-product-card__cart {
    width: 100%;
    min-height: 48px;
    height: auto;
    padding: 12px 18px;
    justify-content: center;
  }

  .product-page__details {
    margin-bottom: 32px;
  }

  .product-page__tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 6px;
    margin-bottom: 14px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .product-page__tabs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .product-page__tab {
    flex: 0 0 auto;
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 10px 10px 0 0;
  }

  .product-page__panel-block {
    padding: 4px 0 18px;
  }

  .product-page__description {
    font-size: 14px;
    line-height: 1.55;
  }

  .product-reviews {
    gap: 22px;
  }

  .product-review-form {
    padding: 16px 14px;
    border-radius: 14px;
  }

  .product-review-form__title {
    font-size: 16px;
  }

  .product-reviews__heading {
    font-size: 16px;
  }

  .product-page__promo.promo-row {
    flex-direction: column;
  }

  .product-page__promo {
    margin-bottom: 32px;
  }

  .product-page__similar .shelf-section__header {
    margin-bottom: 4px;
  }

  .product-page__similar .section-header__actions .button {
    display: none;
  }

  .product-page__similar-track {
    container-type: inline-size;
    container-name: product-similar;
    scroll-snap-type: x mandatory;
  }

  .product-page__similar-track .product-page__similar-grid.catalog-products {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0;
    width: max-content;
    min-width: 100%;
  }

  .product-page__similar-track .product-page__similar-grid.catalog-products > .catalog-product-card {
    flex: 0 0 100cqw;
    width: 100cqw;
    max-width: 100cqw;
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .product-page__similar-track .catalog-product-card__qty {
    display: none !important;
  }

  .product-page__similar-track .catalog-product-card {
    padding: 12px;
    border-radius: 14px;
  }

  .product-page__similar-track .catalog-product-card__cart {
    min-height: 44px;
    width: 100%;
  }
}

@media (min-width: 901px) and (max-width: 1024px) {
  .product-page__hero-main {
    flex-direction: column;
    align-items: stretch;
  }

  .product-page__hero-media {
    flex: none;
    width: 100%;
    max-width: 100%;
  }

  .product-page__panel {
    min-height: unset !important;
    max-height: none !important;
    overflow-y: visible !important;
  }
}

/* —— Product lightbox / full gallery —— */
body.product-lightbox-open {
  overflow: hidden;
}

.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.product-lightbox[hidden] {
  display: none !important;
}

.product-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 14, 0.88);
  border: none;
  cursor: pointer;
}

.product-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  height: min(92vh, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
}

.product-lightbox__dialog > * {
  pointer-events: auto;
}

.product-lightbox__close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.product-lightbox__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.product-lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-lightbox__nav[hidden] {
  display: none !important;
}

.product-lightbox__nav--prev {
  left: 0;
}

.product-lightbox__nav--next {
  right: 0;
}

.product-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.24);
}

.product-lightbox__nav:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.product-lightbox__stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  max-height: calc(92vh - 120px);
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
  cursor: zoom-in;
  touch-action: pan-y;
}

.product-lightbox__stage--zoomed {
  cursor: grab;
}

.product-lightbox__stage--zoomed:active {
  cursor: grabbing;
}

.product-lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  transition: transform 0.12s ease-out;
}

.product-lightbox__stage--zoomed .product-lightbox__img {
  transition: none;
}

.product-lightbox__hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-family: "Manrope-Medium", Helvetica, sans-serif;
  font-size: 13px;
  text-align: center;
}

.product-lightbox__counter {
  margin: 0;
  color: #fff;
  font-family: "Manrope-SemiBold", Helvetica, sans-serif;
  font-size: 14px;
}

.product-lightbox__thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding: 4px 2px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.product-lightbox__thumbs[hidden] {
  display: none !important;
}

.product-lightbox__thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.product-lightbox__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
}

.product-lightbox__thumb--active {
  border-color: #fff;
}

@media (max-width: 900px) {
  .product-page__gallery-nav {
    opacity: 1;
    width: 36px;
    height: 36px;
    font-size: 24px;
  }

  .product-page__gallery-zoom {
    opacity: 1;
    padding: 7px 10px;
    font-size: 11px;
  }

  .product-page__gallery-zoom-text {
    display: none;
  }

  .product-lightbox {
    padding: 12px;
  }

  .product-lightbox__nav {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }

  .product-lightbox__nav--prev {
    left: 4px;
  }

  .product-lightbox__nav--next {
    right: 4px;
  }

  .product-lightbox__hint {
    font-size: 12px;
  }
}

