/* FIRESTRIKE v77: middle-column-driven product grid and live-safe reviews. */

body[data-theme-template="product"] .fs-marketplace-reviews__expand-v77 {
  display: none;
}

body[data-theme-template="product"] [data-fs-v77-trust-source="true"] {
  display: none !important;
}

body[data-theme-template="product"] .product__area-calculate-delivery[data-fs-v77-empty-delivery="true"] {
  display: none !important;
  min-height: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

@media (min-width: 1025px) {
  body[data-theme-template="product"] #dp5-1 .product[data-fs-v77-grid-managed="true"],
  body[data-theme-template="product"] .product[data-fs-v77-grid-managed="true"] {
    box-sizing: border-box !important;
    height: var(--fs-v77-product-height, auto) !important;
    min-height: 0 !important;
    max-height: none !important;
    grid-template-rows: max-content max-content max-content max-content max-content max-content 0 !important;
    align-items: start !important;
  }

  body[data-theme-template="product"] .product[data-fs-v77-grid-managed="true"] .product__area-photo,
  body[data-theme-template="product"] .product[data-fs-v77-grid-managed="true"] .product__area-variants-bundle,
  body[data-theme-template="product"] .product[data-fs-v77-grid-managed="true"] .product__area-buy,
  body[data-theme-template="product"] .product[data-fs-v77-grid-managed="true"] .product__area-calculate-delivery {
    align-self: start !important;
    min-height: 0 !important;
  }

  body[data-theme-template="product"] .fs-marketplace-reviews[data-fs-v77-review-height-managed="true"] {
    position: relative !important;
    box-sizing: border-box !important;
    height: var(--fs-v77-reviews-target-height) !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  body[data-theme-template="product"] .fs-marketplace-reviews[data-fs-v77-review-height-managed="true"][data-fs-v77-review-state="collapsed"] {
    height: var(--fs-v77-reviews-target-height) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body[data-theme-template="product"] .fs-marketplace-reviews[data-fs-v77-review-height-managed="true"] > .fs-marketplace-reviews__toggle {
    display: none !important;
  }

  body[data-theme-template="product"] .fs-marketplace-reviews[data-fs-v77-review-height-managed="true"] > .fs-marketplace-reviews__content {
    position: absolute !important;
    inset: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  body[data-theme-template="product"] .fs-marketplace-reviews__body-v77 {
    position: relative !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body[data-theme-template="product"] .fs-marketplace-reviews__footer-v77 {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    gap: 8px !important;
    min-width: 0 !important;
    padding-top: 8px !important;
  }

  body[data-theme-template="product"] .fs-marketplace-reviews__footer-v77 .fs-marketplace-reviews__links {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-wrap: wrap !important;
    gap: 8px 12px !important;
    margin: 0 !important;
  }

  body[data-theme-template="product"] .fs-marketplace-reviews__expand-v77 {
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    width: 100% !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 8px 14px !important;
    border: 0 !important;
    border-radius: 11px !important;
    background: linear-gradient(90deg, rgba(34, 211, 238, .16), rgba(79, 140, 255, .2)) !important;
    color: #fff !important;
    font: inherit !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
  }

  body[data-theme-template="product"] .fs-marketplace-reviews__expand-v77 > span::before {
    content: "Развернуть отзывы";
  }

  body[data-theme-template="product"] .fs-marketplace-reviews.is-expanded-v77 .fs-marketplace-reviews__expand-v77 > span::before {
    content: "Свернуть отзывы";
  }

  body[data-theme-template="product"] .fs-marketplace-reviews.has-overflow-v77 .fs-marketplace-reviews__expand-v77,
  body[data-theme-template="product"] .fs-marketplace-reviews.is-expanded-v77 .fs-marketplace-reviews__expand-v77 {
    display: flex !important;
  }

  body[data-theme-template="product"] .fs-marketplace-reviews.has-overflow-v77:not(.is-expanded-v77) .fs-marketplace-reviews__body-v77::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 54px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(13, 16, 23, 0), #0d1017 88%);
  }

  body[data-theme-template="product"] .fs-marketplace-reviews[data-fs-v77-review-height-managed="true"][data-fs-v77-review-state="expanded"].is-expanded-v77 {
    height: auto !important;
    overflow: visible !important;
  }

  body[data-theme-template="product"] .fs-marketplace-reviews[data-fs-v77-review-height-managed="true"][data-fs-v77-review-state="expanded"].is-expanded-v77 > .fs-marketplace-reviews__content {
    position: static !important;
    padding: 16px !important;
  }

  body[data-theme-template="product"] .fs-marketplace-reviews.is-expanded-v77 .fs-marketplace-reviews__body-v77 {
    overflow: visible !important;
  }

  body[data-theme-template="product"] .fs-marketplace-reviews__expand-icon-v77 {
    width: 8px;
    height: 8px;
    border-right: 2px solid #78b9ff;
    border-bottom: 2px solid #78b9ff;
    transform: rotate(45deg);
    transition: transform .2s ease;
  }

  body[data-theme-template="product"] .fs-marketplace-reviews.is-expanded-v77 .fs-marketplace-reviews__expand-icon-v77 {
    transform: rotate(225deg);
  }

  body[data-theme-template="product"] .product__area-buy[data-fs-v77-buy-compacted="true"] {
    align-self: start !important;
    height: auto !important;
    min-height: 0 !important;
  }

  body[data-theme-template="product"] .product__area-buy[data-fs-v77-buy-compacted="true"] > .fs-product-trust {
    width: 100% !important;
    margin: 16px 0 0 !important;
  }

}

@media (max-width: 1024px) {
  body[data-theme-template="product"] .fs-marketplace-reviews__body-v77 {
    overflow: visible;
  }

  body[data-theme-template="product"] .fs-marketplace-reviews__footer-v77 {
    display: block;
  }

  body[data-theme-template="product"] .fs-marketplace-reviews__expand-v77 {
    display: none !important;
  }

  body[data-theme-template="product"] .product__area-buy > .fs-product-trust {
    width: 100%;
    margin: 16px 0 0;
  }
}
