/* The mobile product sheet stays unchanged. On a desktop, its flower becomes
   a persistent preview beside the same scrollable product controls. */
@media (min-width: 1024px) {
  #pv {
    --product-gutter: clamp(34px, 4vw, 80px);
    overscroll-behavior: contain;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    background: #d4becb;
  }

  #pv::after {
    content: '';
    position: fixed;
    z-index: -1;
    inset: 18px;
    border: 1px solid #ffffff69;
    border-radius: 38px;
    box-shadow: inset 0 1px 1px #ffffff85;
    pointer-events: none;
  }

  #pv .pv-scene {
    background:
      radial-gradient(ellipse at 17% 6%, #f0dfd4a3, transparent 52%),
      radial-gradient(ellipse at 90% 80%, #b59aaa59, transparent 54%),
      linear-gradient(125deg, #c9b8c4, #e3c7d0 52%, #cdb9c7);
  }

  #pv .pv-scene img {
    width: 108%;
    height: 116%;
    top: -8%;
    left: 8%;
    object-position: right center;
    opacity: .24;
    filter: blur(32px) saturate(.74);
  }

  #pv .back {
    top: 32px;
    left: var(--product-gutter);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 170px;
    height: 46px;
    border-radius: 24px;
    color: #68485c;
    background: linear-gradient(135deg, #fffafccc, #f3e5ed91);
    box-shadow: inset 0 1px 1px #fff, 0 6px 22px #70485812;
    font-size: 25px;
  }

  #pv .back::after {
    content: 'К ассортименту';
    font: 400 12px/1 Manrope, system-ui, sans-serif;
  }

  #pv .hero2 {
    position: fixed;
    left: 50%;
    right: 2%;
    top: 10vh;
    width: auto;
    height: 82vh;
    min-height: 0;
    max-width: none;
    margin: 0;
    padding: 24px;
  }

  #pv .hero2 img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 32px 26px #6a405335);
  }

  #pv .hero2 figcaption {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    color: #755769;
    font-size: 12px;
    text-align: center;
    letter-spacing: .04em;
  }

  #pv .info.glass {
    width: calc(48% - var(--product-gutter));
    max-width: 760px;
    margin: 98px 0 36px var(--product-gutter);
    padding: clamp(26px, 2.4vw, 44px);
    border-radius: 34px;
    background: linear-gradient(130deg, #fff8fba1, #faeaf269 58%, #fff7fa94);
    backdrop-filter: blur(34px) saturate(1.08);
    -webkit-backdrop-filter: blur(34px) saturate(1.08);
    border-color: #ffffffe0;
    box-shadow: inset 1px 1px 1px #fff, inset -1px -1px 1px #ffffff8c, 0 20px 70px #74536320;
  }

  #pv .info h2 {
    font-size: clamp(42px, 3.5vw, 62px);
    line-height: 1.02;
    margin-bottom: 16px;
  }

  #pv .product-description {
    max-width: 44ch;
    font-size: 14px;
    line-height: 1.65;
  }

  #pv .care {
    width: fit-content;
    max-width: 100%;
    margin: 20px 0;
    padding: 12px 16px;
    border: 1px solid #ffffff80;
    border-radius: 17px;
    background: #fffcfc30;
    font-size: 12px;
  }

  #pv .product-unit-price { margin: 24px 0; font-size: 29px; }
  #pv .info h4 { font-size: 14px; margin-top: 20px; }
  #pv .sw { gap: 12px; padding: 5px; }
  #pv .sw button { width: 42px; height: 42px; }
  #pv .variant-options { gap: 9px; }
  #pv .variant-options button { min-height: 44px; padding-inline: 16px; font-size: 12px; }
  #pv .product-quantity-row { margin: 26px 0; padding: 19px 0; }
  #pv .product-quantity-row h4 { margin: 0; }
  #pv .svc { min-height: 54px; font-size: 13px; }
  #pv .decor-types { gap: 10px; }
  #pv .decor-type { padding: 12px; font-size: 12px; }
  #pv .decor-photo { height: 116px; }
  #pv .paper-packs { gap: 8px; }
  #pv .paper-packs i { height: 88px; }

  #pv .slide { margin-top: 26px; }
  #pv .slide .slide-label { font-size: clamp(12px, 1.1vw, 17px); right: 86px; }
  #pv .slide .slide-price { font-size: 13px; }
  #pv .slide-hint { font-size: 10px; margin-bottom: 0; }

  /* A permanent composition preview leaves the entire builder in the same
     scroll container, so changing a flower never jumps back to the top. */
  #pv .bouquet-hero {
    position: fixed;
    top: 16vh;
    right: 2%;
    left: 65%;
    width: auto;
    height: 65vh;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    pointer-events: none;
  }

  #pv .bouquet-hero > img {
    top: 8%;
    width: 76%;
    height: 76%;
    left: calc(12% + (var(--flower-index) - (var(--flower-count) - 1) / 2) * 20px);
    transform: rotate(calc((var(--flower-index) - (var(--flower-count) - 1) / 2) * 12deg));
    filter: drop-shadow(0 22px 22px #76536a24);
  }

  #pv .bouquet-hero-label { bottom: 5%; font-size: 10px; }
  #pv .bouquet-info.glass { width: calc(63% - var(--product-gutter)); max-width: 1160px; }
  #pv .bouquet-info h2 { max-width: none; font-size: clamp(38px, 3.2vw, 56px); }
  #pv .bouquet-info > .product-description { max-width: 60ch; }
  #pv .builder-step h3 { font-size: 27px; }
  #pv .builder-picker { grid-template-columns: 108px minmax(0, 1fr); gap: 18px; }
  #pv .builder-draft-photo { width: 108px; height: 120px; }
  #pv .builder-picker select, #pv .builder-variant select { min-height: 46px; font-size: 13px; }
  #pv .builder-picker small, #pv .builder-picker label, #pv .builder-variant { font-size: 12px; }
  #pv .builder-add { min-height: 52px; font-size: 13px; }
  #pv .builder-add > span { font-size: 12px; }
  #pv .builder-composition { padding: 18px; }
  #pv .builder-composition-title h4 { margin: 0; }
  #pv .builder-line-main > b { font-size: 13px; }
  #pv .builder-line-main > small { font-size: 11px; }
  #pv .builder-line-tools .card-quantity button { min-height: 38px; }
  #pv .builder-remove { font-size: 11px; }
  #pv .greenery-row { padding: 10px; }
}

@media (min-width: 1280px) {
  #pv .bouquet-info {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 26px;
    align-items: start;
  }
  #pv .bouquet-info > h2 { grid-column: 1 / -1; grid-row: 1; }
  #pv .bouquet-info > .product-description { grid-column: 1 / -1; grid-row: 2; }
  #pv .bouquet-info > .product-description + .builder-step { grid-column: 1; grid-row: 3; }
  #pv .bouquet-info > .builder-picker { grid-column: 1; grid-row: 4; grid-template-columns: 75px minmax(0, 1fr); gap: 10px; }
  #pv .bouquet-info .builder-draft-photo { width: 75px; height: 94px; }
  #pv .bouquet-info > .builder-variant { grid-column: 1; grid-row: 5; }
  #pv .bouquet-info > h4 { grid-column: 1; grid-row: 6; }
  #pv .bouquet-info > .sw { grid-column: 1; grid-row: 7; gap: 10px; }
  #pv .bouquet-info > .sw button { width: 36px; height: 36px; }
  #pv .bouquet-info > .builder-draft-quantity { grid-column: 1; grid-row: 8; }
  #pv .bouquet-info > .builder-add { grid-column: 1; grid-row: 9; }
  #pv .bouquet-info > .builder-composition { grid-column: 2; grid-row: 3 / 10; margin-top: 30px; }
  #pv .bouquet-info > .builder-composition + .builder-step { grid-column: 1; grid-row: 10; }
  #pv .bouquet-info > .decor-caption { grid-column: 1; grid-row: 11; }
  #pv .bouquet-info > .greenery-list { grid-column: 1; grid-row: 12; }
  #pv .bouquet-info > .greenery-list + .builder-step { grid-column: 2; grid-row: 10; }
  #pv .bouquet-info > .decoration-section { grid-column: 2; grid-row: 11 / 15; }
  #pv .bouquet-info > .svc { grid-column: 1; grid-row: 13; margin-top: 20px; }
  #pv .bouquet-info > .bouquet-total { grid-column: 1; grid-row: 14; }
  #pv .bouquet-info > .slide { grid-column: 1 / -1; grid-row: 15; }
  #pv .bouquet-info > .slide-hint { grid-column: 1 / -1; grid-row: 16; }
  #pv .bouquet-info .builder-step { margin-bottom: 18px; }
  #pv .bouquet-info .builder-step h3 { font-size: 25px; }
  #pv .bouquet-info .builder-line { grid-template-columns: 52px minmax(0, 1fr); }
  #pv .bouquet-info .builder-line-photo { width: 52px; height: 76px; }
  #pv .bouquet-info .builder-line-tools { gap: 8px; }
  #pv .bouquet-info .greenery-row { grid-template-columns: 30px minmax(0, 1fr) 100px; padding: 8px; gap: 5px; }
  #pv .bouquet-info .greenery-row > i svg { width: 30px; }
  #pv .bouquet-info .greenery-row b { font-size: 12px; }
  #pv .bouquet-info .greenery-row small { font-size: 10px; }
  #pv .bouquet-info .greenery-row .card-quantity button { width: 30px; }
  #pv .bouquet-info .decor-photo { height: 88px; }
  #pv .bouquet-info .decor-type { padding: 8px; font-size: 11px; }
  #pv .bouquet-info .paper-packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #pv .bouquet-info .paper-packs i { height: 88px; }
  #pv .bouquet-info .slide .slide-label { font-size: 16px; }
}

@media (min-width: 1800px) {
  #pv .hero2 { left: 48%; right: 5%; }
  #pv .bouquet-info { column-gap: 38px; }
  #pv .bouquet-info .decor-photo { height: 120px; }
}
