/*
 * adaptive.css — «резиновая» десктоп/планшетная сетка (641–1439px).
 *
 * Макеты Figma нарисованы под 1440 (контейнер 1360), и многие блоки в
 * page-CSS заданы фиксированными px. Этот файл подключается ПОСЛЕДНИМ
 * (inc/assets.php, приоритет 99) и только в диапазоне 641–1439px
 * превращает фиксированные ширины в доли контейнера и перестраивает
 * колонки по брейкпоинтам: 1280 / 1100 / 980 / 800.
 * На ≥1440 и на мобильном (≤640) ничего не меняет.
 */

/* =========================================================
   ГЛАВНАЯ
   ========================================================= */
@media (min-width: 641px) and (max-width: 1439px) {
  /* быстрые ссылки: 4 равные колонки */
  body.home .figma-desktop-quicklinks {
    width: 100%;
    height: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.home .figma-desktop-quicklinks__card,
  body.home .figma-desktop-quicklinks__services {
    width: auto;
    min-width: 0;
  }

  body.home .figma-desktop-quicklinks__services > a,
  body.home .figma-desktop-quicklinks__services p {
    width: 100% !important;
  }

  body.home .figma-desktop-quicklinks__copy {
    width: auto;
    min-width: 0;
  }

  /* категории */
  body.home .figma-mobile-categories {
    width: 100%;
  }

  body.home .figma-mobile-categories a {
    width: auto;
    height: auto;
    min-height: 0;
    aspect-ratio: 325 / 220;
  }

  /* инфо-баннеры */
  body.home .figma-mobile-info-banners {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.home .figma-mobile-info-banner {
    width: auto;
    min-width: 0;
  }

}

@media (min-width: 641px) and (max-width: 1280px) {
  body.home .figma-mobile-info-banner__copy,
  body.home .figma-mobile-info-banner--certificate .figma-mobile-info-banner__copy {
    top: 32px;
    left: 24px;
    width: calc(60% - 48px);
    gap: 16px;
  }

  body.home .figma-mobile-info-banners .figma-mobile-info-banner__copy strong {
    width: 100%;
    height: auto;
    font-size: clamp(20px, 2.3vw, 26px) !important;
    line-height: 1.1;
  }

  body.home .figma-mobile-info-banner__copy small {
    width: 100%;
    height: auto;
    font-size: clamp(12px, 1.35vw, 14px);
    line-height: 1.3;
  }

  body.home .figma-mobile-info-banner__copy em {
    font-size: 12px;
  }

  body.home .figma-mobile-info-banner__photo {
    right: 16px;
    width: min(296px, 36%);
  }

  body.home .figma-mobile-info-banner__certificate-picture {
    top: auto;
    bottom: 0;
    right: 16px;
    width: min(270.6px, 34%);
    height: auto;
  }

  body.home .figma-mobile-info-banner__certificate-photo {
    height: auto;
    transform: none;
  }

  body.home .figma-mobile-info-banner__certificate-marker {
    top: 20px;
    right: 30%;
    width: clamp(48px, 6vw, 72px);
    height: auto;
  }

  body.home .figma-mobile-page .figma-mobile-hits__grid,
  body.home .figma-mobile-page .figma-mobile-products--new .figma-mobile-hits__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.home .figma-mobile-page .figma-mobile-hits__grid:not(.figma-mobile-after-hits-showcase__grid) > :nth-child(n + 5) {
    display: none;
  }

  /* баннеры в одну колонку — иначе текст наезжает на фото */
  body.home .figma-mobile-info-banners {
    grid-template-columns: minmax(0, 1fr);
  }

  body.home .figma-desktop-quicklinks__icon,
  body.home .figma-desktop-quicklinks__icon img {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
  }

  body.home .figma-desktop-quicklinks__copy strong {
    font-size: 20px;
  }

  body.home .figma-desktop-quicklinks__services {
    height: auto;
    gap: 14px;
  }

  body.home .figma-desktop-quicklinks__services p {
    height: auto;
    white-space: normal;
    font-size: 13px;
    line-height: 1.2;
  }
}

/* Match the header's tablet gutters without a second inner inset. */
@media (min-width: 901px) and (max-width: 1099px) {
  body.home .figma-mobile-page {
    width: calc(100% - 48px);
    padding-inline: 0;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  body.home .figma-mobile-page {
    width: calc(100% - 24px);
    padding-inline: 0;
  }
}

@media (min-width: 641px) and (max-width: 1100px) {
  /* быстрые ссылки: 2 × 2 */
  body.home .figma-desktop-quicklinks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.home .figma-desktop-quicklinks__services {
    height: auto;
    justify-content: center;
  }

  body.home .figma-mobile-page .figma-mobile-hits__grid,
  body.home .figma-mobile-page .figma-mobile-products--new .figma-mobile-hits__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.home .figma-mobile-page .figma-mobile-hits__grid:not(.figma-mobile-after-hits-showcase__grid) > :nth-child(n + 4) {
    display: none;
  }

  body.home .figma-mobile-newsletter {
    grid-template-columns: minmax(0, 1fr);
  }

  body.home .figma-mobile-newsletter form {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  /* товары: 3 колонки (как на 901–1100), а не 2 огромные карточки */
  body.home .figma-mobile-page .figma-mobile-hits__grid {
    gap: 12px;
  }

  body.home .figma-mobile-page .figma-mobile-hit-card.elvise-product-card {
    min-height: 0;
  }

  body.home .figma-mobile-contacts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* =========================================================
   КАРТОЧКА ТОВАРА
   ≤1099 — основной мобильный макет (pages/product-mobile-restored.css),
   ≥1100 — десктопная сетка из product.css. Здесь только правки отзывов
   для десктопа 1100–1439.
   ========================================================= */
@media (min-width: 1100px) {
  body.single-product .elvise-product-recommendations__head h2 {
    font-size: clamp(24px, 2.361vw, 34px) !important;
    line-height: 1.1;
  }

  .product-detail__title,
  .product-info-panel__card h2,
  .product-reviews__head h2 {
    font-size: clamp(22px, 2.083vw, 30px) !important;
    line-height: 1.1;
  }

  .product-detail__about-head h2,
  .product-detail__customer-photos h2,
  .product-detail__purchase-current,
  .product-detail__purchase-current .woocommerce-Price-amount {
    font-size: clamp(18px, 1.528vw, 22px) !important;
  }

  body.single-product .product-reviews__card-head {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  body.single-product .product-reviews__stars {
    flex: 0 0 auto;
    font-size: 20px;
    white-space: nowrap;
  }
}

/* =========================================================
   КАТАЛОГ
   ========================================================= */
@media (min-width: 641px) and (max-width: 1439px) {
  .catalog-sidebar__head button {
    padding: 12px 16px;
    white-space: nowrap;
  }

  .catalog-sidebar {
    height: auto;
    min-height: 0;
  }
}

@media (min-width: 1180px) and (max-width: 1300px) {
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .catalog-page__shell {
    width: calc(100% - 40px);
  }
}

/* =========================================================
   ОФОРМЛЕНИЕ ЗАКАЗА (checkout-desktop.css теперь с 641px)
   ========================================================= */
@media (min-width: 641px) and (max-width: 1279px) {
  /* «Способ доставки / оплаты»: заголовок сверху, кнопки-варианты под ним */
  .commerce-checkout__panel--delivery,
  .commerce-checkout__panel--payment {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    height: auto;
    min-height: 0;
  }

  .commerce-checkout__panel--delivery .commerce-delivery-providers,
  .commerce-checkout__panel--payment .commerce-payment-methods {
    grid-column: 1;
    grid-row: 2;
    justify-self: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: none;
  }

  .commerce-checkout__panel--delivery .commerce-delivery-provider,
  .commerce-checkout__panel--payment .wc_payment_method {
    width: 100%;
  }

  .commerce-checkout__panel--delivery > [data-delivery-provider-panel] {
    grid-row: 3;
  }

  .commerce-checkout .woocommerce-account-fields {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    height: auto;
  }

  .commerce-checkout .woocommerce-account-fields #account_password_field,
  .commerce-checkout .woocommerce-account-fields #account_password_field .password-input,
  .commerce-checkout .woocommerce-account-fields #account_password_field input[type='password'] {
    width: 100%;
  }
}

@media (min-width: 641px) and (max-width: 980px) {
  /* итог заказа — под формой на всю ширину */
  .commerce-checkout .commerce-checkout__summary {
    position: static;
    width: 100%;
  }

  body.woocommerce-checkout .commerce-page--checkout {
    width: calc(100% - 40px);
  }
}

@media (min-width: 641px) and (max-width: 760px) {
  .commerce-checkout .woocommerce-billing-fields__field-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }

  .commerce-checkout__panel--delivery .commerce-checkout-pvz {
    flex-wrap: wrap;
    height: auto;
  }

  .commerce-checkout__panel--delivery .commerce-checkout-pvz__button {
    width: 100%;
    min-width: 0;
  }
}

/* Избранное: хлебные крошки были растянуты на всю ширину (space-between) */
@media (min-width: 641px) {
  .info-page__breadcrumbs.catalog-page__topline {
    justify-content: flex-start;
    gap: 6px;
  }
}

/* =========================================================
   ВХОД / РЕГИСТРАЦИЯ / ВОССТАНОВЛЕНИЕ
   ========================================================= */
@media (min-width: 641px) and (max-width: 900px) {
  .woocommerce-account:not(.logged-in) .elvise-account-auth__panel,
  body.woocommerce-page .elvise-account-recovery.elvise-account-recovery {
    width: min(100%, 683px);
    padding: 40px;
  }

  .woocommerce-account:not(.logged-in) .elvise-account-auth__panel--login {
    width: min(100%, 533px);
  }

  .woocommerce-account:not(.logged-in) .elvise-account-auth form,
  .woocommerce-account:not(.logged-in) .elvise-account-auth__panel--register form,
  body.woocommerce-page .elvise-account-recovery.elvise-account-recovery form {
    width: 100%;
    max-width: 563px;
  }

  .woocommerce-account:not(.logged-in) .elvise-account-auth__heading h1,
  .woocommerce-account:not(.logged-in) .elvise-account-auth__heading h2,
  body.woocommerce-page .elvise-account-recovery.elvise-account-recovery .elvise-account-recovery__heading h1,
  body.woocommerce-page .elvise-account-recovery.elvise-account-recovery .elvise-account-recovery__heading h2 {
    font-size: 34px;
    white-space: normal;
  }

  .woocommerce-account:not(.logged-in) .elvise-account-auth__panel--login .elvise-account-auth__heading p:not(.elvise-account-auth__eyebrow) {
    white-space: normal;
  }
}

/* =========================================================
   ЛИЧНЫЙ КАБИНЕТ
   ========================================================= */
@media (min-width: 641px) and (max-width: 1439px) {
  body.woocommerce-account.logged-in .site-main > .woocommerce {
    width: calc(100% - 80px);
  }
}

@media (min-width: 641px) and (max-width: 1280px) {
  /* главная ЛК: «Адреса доставки» под «Последними заказами» */
  body.woocommerce-account.logged-in .commerce-account-dashboard:has(.commerce-account-dashboard__banner) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.woocommerce-account.logged-in .commerce-account-dashboard__orders,
  body.woocommerce-account.logged-in .commerce-account-dashboard__addresses {
    grid-column: 1;
  }

  body.woocommerce-account.logged-in .commerce-account-dashboard__banner h1 {
    font-size: clamp(40px, 5vw, 70px);
  }
}

@media (min-width: 641px) and (max-width: 1100px) {
  /* сайдбар — над контентом, меню в строку */
  body.woocommerce-account.logged-in .site-main > .woocommerce {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 20px;
  }

  body.woocommerce-account.logged-in .elvise-account-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    column-gap: 24px;
  }

  body.woocommerce-account.logged-in .elvise-account-nav__profile {
    margin: 0;
  }

  body.woocommerce-account.logged-in .elvise-account-nav__profile::after,
  body.woocommerce-account.logged-in .elvise-account-nav__item--logout::before {
    display: none;
  }

  body.woocommerce-account.logged-in .elvise-account-nav .elvise-account-nav__list {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(111, 130, 148, 0.2);
  }

  body.woocommerce-account.logged-in .elvise-account-nav__item--logout {
    margin: 0 0 0 auto;
  }

  /* состав заказа: всё в одну колонку */
  body.woocommerce-account.logged-in .commerce-account-dashboard:has(.commerce-order-detail__head) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.woocommerce-account.logged-in .commerce-account-dashboard:has(.commerce-order-detail__head) > * {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  body.woocommerce-account.logged-in .commerce-order-detail__products-grid,
  body.woocommerce-account.logged-in .commerce-order-review {
    max-width: none;
  }

  body.woocommerce-account.logged-in .commerce-order-review {
    margin-top: 0;
  }

  .elvise-review-cta {
    width: calc(100% - 80px);
    margin: 0 auto 60px;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  body.woocommerce-account.logged-in .site-main > .woocommerce,
  .elvise-review-cta {
    width: calc(100% - 40px);
  }

  /* строки заказов: номер/дата + цена, ниже фото + кнопка */
  body.woocommerce-account.logged-in .commerce-account-dashboard .commerce-order-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "head   price"
      "meta   price"
      "thumbs action";
    row-gap: 10px;
  }

  body.woocommerce-account.logged-in .commerce-order-card__price {
    justify-self: end;
  }

  body.woocommerce-account.logged-in .commerce-order-card__thumbs {
    margin-top: 6px;
  }

  body.woocommerce-account.logged-in .commerce-account-dashboard .commerce-account-order {
    grid-template-columns: minmax(0, 1fr) auto 34px;
    grid-template-areas:
      "head   price open"
      "meta   price open"
      "products products products";
    row-gap: 8px;
    column-gap: 16px;
  }

  body.woocommerce-account.logged-in .commerce-order-card__meta,
  body.woocommerce-account.logged-in .commerce-account-dashboard .commerce-account-order > p {
    white-space: normal;
  }

  body.woocommerce-account.logged-in .commerce-account-dashboard__banner {
    padding: 25px 28px;
  }

  body.woocommerce-account.logged-in .commerce-order-detail__products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.woocommerce-account.logged-in .commerce-order-detail__head {
    flex-wrap: wrap;
  }

  /* редактирование профиля: фото над формой */
  body.woocommerce-account.logged-in .commerce-profile-edit-page {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "crumbs"
      "title"
      "photo"
      "form";
    padding: 28px;
  }

  body.woocommerce-account.logged-in .commerce-profile-edit-page > h1,
  body.woocommerce-account.logged-in .commerce-order-detail__heading h1,
  body.woocommerce-account.logged-in .commerce-order-review h2 {
    font-size: 32px;
  }

  /* модалка адреса */
  body.woocommerce-account.logged-in #elvise-address-modal .elvise-address-modal__panel {
    padding: 48px 32px 32px;
  }
}

@media (min-width: 641px) and (max-width: 760px) {
  body.woocommerce-account.logged-in .commerce-profile-edit-page .commerce-profile-edit-page__form,
  body.woocommerce-account.logged-in #elvise-address-modal .woocommerce-address-fields__field-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }

  body.woocommerce-account.logged-in .commerce-profile-edit-page__field:has(#password_current),
  body.woocommerce-account.logged-in .commerce-profile-edit-page .commerce-profile-edit-page__submit {
    grid-column: 1;
  }

  body.woocommerce-account.logged-in .commerce-account-dashboard .commerce-addresses-page__card.commerce-account-dashboard__card {
    flex: 1 1 100%;
  }
}

/* =========================================================
   ТИПОГРАФИКА: шрифты плавно уменьшаются вместе с экраном.
   Формула: clamp(минимум, размер_макета / 1440 × 100vw, размер_макета) —
   на 1440 ровно как в Figma, на 1024 ≈ 71%, но не меньше минимума.
   !important — потому что в page-CSS размеры заданы шортхендом font: с
   более специфичными селекторами; действует только в 641–1439px.
   ========================================================= */
@media (min-width: 641px) and (max-width: 1439px) {
  body.woocommerce-account.logged-in .commerce-account-dashboard__banner h1,
  .info-page__hero-copy h1 {
    font-size: clamp(40px, 4.861vw, 70px) !important;
    line-height: 1.1;
  }

  .catalog-desktop-heading h1,
  .commerce-checkout-hero__copy h1,
  .commerce-checkout-hero__title-row h1,
  .favorites-page__heading h1 {
    font-size: clamp(32px, 3.472vw, 50px) !important;
    line-height: 1.1;
  }

  .figma-mobile-hits__header h2,
  .figma-mobile-newsletter h2 {
    font-size: clamp(28px, 2.917vw, 42px) !important;
    line-height: 1.1;
  }

  .catalog-desktop-heading h1.catalog-desktop-heading__title--compact,
  body.woocommerce-account.logged-in .commerce-account-page-head h1,
  body.woocommerce-account.logged-in .commerce-order-detail__heading h1,
  body.woocommerce-account.logged-in .commerce-addresses-page__head h1,
  body.woocommerce-account.logged-in .commerce-profile-edit-page > h1,
  body.woocommerce-account.logged-in .commerce-order-review h2,
  .woocommerce-account:not(.logged-in) .elvise-account-auth__heading h1,
  .woocommerce-account:not(.logged-in) .elvise-account-auth__heading h2,
  body.woocommerce-page .elvise-account-recovery.elvise-account-recovery .elvise-account-recovery__heading h1,
  body.woocommerce-page .elvise-account-recovery.elvise-account-recovery .elvise-account-recovery__heading h2,
  .commerce-text-page__doc-title,
  .elvise-review-cta h2 {
    font-size: clamp(28px, 2.778vw, 40px) !important;
    line-height: 1.1;
  }

  body.home .figma-mobile-contacts h2 {
    font-size: clamp(26px, 2.5vw, 36px) !important;
    line-height: 1.1;
  }

  body:not(.single-product) .elvise-product-recommendations__head h2 {
    font-size: clamp(24px, 2.361vw, 34px) !important;
    line-height: 1.1;
  }

  .commerce-cart-recommendations__head h2,
  .commerce-contacts__info h2,
  .commerce-contacts__form h2 {
    font-size: clamp(24px, 2.222vw, 32px) !important;
    line-height: 1.1;
  }

  body.home .figma-mobile-categories strong,
  body.home .figma-mobile-info-banner__copy strong,
  .catalog-desktop-category__copy strong,
  body.woocommerce-account.logged-in #elvise-address-modal .elvise-address-modal__head h2,
  body.woocommerce-account.logged-in .commerce-profile-edit-page__form > h2 {
    font-size: clamp(22px, 2.083vw, 30px) !important;
    line-height: 1.1;
  }

  .commerce-text-page__section h2 {
    font-size: clamp(21px, 1.944vw, 28px) !important;

  }

  .commerce-text-page__toc h2 {
    font-size: clamp(19px, 1.667vw, 24px) !important;

  }

  .commerce-checkout__panel-head h2,
  .commerce-checkout__summary-head h2,
  body.home .figma-desktop-quicklinks__copy strong {
    font-size: clamp(18px, 1.528vw, 22px) !important;

  }

  body.woocommerce-account.logged-in .commerce-account-dashboard .commerce-account-dashboard__card h2 {
    font-size: clamp(17px, 1.389vw, 20px) !important;

  }

  /* кнопки и основные подписи — чуть компактнее на узких экранах */
  body .figma-mobile-hit-card.elvise-product-card .figma-mobile-hit-card__title {
    font-size: clamp(12px, 1.111vw, 16px);
  }
}

@media (min-width: 641px) and (max-width: 1100px) {
  .commerce-text-page__section p,
  .commerce-text-page__section li {
    font-size: 14px;
  }
}

/* =========================================================
   «БРАСЛЕТЫ» (витрина под «Хитами»): текст слева + карточки справа,
   на узких экранах — меньше карточек, ≤900 текст над карточками
   ========================================================= */
@media (min-width: 641px) and (max-width: 1439px) {
  body.home .figma-mobile-page .figma-mobile-after-hits-showcase {
    gap: clamp(32px, 4.86vw, 70px);
    padding: clamp(24px, 2.78vw, 40px);
  }

  body.home .figma-mobile-page .figma-mobile-after-hits-showcase__content h2 {
    font-size: clamp(30px, 2.78vw, 40px) !important;
  }
}

@media (min-width: 641px) and (max-width: 1280px) {
  body.home .figma-mobile-page .figma-mobile-after-hits-showcase__grid.figma-mobile-hits__grid:not(.is-slider) {
    grid-template-columns: repeat(3, minmax(0, 230px));
  }

  body.home .figma-mobile-page .figma-mobile-after-hits-showcase__grid:not(.is-slider) > :nth-child(n + 4) {
    display: none;
  }
}

@media (min-width: 641px) and (max-width: 980px) {
  body.home .figma-mobile-page .figma-mobile-after-hits-showcase__grid.figma-mobile-hits__grid:not(.is-slider) {
    grid-template-columns: repeat(2, minmax(0, 230px));
  }

  body.home .figma-mobile-page .figma-mobile-after-hits-showcase__grid:not(.is-slider) > :nth-child(n + 3) {
    display: none;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  body.home .figma-mobile-page .figma-mobile-after-hits-showcase {
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
    min-height: 0;
  }

  body.home .figma-mobile-page .figma-mobile-after-hits-showcase__content {
    flex: 0 0 auto;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
  }

  body.home .figma-mobile-page .figma-mobile-after-hits-showcase__grid.figma-mobile-hits__grid {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
  }

  body.home .figma-mobile-page .figma-mobile-after-hits-showcase__grid.figma-mobile-hits__grid:not(.is-slider) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
  }

  body.home .figma-mobile-page .figma-mobile-after-hits-showcase__grid:not(.is-slider) > :nth-child(3) {
    display: flex;
  }
}

@media (min-width: 641px) and (max-width: 760px) {
  body.home .figma-mobile-page .figma-mobile-after-hits-showcase__grid.figma-mobile-hits__grid:not(.is-slider) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.home .figma-mobile-page .figma-mobile-after-hits-showcase__grid:not(.is-slider) > :nth-child(3) {
    display: none;
  }
}

/* =========================================================
   ЛИПКИЕ БЛОКИ под фиксированной шапкой (шапка ≈127px):
   фильтры каталога и итог корзины уезжали под неё (top: 20–24px).
   ========================================================= */
@media (min-width: 901px) {
  .catalog-sidebar#catalogFilters,
  .catalog-page .catalog-sidebar {
    top: 147px;
    max-height: calc(100vh - 167px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .catalog-sidebar#catalogFilters::-webkit-scrollbar {
    display: none;
  }
}

/* =========================================================
   КАТАЛОГ 641–900: фильтры — выезжающая панель справа по кнопке
   «Фильтры» (раньше огромный блок фильтров стоял над товарами).
   Открытие/закрытие — уже существующий JS catalog-page.js
   ([data-filter-open] / [data-filter-close] → .is-filter-open).
   ========================================================= */
/* скрыта везде, кроме 641–900 (специфичность выше, чем у «.catalog-results__toolbar button») */
.catalog-results__toolbar .catalog-results__filters,
.catalog-results__filters {
  display: none;
}

@media (min-width: 641px) and (max-width: 900px) {
  .catalog-results__toolbar {
    gap: 12px;
  }

  .catalog-results__toolbar .catalog-results__filters {
    display: inline-flex;
    min-width: 0;
    gap: 8px;
    justify-content: center;
    color: #2e2e2e;
  }

  .catalog-results__filters svg {
    width: 18px;
    height: 18px;
  }

  .catalog-page .catalog-sidebar,
  .catalog-page .catalog-sidebar#catalogFilters {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 130;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: min(400px, 88vw);
    min-width: 0;
    height: auto;
    max-height: none;
    margin: 0;
    padding: 24px;
    overflow-y: auto;
    border-radius: 20px 0 0 20px;
    background: #fff;
    box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12);
    visibility: hidden;
    opacity: 1;
    pointer-events: none;
    transform: translateX(105%);
    transition: transform 0.24s cubic-bezier(0.19, 1, 0.22, 1), visibility 0s linear 0.24s;
  }

  .catalog-page.is-filter-open .catalog-sidebar,
  .catalog-page.is-filter-open .catalog-sidebar#catalogFilters {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    transition: transform 0.24s cubic-bezier(0.19, 1, 0.22, 1), visibility 0s;
  }

  .catalog-page .catalog-sidebar__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    align-items: center;
    gap: 12px;
    order: 0;
    margin: 0;
  }

  .catalog-page .catalog-sidebar__head strong {
    display: block;
    color: #2e2e2e;
    font: 800 22px/1.2 'Manrope', sans-serif;
  }

  .catalog-page .catalog-sidebar__footer button[data-filter-reset] {
    width: auto;
    height: 34px;
    min-height: 34px;
    padding: 0 14px;
    font-size: 14px;
  }

  .catalog-page .catalog-sidebar__close {
    position: relative;
    display: inline-flex;
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #eaeef2;
    color: #2e2e2e;
    cursor: pointer;
  }

  .catalog-page .catalog-sidebar__close::before,
  .catalog-page .catalog-sidebar__close::after {
    position: absolute;
    top: 15px;
    right: 9px;
    left: 9px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    content: '';
  }

  .catalog-page .catalog-sidebar__close::before { transform: rotate(45deg); }
  .catalog-page .catalog-sidebar__close::after { transform: rotate(-45deg); }

  .catalog-page .catalog-sidebar__group {
    width: 100%;
  }

  .catalog-page .catalog-filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    border: 0;
    background: rgba(46, 46, 46, 0.38);
  }

  .catalog-page.is-filter-open .catalog-filter-backdrop {
    display: block;
  }

  body.catalog-filter-is-open {
    overflow: hidden;
  }
}

/* мобильная «Избранное»: кнопка сортировки 34px без иконки — текст
   «Сортировка» вылезал за экран. Иконка как в каталоге, текст скрыт. */
@media (max-width: 640px) {
  .favorites-mobile-page__sort {
    overflow: hidden;
    color: transparent !important;
    font-size: 0 !important;
  }

  .favorites-mobile-page__sort::before {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    background: #6f8294;
    content: '';
    transform: translate(-50%, -50%);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8 4v16m0-16-4 4m4-4 4 4M16 20V4m0 16-4-4m4 4 4-4' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8 4v16m0-16-4 4m4-4 4 4M16 20V4m0 16-4-4m4 4 4-4' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  }
}

/* мобильная карточка товара: у «Фото покупателей», «Описание/Характеристики»
   (__details) и рекомендаций (--after-product) не было order —
   они вставали НАД фото товара. */
@media (max-width: 640px) {
  body.single-product .product-detail__customer-photos {
    order: 9;
  }

  body.single-product .product-info-panel__details {
    order: 10;
  }

  /* эти блоки стояли вплотную к краям экрана */
  body.single-product .product-detail__customer-photos,
  body.single-product .product-info-panel__details {
    box-sizing: border-box;
    width: calc(100% - 20px);
    margin-inline: 10px;
    padding-inline: 10px;
  }

  body.single-product .elvise-product-recommendations--after-product {
    order: 11;
  }
}

/* =========================================================
   ГЛАВНАЯ: фон страницы как у всего сайта (#eaeef2), а не белый
   ========================================================= */
body.home,
body.home .site-main {
  background: #eaeef2;
}

body.home .figma-mobile-page {
  background: transparent !important;
}

/* «Смотреть все» в шапках подборок — Figma Frame 2087330126 */
@media (min-width: 641px) {
  body.home .figma-mobile-page .figma-mobile-hits__header > a {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 12px;
    height: 18px;
    color: #ad0b26;
    font: 500 16px/109.76% 'Manrope', sans-serif;
    letter-spacing: -.02em;
    text-decoration: none;
    white-space: nowrap;
  }

  body.home .figma-mobile-page .figma-mobile-hits__header > a span {
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
  }

  body.home .figma-mobile-page .figma-mobile-hits__header > a svg {
    display: block;
    box-sizing: content-box;
    flex: none;
    width: 8px;
    height: 13px;
    padding: 2px;
    color: #ad0b26;
  }

  body.home .figma-mobile-page .figma-mobile-hits__header > a svg path {
    stroke: currentColor;
    stroke-width: 2;
  }
}

/* =========================================================
   ГЛАВНАЯ: «Мы всегда на связи» + преимущества в одну строку
   Figma Frame 2087330144 (1360×203: 670 тёмный блок + 669 сетка 2×2)
   ========================================================= */
@media (max-width: 640px) {
  .figma-home-support { display: contents; }
}

/* ≥641 стили блока вынесены в assets/css/home-support.css (грузится на всех десктопных ширинах, включая ≥1440). */

/* =========================================================
   ПУСТАЯ КОРЗИНА (десктоп) — Figma Frame 2087330170:
   крошки 12px по центру → 22 → «Подарков в корзине нет» 50px → 40 → текст 16px → 22 → кнопка 259×42
   ========================================================= */
.commerce-cart-empty__breadcrumbs {
  display: none;
}

@media (min-width: 641px) {
  body.woocommerce-cart .commerce-page--cart-empty .commerce-cart__page-header {
    display: none;
  }

  body.woocommerce-cart .commerce-page--cart-empty .commerce-cart-empty {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    text-align: center;
  }

  body.woocommerce-cart .commerce-page--cart-empty .commerce-cart-empty__breadcrumbs {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0 0 22px;
    color: rgba(111, 130, 148, .6);
    font: 400 12px/120% 'Manrope', sans-serif;
  }

  body.woocommerce-cart .commerce-page--cart-empty .commerce-cart-empty__breadcrumbs a {
    color: inherit;
    text-decoration: none;
  }

  body.woocommerce-cart .commerce-page--cart-empty .commerce-cart-empty__breadcrumbs a:hover {
    color: #6f8294;
  }

  body.woocommerce-cart .commerce-page--cart-empty .commerce-cart-empty__title {
    max-width: none;
    margin: 0 0 40px;
    color: #2e2e2e;
    font: 800 clamp(32px, 3.472vw, 50px)/100% 'Manrope', sans-serif;
    letter-spacing: -.02em;
    text-align: center;
  }

  body.woocommerce-cart .commerce-page--cart-empty .commerce-cart-empty__text {
    max-width: 620px;
    margin: 0 0 22px;
    color: #6f8294;
    font: 400 16px/120% 'Manrope', sans-serif;
    text-align: center;
    text-shadow: none;
  }

  body.woocommerce-cart .commerce-page--cart-empty .commerce-cart-empty__button {
    box-sizing: border-box;
    display: inline-flex;
    width: 259px;
    height: 42px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0;
    padding: 12px 50px;
    border-radius: 100px;
    background: #ad0b26;
    box-shadow: 0 8px 10px rgba(0, 0, 0, .1), 0 0 16px rgba(0, 0, 0, .06);
    color: #fff;
    font: 500 16px/109.76% 'Manrope', sans-serif;
    letter-spacing: -.02em;
    text-decoration: none;
    white-space: nowrap;
  }

  body.woocommerce-cart .commerce-page--cart-empty .commerce-cart-empty__button:hover {
    background: #930820;
  }

  body.woocommerce-cart .commerce-page--cart-empty .commerce-cart-empty__button-icon {
    box-sizing: content-box;
    flex: 0 0 8px;
    width: 8px;
    height: 13px;
    padding: 2px;
  }

  body.woocommerce-cart .commerce-page--cart-empty .commerce-empty-recommend {
    margin-top: 64px;
  }

}

/* =========================================================
   РЕКОМЕНДАЦИИ В КОРЗИНЕ и в ПУСТОЙ КОРЗИНЕ: в один ряд столько карточек,
   Корзина: прокручиваемая лента. Пустая корзина: обычная сетка.
   ========================================================= */
@media (min-width: 641px) {
body.woocommerce-cart .commerce-page .commerce-empty-recommend__grid {
    display: grid;
    gap: 20px;
  }


body.woocommerce-cart .commerce-page .commerce-empty-recommend__grid > * {
    display: flex;
    width: 100%;
    min-width: 0;
  }
}

@media (min-width: 1300px) {
body.woocommerce-cart .commerce-page .commerce-empty-recommend__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

body.woocommerce-cart .commerce-page .commerce-empty-recommend__grid > :nth-child(n + 7) {
    display: none;
  }
}

@media (min-width: 1101px) and (max-width: 1299px) {
body.woocommerce-cart .commerce-page .commerce-empty-recommend__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

body.woocommerce-cart .commerce-page .commerce-empty-recommend__grid > :nth-child(n + 6) {
    display: none;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {

body.woocommerce-cart .commerce-page .commerce-empty-recommend__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

body.woocommerce-cart .commerce-page .commerce-empty-recommend__grid > :nth-child(n + 5) {
    display: none;
  }
}

@media (min-width: 761px) and (max-width: 900px) {

body.woocommerce-cart .commerce-page .commerce-empty-recommend__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

body.woocommerce-cart .commerce-page .commerce-empty-recommend__grid > :nth-child(n + 4) {
    display: none;
  }
}

@media (min-width: 641px) and (max-width: 760px) {

body.woocommerce-cart .commerce-page .commerce-empty-recommend__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

body.woocommerce-cart .commerce-page .commerce-empty-recommend__grid > :nth-child(n + 3) {
    display: none;
  }
}

/* =========================================================
   КАТАЛОГ: карточки, появившиеся после фильтра, пока грузится фото —
   ровная серая подложка без мигания, фото плавно проявляется (catalog-page.js
   ставит .is-image-pending и снимает его по событию load).
   ========================================================= */
.catalog-grid .elvise-product-card__gallery,
.catalog-grid .figma-mobile-hit-card__gallery {
  background: #eaeef2;
}

.catalog-grid [data-gallery-slide] img {
  transition: opacity .25s ease;
}

.catalog-grid .is-image-pending [data-gallery-slide] img {
  opacity: 0;
}

/* =========================================================
   КАТАЛОГ: состояние загрузки после выбора фильтра/категории —
   карточки превращаются в серые заглушки (фото + строки текста + кнопка)
   и слегка пульсируют. Класс .is-loading на сетке ставит catalog-page.js на ~500мс.
   ========================================================= */
@keyframes elvise-card-skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}

.catalog-grid.is-loading .elvise-product-card {
  position: relative;
  pointer-events: none;
}

.catalog-grid.is-loading .elvise-product-card > * {
  visibility: hidden;
}

.catalog-grid.is-loading .elvise-product-card::after {
  position: absolute;
  z-index: 5;
  inset: 0;
  border-radius: inherit;
  background:
    /* фото */
    linear-gradient(#e3e8ed, #e3e8ed) 0 0 / 100% 56% no-repeat,
    /* цена */
    linear-gradient(#e3e8ed, #e3e8ed) 12px calc(56% + 16px) / 42% 16px no-repeat,
    /* название — две строки */
    linear-gradient(#edf1f4, #edf1f4) 12px calc(56% + 44px) / calc(100% - 24px) 11px no-repeat,
    linear-gradient(#edf1f4, #edf1f4) 12px calc(56% + 62px) / 64% 11px no-repeat,
    /* рейтинг */
    linear-gradient(#edf1f4, #edf1f4) 12px calc(56% + 86px) / 38% 10px no-repeat,
    /* кнопка */
    linear-gradient(#e3e8ed, #e3e8ed) 12px calc(100% - 12px) / calc(100% - 24px) 30px no-repeat,
    #fff;
  content: '';
  animation: elvise-card-skeleton-pulse 1s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .catalog-grid.is-loading .elvise-product-card::after {
    animation: none;
  }
}

/* ГЛАВНАЯ: карточки категорий — при наведении стрелка поворачивается на 45° (смотрит вправо-вверх) */
.figma-mobile-categories__arrow svg {
  transition: transform .25s ease;
}

.figma-mobile-categories a:hover .figma-mobile-categories__arrow svg,
.figma-mobile-categories a:focus-visible .figma-mobile-categories__arrow svg {
  transform: rotate(-45deg);
}

/* ===== Модальные окна: плавное увеличение при открытии / уменьшение при закрытии (400мс) ===== */
@keyframes elvise-modal-dialog-in {
  from { opacity: 0; transform: scale(.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes elvise-modal-dialog-out {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(.92); }
}

@keyframes elvise-modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes elvise-modal-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

.figma-mobile-form-modal:not([hidden]) .figma-mobile-form-modal__dialog,
.product-gallery-lightbox:not([hidden]) .product-gallery-lightbox__dialog,
.product-detail-lightbox:not([hidden]) .product-detail-lightbox__dialog,
.product-certificate-modal:not([hidden]) .product-certificate-modal__dialog,
.review-photo-modal:not([hidden]) .review-photo-modal__dialog,
#elvise-address-modal:not([hidden]) .elvise-address-modal__panel {
  animation: elvise-modal-dialog-in .4s cubic-bezier(.2, .8, .2, 1) both;
}

.figma-mobile-form-modal:not([hidden]) .figma-mobile-form-modal__backdrop,
.product-gallery-lightbox:not([hidden]) .product-gallery-lightbox__backdrop,
.product-detail-lightbox:not([hidden]) .product-detail-lightbox__backdrop,
.product-certificate-modal:not([hidden]) .product-certificate-modal__backdrop,
.review-photo-modal:not([hidden]) .review-photo-modal__backdrop,
#elvise-address-modal:not([hidden]) .elvise-address-modal__overlay {
  animation: elvise-modal-fade-in .4s ease both;
}

.figma-mobile-form-modal.is-closing .figma-mobile-form-modal__dialog,
.product-gallery-lightbox.is-closing .product-gallery-lightbox__dialog,
.product-detail-lightbox.is-closing .product-detail-lightbox__dialog,
.product-certificate-modal.is-closing .product-certificate-modal__dialog,
.review-photo-modal.is-closing .review-photo-modal__dialog,
#elvise-address-modal.is-closing .elvise-address-modal__panel {
  animation: elvise-modal-dialog-out .4s cubic-bezier(.4, 0, .6, 1) both;
}

.figma-mobile-form-modal.is-closing .figma-mobile-form-modal__backdrop,
.product-gallery-lightbox.is-closing .product-gallery-lightbox__backdrop,
.product-detail-lightbox.is-closing .product-detail-lightbox__backdrop,
.product-certificate-modal.is-closing .product-certificate-modal__backdrop,
.review-photo-modal.is-closing .review-photo-modal__backdrop,
#elvise-address-modal.is-closing .elvise-address-modal__overlay {
  animation: elvise-modal-fade-out .4s ease both;
}

.figma-mobile-form-modal.is-closing,
.product-gallery-lightbox.is-closing,
.product-detail-lightbox.is-closing,
.product-certificate-modal.is-closing,
.review-photo-modal.is-closing,
#elvise-address-modal.is-closing {
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .figma-mobile-form-modal__dialog, .figma-mobile-form-modal__backdrop,
  .product-gallery-lightbox__dialog, .product-gallery-lightbox__backdrop,
  .product-detail-lightbox__dialog, .product-detail-lightbox__backdrop,
  .product-certificate-modal__dialog, .product-certificate-modal__backdrop,
  .review-photo-modal__dialog, .review-photo-modal__backdrop,
  .elvise-address-modal__panel, .elvise-address-modal__overlay {
    animation: none !important;
  }
}

/* ===== Ловушка от ботов в форме подписки на рассылку (визуально скрыта) ===== */
.figma-mobile-newsletter__trap {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Keep certificate copy compact through the tablet-to-mobile transition. */
@media (min-width: 641px) and (max-width: 980px) {
  body.home .figma-mobile-info-banners .figma-mobile-info-banner--certificate .figma-mobile-info-banner__copy {
    top: 24px;
    height: auto;
    gap: 10px;
  }

  body.home .figma-mobile-info-banners .figma-mobile-info-banner--certificate .figma-mobile-info-banner__copy strong,
  body.home .figma-mobile-info-banners .figma-mobile-info-banner--certificate .figma-mobile-info-banner__copy small {
    height: auto;
    margin: 0;
  }
}

/* Keep information banners side by side until the tablet layout. */
@media (min-width: 981px) and (max-width: 1280px) {
  body.home .figma-mobile-info-banners { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.home .figma-mobile-info-banner__certificate-picture { width: 42%; max-width: none; }
  body.home .figma-mobile-info-banner__certificate-marker { right: 31%; }
}
@media (min-width: 641px) and (max-width: 980px) {
  body.home .figma-mobile-info-banners { grid-template-columns: minmax(0, 1fr); }
  body.home .figma-mobile-info-banner__certificate-picture { width: 38%; max-width: none; }
  body.home .figma-mobile-info-banner__certificate-photo { width: 100%; height: auto; }
  body.home .figma-mobile-info-banner__certificate-marker { right: 32%; }
}

@media (min-width: 641px) {
  body.home .figma-mobile-info-banner__certificate-marker {
    top: 19px;
    width: 94px;
    height: 96px;
  }
}

.figma-home-support .figma-mobile-contacts__icon {
  width:40px; height:40px; flex:0 0 40px;
  background:#eaeef2; border-radius:100px;
  box-shadow:0 8px 10px rgba(0,0,0,.1),0 0 16px rgba(0,0,0,.06);
}
body.home .figma-home-support .figma-mobile-contacts__icon img {
  position:static; width:40px; height:40px; max-width:40px;
}

body.home .figma-home-support .figma-mobile-contacts__icon {
  width:40px; height:40px; flex:0 0 40px;
}
body.home .figma-home-support .figma-mobile-contacts__icon img {
  width:40px; height:40px; max-width:40px;
}
