/* Tablet catalog 796:52118. Native content flow, no page zoom. */
@media (min-width: 431px) and (max-width: 860px) ,  (width > 430px) and (max-width: 860px) {
  body.tablet-flow .sets-page { width: 100%; min-height: 0; overflow: clip; background: #fff6eb; }
  body.tablet-flow .sets-page .sets-header-outer { height: auto; padding: 100px 50px 41px; }
  body.tablet-flow .sets-page .sets-page__header .container { width: 100%; padding: 0; }
  body.tablet-flow .sets-page .sets-header-row { display: block; }
  body.tablet-flow .sets-page .sets-header { width: 100%; }
  body.tablet-flow .sets-page .section-title { font-size: 48px; line-height: 58px; }
  body.tablet-flow .sets-page .sets-subtitle { width: 100%; font-size: 14px; line-height: 17px; }
  body.tablet-flow .sets-page .sets { width: 100%; height: auto; padding: 0 0 70px; background: #fff6eb !important; }
  body.tablet-flow .sets-page .sets > .container { width: 100%; padding: 0 50px; }
  body.tablet-flow .sets-page .sets-list { width: 100%; gap: 32px; }
  body.tablet-flow .sets-page .set-card:nth-child(n) { width: 100%; height: auto; min-height: 354px; flex: none; padding: 50px 7.895% 20px; }
  /* Тот же наклон наклейки, что и в блоке наборов на главной, — чтобы
     страница каталога и главная не разъезжались. */
  body.tablet-flow .sets-page .set-card__sostav { top: 95px; width: 170px; height: auto; }
  body.tablet-flow .sets-page .set-card::before {
    inset: -8px -22px -22px -8px;
    background: url('../../../img/catalog/pass2-assets/tablet-paper-cream.svg') center / 100% 100% no-repeat;
    border: 0;
    border-image: none;
  }
  body.tablet-flow .sets-page .set-card.theme-red-dark::before { background-image: url('../../../img/catalog/pass2-assets/tablet-paper-red.svg'); }
  body.tablet-flow .sets-page .set-card.theme-caramel::before { background-image: url('../../../img/catalog/pass2-assets/tablet-paper-caramel.svg'); }
  @supports (-webkit-mask-box-image-source: url('../../../img/catalog/pass2-assets/tablet-paper-mask.svg')) {
    body.tablet-flow .sets-page .set-card::before { display: none; }
    /* Маска обрезает фильтр на том же слое, поэтому тень вынесена наружу. */
    body.tablet-flow .sets-page .set-card__paper {
      display: block !important;
      position: absolute;
      inset: -8px -22px -22px -8px;
      z-index: 0;
      pointer-events: none;
      filter: drop-shadow(7px 7px 7.5px rgba(84, 62, 39, .4));
    }
    body.tablet-flow .sets-page .set-card__paper::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(to bottom, #fff6ed 0%, #f8eadc 100%);
      background-origin: border-box;
      background-clip: border-box;
      background-repeat: no-repeat;
      background-size: 100% 100%;
      border: solid transparent;
      border-width: 71.4189px 80.2527px 51.844px 72.5761px;
      border-image: none;
      -webkit-mask-box-image: url('../../../img/catalog/pass2-assets/tablet-paper-mask.svg') 71.4189 80.2527 51.844 72.5761 fill / 71.4189px 80.2527px 51.844px 72.5761px / 0 round;
    }
    body.tablet-flow .sets-page .set-card.theme-red-dark .set-card__paper::before { background-image: linear-gradient(to bottom, #991f29 0%, #731820 100%); }
    body.tablet-flow .sets-page .set-card.theme-caramel .set-card__paper::before { background-image: linear-gradient(to bottom, #de9666 0%, #c37a49 100%); }
  }
  body.tablet-flow .sets-page .set-card__content { position: relative; inset: auto; width: 100%; height: auto; gap: 16px; }
  body.tablet-flow .sets-page .set-card__text { gap: 104px; }
  body.tablet-flow .sets-page .theme-red-dark .set-card__text { gap: 104px; }
  body.tablet-flow .sets-page .theme-red-dark .set-card__desc { max-width: 357px; min-height: 69px; }
  body.tablet-flow .sets-page .set-card__title { width: fit-content; max-width: 100%; justify-self: start; font-size: 34px; line-height: 40px; white-space: normal; text-align: right; }
  /* [91].2 переносы: text-wrap:pretty снимает висячие слова. */
  body.tablet-flow .sets-page .set-card__desc { display: block; width: 60.94%; max-width: 390px; height: auto; min-height: 56px; font-size: 12px; line-height: 1.1667; font-weight: 400; text-align: left; overflow: visible; -webkit-line-clamp: unset; text-wrap: pretty; }
  body.tablet-flow .sets-page .set-card__action-row { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(298px,100%); }
  body.tablet-flow .sets-page .set-order-btn { width: 100%; height: auto; min-height: 46px; padding: 12px 8px; white-space: normal; }
  body.tablet-flow .sets-page .btn-text-link { width: 100%; text-align: center; font-size: 10px; line-height: 12px; }
  /* [248]: на десктопе (17.09) у red-dark/caramel .btn-text-link уже
     color:#FFF6EB;opacity:.75 — тёмный текст на тёмном фоне карточки
     нечитаем. На планшете жила color:inherit, правило не переносили. */
  body.tablet-flow .sets-page .set-card.theme-red .btn-text-link,
  body.tablet-flow .sets-page .set-card.theme-red-dark .btn-text-link,
  body.tablet-flow .sets-page .set-card.theme-caramel .btn-text-link {
    color: #FFF6EB;
    opacity: 0.6; /* Figma 796:53033: Background @60% на тёмных карточках */
  }
  body.tablet-flow .sets-page .set-card.theme-cream .btn-text-link { color: #401C0C; opacity: 0.4; } /* Figma 796:52220 */
  body.tablet-flow .sets-page .set-card__visual { width: 100%; height: 100%; }
  body.tablet-flow .sets-page .set-card__visual > :is(.set-card__product-img,.set-card__product-pair,.set-card__product-composite) { display: none; }
  body.tablet-flow .sets-page .set-card__visual > .catalog-product-flow[hidden] { display: block !important; position: absolute; left: auto; right: 2.1%; top: 95px; width: 34%; height: auto; filter: none; transform: rotate(-2.51deg); }
  body.tablet-flow .sets-page .set-card:nth-child(n) .set-card__product-img,
  body.tablet-flow .sets-page .set-card__product-pair,
  body.tablet-flow .sets-page .set-card__product-composite { left: auto; right: 5.421%; top: 98.7px; width: 29.5%; height: 189.61px; object-fit: contain; transform: rotate(-9.38deg); }
  /* [91].3 — паттерн PAOLA идёт от самого низа карточки и не доходит до
     верха на ~1/3. [91].4 — фото над паттерном (z-index). */
  /* r5 [91].5: паттерн как в Figma 796:52316 — плитка 329.43×286.19 в точке (451; 125.43) карточки 760×354, низ обрезан краем карточки */
  body.tablet-flow .sets-page .set-card__group-bg { left: 59.34%; right: auto; top: 125.43px; bottom: auto; width: 43.35%; height: auto; aspect-ratio: 329.43 / 286.19; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; z-index: 1; }
  body.tablet-flow .sets-page .set-card__visual > :is(.set-card__product-img,.set-card__product-pair,.set-card__product-composite,.catalog-product-flow) { z-index: 3; }
  body.tablet-flow .sets-page .catalog-flow-signature[hidden] { display: flex !important; flex-direction: column; align-items: flex-end; margin-top: 40px; height: auto; min-height: 78px; }
  body.tablet-flow .sets-page .catalog-flow-signature .sets-dec-main { font-size: 63px; line-height: 63px; }
  body.tablet-flow .sets-page .catalog-flow-signature .sets-dec-sub { font-size: 26px; line-height: 31px; margin-top: -16px; }
  body.tablet-flow #catalog-sm-overlay .sm-panel { width: calc(100% - 32px); max-height: calc(100dvh - 32px); overflow: auto; }
  body.tablet-flow #catalog-sm-overlay .sm-grid { width: 100%; grid-template-columns: repeat(4,minmax(0,1fr)); }
}
/* [scaling.1] на ширинах 431–767 фото набора обрезалось до ~87% ширины
   из-за right:2.1%/width:34% (замер scaling-агента на 640). 768 остаётся
   как выше, тут стягиваем внутрь карточки и добавляем ширины. */
/* Снят подбрейкпоинт «@media (min-width: 431px) and (max-width: 767px)»: полоса 431–860 показывает один макет 860, разницу делает zoom. */

/* Fluid catalog route. The card layout follows available content width; the
   product artwork remains bounded to its card and never covers the copy. */
@media (min-width: 431px) and (max-width: 1199px) , (width > 430px) and (max-width: 1199px), (min-width: 431px) and (width < 1200px){
  body.fluid-flow .sets-page {
    width: 100%; min-width: 0; min-height: 0; overflow: clip; background: #fff6eb;
  }
  body.fluid-flow .sets-page .sets-header-outer {
    width: 100%; height: auto; min-height: 0;
    padding: clamp(72px, 11.63vw, 100px) clamp(20px, 5.8vw, 50px) 40px;
  }
  body.fluid-flow .sets-page .sets-page__header .container,
  body.fluid-flow .sets-page .sets > .container {
    width: 100%; max-width: 1200px; padding: 0;
  }
  body.fluid-flow .sets-page .sets > .container { padding-inline: clamp(20px, 5.8vw, 50px); }
  body.fluid-flow .sets-page .sets-header-row { display: block; width: 100%; }
  body.fluid-flow .sets-page .sets-header { width: 100%; }
  body.fluid-flow .sets-page .section-title { font-size: clamp(37px, 5.58vw, 48px); line-height: 1.2; }
  body.fluid-flow .sets-page .sets-subtitle {
    width: 100%; max-width: 660px; margin-top: 13px;
    font-size: clamp(13px, 1.63vw, 14px); line-height: 1.25;
  }
  body.fluid-flow .sets-page .sets-subtitle .subtitle-star { flex: 0 0 22px; }
  body.fluid-flow .sets-page .sets-decorative-badge { display: none; }
  body.fluid-flow .sets-page .sets {
    width: 100%; height: auto; padding: 0 0 clamp(48px, 8vw, 70px);
    background: #fff6eb !important;
  }
  body.fluid-flow .sets-page .sets-list {
    display: flex; flex-direction: column; width: 100%; min-width: 0;
    align-items: center; gap: clamp(24px, 3.72vw, 32px);
  }
  body.fluid-flow .sets-page .set-card:nth-child(n) {
    display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto;
    width: 100%; max-width: 1040px; height: auto; min-height: 354px; flex: none;
    padding: 43px 7.895% 24px;
  }
  body.fluid-flow .sets-page .set-card::before {
    background: url('../../../img/catalog/pass2-assets/tablet-paper-cream.svg') center / 100% 100% no-repeat;
  }
  body.fluid-flow .sets-page .set-card.theme-red-dark::before {
    background-image: url('../../../img/catalog/pass2-assets/tablet-paper-red.svg');
  }
  body.fluid-flow .sets-page .set-card.theme-caramel::before {
    background-image: url('../../../img/catalog/pass2-assets/tablet-paper-caramel.svg');
  }
  body.fluid-flow .sets-page .set-card__content {
    position: relative; inset: auto; grid-column: 1; grid-row: 1;
    width: 100%; height: auto; min-width: 0; gap: 16px;
  }
  body.fluid-flow .sets-page .set-card__text {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto; width: 100%; min-width: 0;
    gap: clamp(28px, 12.1vw, 104px);
  }
  body.fluid-flow .sets-page .set-card__title {
    width: fit-content; max-width: 100%; justify-self: start;
    font-size: clamp(27px, 3.95vw, 34px); line-height: 1.18;
    white-space: normal; text-align: right; overflow-wrap: anywhere;
  }
  body.fluid-flow .sets-page .set-card__desc,
  body.fluid-flow .sets-page .set-card.theme-red-dark .set-card__desc {
    display: block; width: min(61%, 390px); max-width: 100%; height: auto; min-height: 56px;
    margin: 0; font-size: clamp(12px, 1.4vw, 12px); line-height: 14px;
    font-weight: 400; text-align: left; overflow: visible; -webkit-line-clamp: unset; text-wrap: pretty;
  }
  body.fluid-flow .sets-page .set-card__action-row {
    position: relative; inset: auto; display: flex; flex-direction: column;
    align-items: center; gap: 10px; width: min(298px, 100%); margin-top: 18px;
  }
  body.fluid-flow .sets-page .set-order-btn {
    width: 100%; height: auto; min-height: 46px; padding: 12px 8px; white-space: normal;
  }
  body.fluid-flow .sets-page .btn-text-link { width: 100%; text-align: center; font-size: 10px; line-height: 12px; }
  body.fluid-flow .sets-page .set-card__visual {
    position: absolute; inset: 0; grid-column: 1; grid-row: 1 / span 2;
    width: 100%; height: 100%; pointer-events: none;
  }
  body.fluid-flow .sets-page .set-card__visual > :is(.set-card__product-img, .set-card__product-pair, .set-card__product-composite) { display: none; }
  body.fluid-flow .sets-page .set-card__visual > .catalog-product-flow[hidden] {
    display: block !important; position: absolute; left: auto; right: 2.1%; top: 95px;
    width: 34%; height: auto; max-height: 210px; object-fit: contain; filter: none;
    transform: rotate(-2.51deg);
  }
  body.fluid-flow .sets-page .set-card__group-bg {
    left: 59.34%; right: auto; top: 125.43px; bottom: auto;
    width: 43.35%; height: auto; aspect-ratio: 329.43 / 286.19;
    -webkit-mask-size: 100% 100%; mask-size: 100% 100%; z-index: 1;
  }
  body.fluid-flow .sets-page .catalog-flow-signature[hidden] {
    display: flex !important; flex-direction: column; align-items: flex-end;
    margin-top: 40px; height: auto; min-height: 78px;
  }
  body.fluid-flow .sets-page .catalog-flow-signature .sets-dec-main { font-size: clamp(48px, 7.33vw, 63px); line-height: 1; }
  body.fluid-flow .sets-page .catalog-flow-signature .sets-dec-sub { font-size: clamp(22px, 3.03vw, 26px); line-height: 1.2; margin-top: -16px; }
}

@media (min-width: 431px) and (max-width: 600px) ,  (width > 430px) and (max-width: 600px) {
  body.fluid-flow .sets-page .sets-header-outer { padding-bottom: 32px; }
  body.fluid-flow .sets-page .sets-page__header .container,
  body.fluid-flow .sets-page .sets > .container { padding-inline: clamp(20px, 5.8vw, 35px); }
  body.fluid-flow .sets-page .set-card:nth-child(n) {
    grid-template-rows: auto auto; min-height: 0; padding: 28px clamp(20px, 5.8vw, 34px) 22px;
  }
  body.fluid-flow .sets-page .set-card__sostav {
    position: relative; inset: auto; grid-column: 1; grid-row: 1;
    display: block; width: clamp(112px, 25vw, 132px); max-width: 100%; height: auto;
    margin: -20px 0 8px -14px; transform: none; z-index: 4;
  }
  body.fluid-flow .sets-page .set-card__content { grid-row: 2; }
  body.fluid-flow .sets-page .set-card__text { gap: 12px; }
  body.fluid-flow .sets-page .set-card__title { font-size: clamp(25px, 5.8vw, 30px); }
  body.fluid-flow .sets-page .set-card.theme-cream .catalog-title-separator { display: none; }
  body.fluid-flow .sets-page .set-card.theme-cream .catalog-title-count { display: block; }
  body.fluid-flow .sets-page .set-card.theme-cream .catalog-title-name { white-space: nowrap; }
  body.fluid-flow .sets-page .set-card__desc {
    width: 100%; max-width: 55ch; min-height: 0; font-size: 13px; line-height: 1.35;
  }
  body.fluid-flow .sets-page .set-card__visual {
    position: relative; grid-column: 1; grid-row: 3; width: 100%; height: clamp(145px, 38vw, 200px); margin-top: 12px;
  }
  body.fluid-flow .sets-page .set-card__visual > .catalog-product-flow[hidden] {
    left: 50%; right: auto; top: 0; width: min(100%, 280px); max-height: 100%; height: 100%;
    transform: translateX(-50%); object-fit: contain;
  }
  body.fluid-flow .sets-page .set-card__group-bg {
    left: 50%; right: auto; top: 0; width: min(100%, 310px); height: 100%; transform: translateX(-50%);
  }
  body.fluid-flow .sets-page .set-card__action-row { width: 100%; max-width: 320px; }
}

@media (min-width: 601px) and (max-width: 1199px) ,  (width > 600px) and (max-width: 1199px) ,  (min-width: 601px) and (width < 1200px) {
  body.fluid-flow .sets-page .set-card:nth-child(n) {
    grid-template-rows: auto; padding: 50px 7.895% 20px;
  }
  body.fluid-flow .sets-page .set-card__sostav {
    top: clamp(72px, 11.05vw, 95px); left: clamp(-22px, -2.55vw, -8px);
    width: clamp(120px, 19.77vw, 170px); height: auto;
  }
  body.fluid-flow .sets-page .set-card__visual > .catalog-product-flow[hidden] {
    top: clamp(80px, 11.4vw, 98px); right: 5.421%; width: 29.5%; max-height: 189.61px;
    transform: rotate(-9.38deg);
  }
}

/* Fluid phone widths can be narrower than the Figma 430px card. Let titles
   wrap inside their card instead of being clipped by the page edge. */
@media (max-width: 430px) {
  body.fluid-flow .sets-page .set-card__title .catalog-title-name { white-space: normal; }
  body.fluid-flow .sets-page .set-card--berry-fruit .set-card__title { width: fit-content; }
}

/* The fixed 30px phone title still needs to scale at the narrowest widths. */
@media (max-width: 360px) {
  body.fluid-flow .sets-page .set-card__title { font-size: clamp(24px, 7.9vw, 28.5px); line-height: 1.18; }
}

/* Снят подбрейкпоинт «@media (min-width: 431px) and (max-width: 650px)»: полоса 431–860 показывает один макет 860, разницу делает zoom. */


/* [96–97] Узкий планшет: высоту ряда определяют и описание, и фото.
   Абсолютные top:140px и left:0 у наклейки пересекали переносимый текст,
   а короткое описание поднимало кнопку под фотографию (431/640px).
   Сохраняем существующие ассеты и размеры; опорная версия 768+ прежняя. */
/* Снят подбрейкпоинт «@media (min-width: 431px) and (max-width: 767px)»: полоса 431–860 показывает один макет 860, разницу делает zoom. */

