.product-page {
  min-width: 20rem;
}

.product-main {
  padding-top: 1.5rem;
}

.product-page-section {
  padding-bottom: 0;
}

.product-page-section__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.product-detail {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.product-gallery,
.product-info {
  flex: 1 1 46.25rem;
  max-width: calc((100% - 1.25rem) / 2);
  min-width: 0;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.product-gallery__main-wrap {
  position: relative;
  background: var(--color-bg-soft);
  min-height: 46.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  overflow: hidden;
}

.product-gallery__main-image {
  width: 100%;
  max-width: 25.25rem;
  max-height: 38rem;
  object-fit: contain;
}

.product-gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-round);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(13, 13, 13, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast), opacity var(--transition-fast);
}

.product-gallery__arrow span {
  width: 0.625rem;
  height: 0.625rem;
  border-right: 1px solid var(--color-text);
  border-bottom: 1px solid var(--color-text);
  transform: rotate(-45deg);
  margin-left: -0.125rem;
}

.product-gallery__arrow--prev {
  left: 1rem;
}

.product-gallery__arrow--prev span {
  transform: rotate(135deg);
  margin-left: 0.125rem;
}

.product-gallery__arrow--next {
  right: 1rem;
}

.product-gallery__thumbs {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0.625rem;
}

.product-gallery__thumb {
  width: 5.75rem;
  height: 4.875rem;
  flex: 0 0 5.75rem;
  background: var(--color-bg-soft);
  border: 1px solid transparent;
  min-height: 4.875rem;
  padding: 0.375rem 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition-fast), opacity var(--transition-fast);
}

.product-gallery__thumb img {
  max-width: 4.25rem;
  max-height: 4rem;
  object-fit: contain;
}

.product-gallery__thumb.is-active {
  border-color: var(--color-brand);
}

.product-info {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.product-info__title {
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  font-family: var(--font-body);
  font-size: 2.625rem;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.025rem;
  text-transform: none;
  text-align: left;
}

.product-info__article {
  margin-top: 0.75rem;
  color: #909090;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: -0.04rem;
}

.product-info__price {
  margin-top: 1.5rem;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04rem;
  text-transform: uppercase;
}

.product-sizes {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-sizes__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.product-sizes__label {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04rem;
}

.product-sizes__guide {
  flex-shrink: 0;
  font-size: 1rem;
}

.product-sizes__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}


/* Скрываем нативный чекбокс */
.size-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.size-option label {
  width: 4.1875rem;
  min-width: 4.1875rem;
  height: 2.875rem;
  border: 1px solid transparent;
  background: var(--color-bg-soft);
  padding: 0 0.5rem;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: -0.04rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition-fast), color var(--transition-fast), opacity var(--transition-fast);
  cursor: pointer;
}
.form-group-error .size-option label {
  border-color: #e3b9b4;
}
.size-option label:hover {
  border-color: #c8d3e2;
}

/* Выбранное состояние */
.size-option input:checked + label {
  border-color: #c8d3e2;
}

/* Недоступный размер */
.size-option.disabled label {
  color: #b4b4b4;
  background: #efefef;
  border-color: transparent;
  opacity: 1;
  cursor: default;
}

.product-sizes__item {
  width: 4.1875rem;
  min-width: 4.1875rem;
  height: 2.875rem;
  border: 1px solid transparent;
  background: var(--color-bg-soft);
  padding: 0 0.5rem;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: -0.04rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition-fast), color var(--transition-fast), opacity var(--transition-fast);
}

.product-sizes__item:hover {
  border-color: #c8d3e2;
}

.product-sizes__item--disabled,
.product-sizes__item:disabled {
  color: #b4b4b4;
  background: #efefef;
  border-color: transparent;
  opacity: 1;
  cursor: default;
}

.product-info__cta {
  margin-top: 1.5rem;
  width: 22.75rem;
  max-width: 100%;
  height: 3.5rem;
  background: var(--color-brand);
  color: var(--color-white);
  text-transform: uppercase;
}

.product-info__cta:hover,
.product-gallery__arrow:hover,
.product-gallery__thumb:hover {
  opacity: 0.82;
}

.product-accordion {
  margin-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.product-accordion__item {
  border-bottom: 1px solid var(--color-border);
}

.product-accordion__toggle {
  width: 100%;
  min-height: 3.5rem;
  padding: 0.875rem 0;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.025rem;
}

.product-accordion__icon {
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.product-accordion__icon::before,
.product-accordion__icon::after {
  content: "";
  position: absolute;
  left: 0.3125rem;
  right: 0.3125rem;
  top: 0.7188rem;
  height: 1px;
  background: currentColor;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.product-accordion__icon::after {
  transform: rotate(90deg);
}

.product-accordion__toggle[aria-expanded="true"] .product-accordion__icon::after {
  opacity: 0;
}

.product-accordion__content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.26s ease;
}

.product-accordion__content p {
  padding: 0 0 0.75rem;
  max-width: 40rem;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: -0.02rem;
}

.product-accordion__content p:last-child {
  padding-bottom: 1.125rem;
}

.product-related {
  padding-top: 7.5rem;
  padding-bottom: 0;
}

.product-related__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.product-related__title {
  margin: 0;
}

.product-related .popular__grid .product-card {
  position: relative;
}

.product-related .product-card__image-wrap {
  position: relative;
}

@media (max-width: 1439.98px) {
  .product-gallery__main-wrap {
    min-height: 38rem;
    padding: 2rem;
  }

  .product-gallery__main-image {
    max-height: 31rem;
  }

  .product-info__title {
    font-size: 2.5rem;
    letter-spacing: -0.025rem;
  }
}

@media (max-width: 1199.98px) {
  .product-main {
    padding-top: 1.25rem;
  }

  .product-page-section__inner {
    gap: 1.25rem;
  }

  .product-info__title {
    font-size: 2.625rem;
    letter-spacing: -0.025rem;
  }

  .product-info__price {
    margin-top: 1.25rem;
    font-size: 1.75rem;
  }

  .product-sizes {
    margin-top: 1.5rem;
  }

  .product-gallery__main-wrap {
    min-height: 34.5rem;
    padding: 1.5rem;
  }

  .product-gallery__main-image {
    max-width: 21.5rem;
    max-height: 28rem;
  }

  .product-related {
    padding-top: 6.25rem;
  }
}

@media (max-width: 991.98px) {
  .product-main {
    padding-top: 1rem;
  }

  .product-page-section__inner {
    gap: 1.25rem;
  }

  .product-detail {
    flex-direction: column;
    gap: 1.5rem;
  }

  .product-gallery,
  .product-info {
    flex: none;
    max-width: 100%;
    width: 100%;
  }

  .product-gallery__main-wrap {
    min-height: 32rem;
  }

  .product-info__title {
    font-size: 2.625rem;
    letter-spacing: -0.025rem;
  }

  .product-info__article {
    margin-top: 0.5rem;
  }

  .product-info__price {
    margin-top: 1rem;
  }

  .product-sizes {
    margin-top: 1.25rem;
  }

  .product-info__cta {
    margin-top: 1.25rem;
    width: 100%;
  }

  .product-accordion {
    margin-top: 1.25rem;
  }

  .product-related {
    padding-top: 5rem;
  }

  .product-related__inner {
    gap: 1.875rem;
  }
}

@media (max-width: 767.98px) {
  .product-page-section__inner {
    gap: 1rem;
  }

  .product-gallery {
    gap: 0.5rem;
  }

  .product-gallery__main-wrap {
    min-height: 25rem;
    padding: 1.25rem;
  }

  .product-gallery__main-image {
    max-height: 22rem;
  }

  .product-info__title {
    font-size: 2.125rem;
    letter-spacing: -0.01875rem;
  }

  .product-info__price {
    font-size: 1.5rem;
  }

  .product-sizes__item {
    height: 3.625rem;
    min-height: 3.625rem;
  }

  .product-info__cta {
    min-height: 3.625rem;
    height: 3.625rem;
  }

  .product-accordion__toggle {
    min-height: 3.25rem;
    padding: 0.75rem 0;
    font-size: 1.25rem;
    letter-spacing: -0.025rem;
  }

  .product-accordion__content p {
    font-size: 0.875rem;
    line-height: 1.3;
    letter-spacing: -0.02rem;
    padding-bottom: 0.625rem;
  }

  .product-accordion__content p:last-child {
    padding-bottom: 1rem;
  }

  .product-related {
    padding-top: 4rem;
  }

  .product-related__inner {
    gap: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .product-gallery__main-wrap {
    min-height: 20rem;
    padding: 1rem;
  }

  .product-gallery__arrow {
    width: 2.5rem;
    height: 2.5rem;
  }

  .product-gallery__arrow--prev {
    left: 0.5rem;
  }

  .product-gallery__arrow--next {
    right: 0.5rem;
  }

  .product-info__title {
    font-size: 1.875rem;
    letter-spacing: -0.0125rem;
  }

  .product-sizes__head {
    align-items: flex-end;
  }

  .product-sizes__list {
    display: grid;
    grid-template-columns: repeat(4, 4.1875rem);
    justify-content: flex-start;
    gap: 0.375rem;
  }

  .product-sizes__item {
    width: 4.1875rem;
    min-width: 4.1875rem;
  }
}

@media (min-width: 480px) and (max-width: 575.98px) {
  .product-sizes__list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
  }

  .product-sizes__item {
    width: 100%;
    min-width: 0;
    height: 3.625rem;
    min-height: 3.625rem;
  }

  .product-info__cta {
    min-height: 3.625rem;
    height: 3.625rem;
  }
}

@media (max-width: 479.98px) {
  .product-page .container {
    max-width: 100%;
    padding-inline: 1rem;
  }

  .product-main {
    padding-top: 0.625rem;
  }

  .product-page-section__inner {
    gap: 1.25rem;
  }

  .product-detail {
    gap: 1.25rem;
  }

  .product-gallery {
    gap: 0.375rem;
  }

  .product-gallery__main-wrap {
    min-height: 20.5rem;
    padding: 1rem 0.75rem;
  }

  .product-gallery__main-image {
    max-width: 11.25rem;
    max-height: 18rem;
  }

  .product-gallery__thumbs {
    gap: 0.375rem;
  }

  .product-gallery__thumb {
    width: 5rem;
    height: 4.25rem;
    flex-basis: 5rem;
    min-height: 4.25rem;
    padding: 0.375rem;
  }

  .product-gallery__thumb img {
    max-width: 3.625rem;
    max-height: 3.375rem;
  }

  .product-info__title {
    overflow-wrap: normal;
    word-break: normal;
    font-size: 1.625rem;
    line-height: 1.1;
    letter-spacing: -0.0125rem;
  }

  .product-info__article {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    letter-spacing: -0.0263rem;
  }

  .product-info__price {
    margin-top: 0.875rem;
    font-size: 1.5rem;
    letter-spacing: -0.03rem;
  }

  .product-sizes {
    margin-top: 1rem;
    gap: 0.5rem;
  }

  .product-sizes__label,
  .product-sizes__guide,
  .product-sizes__item {
    font-size: 0.875rem;
    letter-spacing: -0.0263rem;
  }

  .product-sizes__item {
    width: 4.1875rem;
    min-width: 4.1875rem;
    height: 3rem;
    min-height: 3rem;
  }

  .product-info__cta {
    margin-top: 1rem;
    min-height: 3rem;
    height: 3rem;
    font-size: 0.875rem;
    letter-spacing: -0.03rem;
  }

  .product-accordion {
    margin-top: 1rem;
  }

  .product-accordion__toggle {
    min-height: 3rem;
    padding: 0.625rem 0;
    font-size: 1.125rem;
    letter-spacing: -0.0125rem;
  }

  .product-accordion__content p {
    padding-bottom: 0.5rem;
  }

  .product-accordion__content p:last-child {
    padding-bottom: 0.875rem;
  }

  .product-related {
    padding-top: 3.25rem;
  }

  .product-related__inner {
    gap: 1.25rem;
  }

  .product-related .slider-controls {
    gap: 0.75rem;
  }

}

@media (min-width: 400px) and (max-width: 479.98px) {
  .product-info__title {
    font-size: 1.375rem;
    line-height: 1.15;
  }
}
