/* First-screen geometry mirrors the product hero components before their chunks arrive. */
.product-detail-page__hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-detail-page__title {
  font-family: "ROOFTOP", var(--default-font, inherit);
  font-weight: 450;
  font-size: 32px;
  line-height: 1.25;
  color: var(--color-text-primary);
  margin: 0;
}

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

.product-detail-page__hero .product-detail-page__actions.product-detail-page__actions--mobile {
  display: none;
}

.product-detail-page__hero-grid {
  display: grid;
  column-gap: 48px;
  align-items: start;
  grid-template-areas: 'gallery middle right';
  grid-template-columns: minmax(0, 1fr) 382px 383px;
  margin-top: 8px;
}

.product-detail-page__hero-gallery {
  grid-area: gallery;
}

.product-detail-page__hero-middle,
.product-detail-page__hero-right {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.product-detail-page__hero-middle {
  grid-area: middle;

  @media screen and (width >= 1024px) {
    top: 200px;
    position: sticky;
  }
}

.product-detail-page__hero-right {
  grid-area: right;

  @media screen and (width >= 1024px) {
    top: 200px;
    position: sticky;
  }
}

.product-detail-page__hero-colors {
  grid-area: colors;
}

.product-detail-page__hero-buy {
  grid-area: buy;
}

.product-detail-page__hero-specs {
  grid-area: specs;
}

.product-detail-page__hero-info {
  grid-area: info;
}

@media (width <= 1499px) {
  .product-detail-page__hero-grid {
    grid-template-columns: minmax(0, 1fr) 300px 350px;
  }
}

@media (width <= 1023px) {
  .product-detail-page__hero-grid {
    grid-template-areas:
      'gallery colors'
      'gallery buy'
      'specs   info';
    grid-template-columns: minmax(0, 1fr) minmax(280px, 344px);
    gap: 24px;
  }

  .product-detail-page__hero-middle,
  .product-detail-page__hero-right {
    display: contents;
  }
}

@media (width <= 767px) {
  .product-detail-page__hero .product-detail-page__actions.product-detail-page__actions--desktop {
    display: none;
  }

  .product-detail-page__title {
    font-size: 26px;
  }

  .product-detail-page__hero .product-detail-page__actions.product-detail-page__actions--mobile {
    top: 8px;
    right: 8px;
    position: absolute;
    display: flex;
    z-index: 2;
  }

  .product-detail-page__hero-grid {
    grid-template-areas:
      'gallery'
      'colors'
      'buy'
      'specs'
      'info';
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

.product-detail-page {
  color: var(--color-text-primary);
  background: var(--hiberg-bg-content, #161616);
  padding: 12px 0 96px;
  overflow-x: clip;
}

.product-detail-page__container {
  max-width: 1760px;
  display: flex;
  flex-direction: column;
  padding: 0 40px;
  margin: 0 auto;
  gap: 32px;
}

@media (width <= 1023px) {
  .product-detail-page__container {
    padding: 0 32px;
  }
}

@media (width <= 767px) {
  .product-detail-page__container {
    padding: 0 16px;
  }
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumbs__item {
  display: flex;
  align-items: center;
}

.breadcrumbs__link,
.breadcrumbs__current {
  font-family: "Manrope", var(--default-font, inherit);
  font-size: 13px;
  line-height: 20px;
}

.breadcrumbs__link {
  text-decoration: none;
  color: var(--text-tertiary, #8f8f8f);
}

.breadcrumbs__link:hover {
  color: var(--color-text-primary);
}

.breadcrumbs__current {
  color: var(--color-text-primary);
}

.breadcrumbs__sep {
  color: var(--text-tertiary, #8f8f8f);
  margin: 0 8px;
}

.gallery-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gallery-block__main {
  width: 100%;
  min-width: 0;
  position: relative;
  border-radius: 16px;
  background: var(--hiberg-bg-content);
  overflow: hidden;
  aspect-ratio: 620 / 520;
}

.gallery-block__slide {
  width: 100%;
  height: 100%;
}

.gallery-block__image {
  width: 100%;
  height: 100%;
  display: block;
  box-sizing: border-box;
  object-fit: contain;
  cursor: zoom-in;
  padding: 24px;
}

.gallery-block__thumbs {
  width: 100%;
}

.gallery-block__thumb {
  width: 88px !important;
  height: 88px !important;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--hiberg-bg-content);
  cursor: pointer;
  overflow: hidden;
}

.gallery-block__thumb--active {
  border-color: var(--hiberg-brand, #049346);
}

.gallery-block__thumb img {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: contain;
}

.gallery-block__dots {
  min-height: 6px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.gallery-block__dot {
  width: 6px;
  height: 6px;
  border: 0;
  border-radius: 50%;
  background: var(--color-text-tertiary);
  cursor: pointer;
  padding: 0;
}

.gallery-block__dot--active {
  background: var(--color-text-primary);
}

@media (width <= 1023px) {
  .gallery-block__thumbs {
    display: none !important;
  }

  .gallery-block__dots {
    display: flex;
  }
}

.pswp .pswp__img {
  background: transparent;
}

.gallery-block__pswp-zoom-icon {
  display: block;
  font-weight: 600;
  font-size: 22px;
  line-height: 1;
  color: var(--color-text-primary);
}

.gallery-block__thumbs-btns {
  position: relative;
  margin-top: 20px;
  margin-bottom: -60px;

  .swiper-button-prev,
  .swiper-button-next {
    outline: none;
    border: none;
    color: var(--color-neutral-300);
    background: transparent;
    user-select: none;

    &::after {
      font-size: 20px;
    }

    svg {
      display: none;
    }
  }

  .swiper-button-next {
    right: -40px;
  }

  .swiper-button-prev {
    left: -40px;
  }
}

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

.product-color-picker__label {
  font-family: "Manrope", var(--default-font, inherit);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-text-primary);
}

.product-color-picker__swatches {
  display: flex;
  gap: 10px;
}

.product-color-picker__swatch {
  width: 36px;
  height: 36px;
  display: flex;
  border: 2px solid transparent;
  border-radius: 12px;
  box-sizing: border-box;
  background: transparent;
  transition: 0.3s;
  cursor: pointer;
  padding: 4px;
}

.product-color-picker__swatch:hover,
.product-color-picker__swatch--active {
  border-color: var(--hiberg-brand, #049346);
}

.product-color-picker__swatch-chip {
  width: 100%;
  height: 100%;
  display: block;
  border: 1px solid var(--color-border-default, #4a4a47);
  border-radius: 6px;
}

.product-buy-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-buy-card__buy {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: var(--color-background-card);
  padding: 20px;
  gap: 8px;
}

.product-buy-card__prices {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.product-buy-card__price {
  font-family: "ROOFTOP", var(--default-font, inherit);
  font-size: 28px;
  line-height: 34px;
  color: var(--hiberg-brand, #049346);
}

.product-buy-card__old-price {
  font-family: "Manrope", var(--default-font, inherit);
  font-size: 16px;
  color: var(--text-tertiary, #8f8f8f);
}

.product-buy-card__buy-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.product-buy-card__buy-button.base-button {
  height: 48px;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  font-family: "Manrope", var(--default-font, inherit);
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text-primary);
  background: var(--hiberg-brand, #049346);
  transition: 0.3s;
  cursor: pointer;

  &:not(:disabled):hover {
    background: var(--color-action-primary-hover);
  }

  &:disabled {
    color: var(--color-action-primary-foreground-disabled, #858580);
    background: var(--color-action-primary-disabled, #4a4a47);
    cursor: default;
  }
}

.product-buy-card__buy-button--active.base-button:hover {
  color: var(--hiberg-brand);
  background: transparent;
}

.product-buy-card__buy-button--active.base-button {
  background: var(--color-background-card);
}

.product-buy-card__availability {
  font-family: "Manrope", var(--default-font, inherit);
  font-size: 13px;
  color: var(--hiberg-brand, #049346);
  margin: 0;
}

.product-buy-card__availability--unavailable {
  color: var(--color-text-tertiary, #858580);
}

.product-buy-card__mobile-view {
  position: fixed;
  border-top: 1px solid var(--color-border-subtle);
  background: var(--hiberg-bg);
  z-index: 100000;
  inset: auto 0 72px;

  .product-buy-card__buy {
    flex-direction: row;
    justify-content: space-between;
    background: var(--hiberg-bg);
  }

  .product-buy-card__buy-button {
    padding: 16px 18px;
  }
}

.product-specs-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-specs-card__title {
  font-family: var(--default-font, inherit);
  font-weight: 400;
  font-size: 16px;
  color: var(--color-text-primary);
  margin: 0 0 8px;
}

.product-specs-card__link {
  width: fit-content;
  border: none;
  font-family: "Manrope", var(--default-font, inherit);
  font-size: 13px;
  text-decoration: underline;
  color: var(--hiberg-brand, #049346);
  background: transparent;
  transition: 0.3s;
  cursor: pointer;
  margin-top: 8px;
  text-underline-offset: 2px;

  &:hover {
    color: var(--brand-green-hover);
  }
}

.tech-card {
  display: flex;
  align-items: baseline;
  padding: 6px 0;
  gap: 8px;
}

.tech-card__label {
  flex: 0 1 auto;
  font-family: "Manrope", var(--default-font, inherit);
  font-size: 13px;
  line-height: 18px;
  white-space: normal;
  color: var(--text-tertiary, #8f8f8f);
}

.tech-card__dots {
  height: 1px;
  flex: 1 1 auto;
  border-bottom: 1px dashed var(--color-border-default);
  margin-bottom: 4px;
}

.tech-card__value {
  max-width: 60%;
  flex: 0 1 auto;
  font-family: "Manrope", var(--default-font, inherit);
  font-size: 13px;
  line-height: 18px;
  text-align: right;
  color: var(--color-text-primary);
}

.product-info-panel {
  width: 645px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  gap: 20px;
}

.product-info-panel__delivery,
.product-info-panel__benefits {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-info-panel__divider {
  height: 1px;
  background: var(--color-border-subtle, #4a4a47);
}

.product-info-panel__block-title {
  font-family: var(--default-font, inherit);
  font-weight: 400;
  font-size: 16px;
  color: var(--color-text-primary);
  margin: 0 0 8px;
}

.product-info-panel__delivery-term {
  font-family: "Manrope", var(--default-font, inherit);
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text-primary);
  margin: 0;
}

.product-info-panel__benefit-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 4px;
  gap: 10px;
}

.product-info-panel__badges {
  display: flex;
  margin-top: 8px;
  gap: 8px;
}

.product-info-panel__marketplaces {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  line-height: 0;
  gap: 24px;
}

.product-info-panel__marketplace-link {
  width: 53px;
  height: 53px;
  display: inline-flex;
  flex: 0 0 53px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.product-info-panel__marketplace-link:focus-visible {
  outline: 2px solid var(--color-border-focus, #69ba91);
  outline-offset: 3px;
}

.product-info-panel__marketplace-logo {
  width: 53px;
  height: 53px;
  display: block;
  object-fit: contain;
  filter: grayscale(1);
  transition: opacity 0.2s ease;
  opacity: 0.5;
}

.product-info-panel__marketplace-link:hover .product-info-panel__marketplace-logo,
.product-info-panel__marketplace-link:focus-visible .product-info-panel__marketplace-logo {
  opacity: 0.8;
}

@media (width <= 767px) {
  .product-info-panel {
    width: 100%;
  }
}

.benefit-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.benefit-card__icon {
  display: inline-flex;
  flex: 0 0 20px;
  color: var(--hiberg-brand, #049346);
}

.benefit-card__text {
  font-family: "Manrope", var(--default-font, inherit);
  font-size: 13px;
  line-height: 18px;
  color: var(--color-text-primary);
}

.document-card {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  font-family: "Manrope", var(--default-font, inherit);
  font-size: 11px;
  line-height: 1;
  text-decoration: none;
  color: var(--color-neutral-300);
  background: var(--color-background-card);
  transition: color 0.2s ease;
  padding: 8px 10px;
  gap: 6px;
}

.document-card:hover {
  color: var(--color-text-primary);
}

.document-card__icon {
  display: inline-flex;
  color: inherit;
}

.guarantee-card {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  font-family: "Manrope", var(--default-font, inherit);
  font-size: 11px;
  line-height: 1;
  color: var(--color-neutral-300);
  background: var(--color-background-card);
  padding: 8px 10px;
  gap: 6px;
}

.guarantee-card__icon {
  display: inline-flex;
  color: var(--hiberg-brand, #049346);
}

.rating-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rating-group__stars {
  font-family: "Manrope", var(--default-font, inherit);
  font-size: 14px;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--hiberg-brand, #049346);
}

.rating-group__value {
  font-family: "Manrope", var(--default-font, inherit);
  font-weight: 600;
  font-size: 12px;
  line-height: 1;
  color: var(--color-text-primary);
}

.rating-group__reviews {
  font-family: "Manrope", var(--default-font, inherit);
  font-size: 12px;
  line-height: 1;
  text-decoration: underline;
  color: var(--text-tertiary, #8f8f8f);
  text-underline-offset: 2px;
}

.rating-group__reviews:hover {
  color: var(--color-text-primary);
}

.product-action-buttons {
  display: flex;
  align-items: center;
  gap: 20px;
}

.product-action-buttons__button {
  display: inline-flex;
  align-items: center;
  border: 0;
  font-family: "Manrope", var(--default-font, inherit);
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  color: var(--color-neutral-300);
  background: transparent;
  transition: color 0.2s ease;
  cursor: pointer;
  padding: 0;
  gap: 10px;

  svg {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
  }

  path {
    stroke: currentcolor;
  }

  &:focus-visible {
    outline: 2px solid var(--hiberg-brand, #049346);
    outline-offset: 4px;
  }

  &:disabled {
    cursor: default;
    opacity: 0.6;
  }
}

.product-action-buttons__button--active {
  color: var(--hiberg-brand, #049346);
}

.product-action-buttons__button--favorite.product-action-buttons__button--active path {
  fill: currentcolor;
}

@media (1025px <= width <= 1499px) {
  .product-action-buttons {
    gap: 32px;
  }
}

@media (768px <= width <= 1024px) {
  .product-action-buttons {
    gap: 16px;
  }

  .product-action-buttons__button {
    font-size: 12px;
    line-height: 18px;
    gap: 8px;

    svg {
      width: 20px;
      height: 20px;
      flex-basis: 20px;
    }
  }
}

.product-action-buttons--compact {
  gap: 16px;

  .product-action-buttons__button svg {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }
}

[data-product-fallback] .base-button--size-l {
  min-height: 64px;
  box-sizing: border-box;
  line-height: 1;
  padding: 0 28px;
}

[data-product-fallback] .product-detail-page__actions--desktop {
  min-height: 24px;
}

[data-product-fallback] .benefit-card__icon {
  height: 20px;
}

[data-product-fallback] .document-card__icon,
[data-product-fallback] .guarantee-card__icon {
  width: 18px;
  height: 18px;
  align-items: center;
}

.product-detail-page__fallback-thumbs {
  display: flex;
  overflow: hidden;
  gap: 12px;
}

.product-detail-page__fallback-thumbs .gallery-block__thumb {
  flex: 0 0 88px;
}

.product-detail-page__deferred-specs:not([data-vue-mounted="true"]) {
  min-height: 600px;
}

.product-detail-page__deferred-specs,
.product-detail-page__deferred-reviews {
  scroll-margin-top: 150px;
}

.product-detail-page__deferred-reviews:not(:has(> [data-vue-mounted="true"])) {
  min-height: 520px;
}

.product-detail-page__deferred-hits:not([data-vue-mounted="true"]) {
  min-height: 640px;
}

.product-detail-page__rich-content > [data-vue-island]:not([data-vue-mounted="true"]) {
  min-height: 480px;
}

.product-detail-page__section-fallback {
  padding: 48px 0;
}

@media (width <= 1023px) {
  [data-product-fallback] .gallery-block__thumbs-btns {
    display: none;
  }

  [data-product-fallback] .product-detail-page__actions--desktop {
    min-height: 20px;
  }
}
