/* Мобильная подстройка под ПК-тему. Десктоп (min-width: 769px) не затрагивается. */

@media (max-width: 768px) {
  :root {
    --premium-gold: #1D5FD1;
    --premium-gold-soft: rgba(29, 95, 209, 0.28);
    --premium-card-border: #DCE6F2;
    --premium-glass: rgba(255, 255, 255, 0.97);
  }

  html,
  body {
    overflow-x: hidden;
  }

  header,
  .site-header {
    border-bottom-color: #DCE6F2 !important;
  }

  /* --- Главная: не сжимать секции глобальным padding из mobile-premium --- */
  body.home-page section.home-section,
  body.home-page #new,
  body.home-page #why,
  body.home-page #products,
  body.home-page #rassrochka,
  body.home-page #contact {
    padding: 48px 0 !important;
  }

  body.home-page .home-hero {
    padding: calc(var(--site-chrome-h, 72px) + 20px) 16px 36px !important;
  }

  body.home-page #products {
    display: block !important;
  }

  .home-contact__inner {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    min-width: 0;
    width: 100%;
  }

  .home-contact__left,
  .home-contact__card,
  .lead-form,
  .form-inner {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100%;
  }

  .home-contact__card {
    padding: 20px 16px !important;
    overflow: visible;
  }

  .lead-form input[type='checkbox'],
  .lead-form .form-consent input,
  .form-consent input[type='checkbox'] {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    min-height: 16px !important;
    padding: 0 !important;
    margin-top: 3px !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
    accent-color: #0F3D8C;
  }

  .form-consent,
  .lead-form .form-consent {
    display: flex !important;
    align-items: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    max-width: 100%;
    min-width: 0;
  }

  .form-consent span,
  .lead-form .form-consent span,
  .form-consent {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .form-consent span,
  .lead-form .form-consent span {
    flex: 1 1 auto;
    min-width: 0;
    color: #5B6B84;
    font-size: 12.5px;
    line-height: 1.45;
    padding-right: 56px;
  }

  .form-consent a,
  .lead-form .form-consent a {
    color: #1D5FD1 !important;
  }

  .home-new-card {
    border: 1px solid #DCE6F2 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  .home-new-card__title {
    color: #16233B !important;
    -webkit-text-fill-color: #16233B !important;
  }

  .home-new-card__price,
  .home-new-card__price span {
    color: #0F3D8C !important;
    -webkit-text-fill-color: #0F3D8C !important;
  }

  .home-new-card__placeholder,
  .cat-card__count {
    color: #1D5FD1 !important;
  }

  .cat-card--premium {
    border: 1px solid #DCE6F2 !important;
    box-shadow: none !important;
    border-radius: 12px !important;
    background: #ffffff !important;
  }

  .cat-card--premium,
  .cat-card__body h3 {
    color: #16233B !important;
    -webkit-text-fill-color: #16233B !important;
  }

  .cat-card__arrow {
    background: #EAF1FC !important;
    border-color: #DCE6F2 !important;
    color: #1D5FD1 !important;
  }

  /* --- Каталог: как на ПК, 2 колонки --- */
  body.page-catalog .catalog-nav-section,
  body.page-catalog #catalogNavSection {
    display: none !important;
  }

  body.page-catalog section.catalog-nav-section,
  body.page-catalog section.catalog-subcats-section,
  body.page-catalog section.catalog-products-wrap {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.page-catalog .catalog-layout {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.page-catalog .page-hero-inner h1,
  body.page-catalog .page-hero h1 {
    background: none !important;
    color: #16233B !important;
    -webkit-text-fill-color: #16233B !important;
  }

  body.page-catalog .catalog-breadcrumb-wrap a,
  body.page-catalog .catalog-breadcrumb a {
    color: #1D5FD1 !important;
  }

  body.page-catalog .catalog-breadcrumb-wrap .bc-current,
  body.page-catalog .catalog-breadcrumb .bc-current {
    color: #5B6B84 !important;
    -webkit-text-fill-color: #5B6B84 !important;
  }

  body.page-catalog .catalog-subcats-section {
    padding: 0 0 24px !important;
  }

  body.page-catalog .catalog-subcats-grid {
    display: block !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  body.page-catalog .catalog-subcats-group {
    margin: 0 0 28px;
  }

  body.page-catalog .catalog-subcats-group:last-child {
    margin-bottom: 0;
  }

  body.page-catalog .catalog-subcats-group__title {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 4px 0 14px !important;
    padding: 0 !important;
    font-family: 'Manrope', sans-serif !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em;
    color: #1D5FD1 !important;
    -webkit-text-fill-color: #1D5FD1 !important;
    background: none !important;
    border-bottom: none !important;
  }

  body.page-catalog .catalog-subcats-group__title::after {
    content: '';
    flex: 1 1 auto;
    height: 2px;
    background: #1D5FD1;
    border-radius: 1px;
  }

  body.page-catalog .catalog-subcats-group__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body.page-catalog .catalog-subcat-card {
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #DCE6F2 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    overflow: hidden !important;
    box-shadow: none !important;
  }

  body.page-catalog .catalog-subcat-card__media {
    position: relative !important;
    inset: auto !important;
    aspect-ratio: 4 / 3;
    min-height: 108px;
    height: auto !important;
    background: #ffffff !important;
  }

  body.page-catalog .catalog-subcat-card__media img {
    object-fit: cover !important;
    object-position: center;
    padding: 0;
    box-sizing: border-box;
  }

  body.page-catalog .catalog-subcat-card__overlay {
    display: none !important;
  }

  body.page-catalog .catalog-subcat-card__body {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: auto;
    padding: 10px 12px 12px !important;
    background: #ffffff !important;
    pointer-events: none;
  }

  body.page-catalog .catalog-subcat-card__title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
    color: #16233B !important;
    -webkit-text-fill-color: #16233B !important;
    text-shadow: none !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
  }

  body.page-catalog .catalog-subcat-card__count {
    margin-top: 6px !important;
    color: #1D5FD1 !important;
    -webkit-text-fill-color: #1D5FD1 !important;
    text-shadow: none !important;
    font-size: 12px !important;
    font-weight: 500 !important;
  }

  /* Карточки товаров — синяя рамка, без бордовых теней */
  .product-card,
  .page-catalog .product-card,
  #products .product-card,
  body.page-installment .product-card,
  .home-products-grid .product-card {
    border: 1px solid #DCE6F2 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  .product-card:hover,
  .page-catalog .product-card:hover,
  #products .product-card:hover,
  body.page-installment .product-card:hover {
    border-color: #1D5FD1 !important;
    box-shadow: none !important;
    transform: none;
  }

  .product-price,
  .page-catalog .product-price,
  #products .product-price,
  body.page-installment .product-price {
    color: #0F3D8C !important;
    -webkit-text-fill-color: #0F3D8C !important;
  }

  .page-catalog .product-img,
  .page-catalog .product-img--empty span,
  #products .product-img.icon-svg::after {
    border-bottom-color: #DCE6F2 !important;
    color: #5B6B84 !important;
  }

  .filters-drawer-footer .btn-apply {
    background: #0F3D8C !important;
  }

  .filters-drawer-close:hover {
    color: #1D5FD1 !important;
  }

  .page-catalog .catalog-search-wrap--top .catalog-search-input {
    border-color: #DCE6F2 !important;
    color: #16233B !important;
    background: #ffffff !important;
  }

  .page-catalog .catalog-search-wrap--top .catalog-search-input:focus {
    border-color: #1D5FD1 !important;
    box-shadow: 0 0 0 3px rgba(29, 95, 209, 0.15) !important;
  }

  .page-catalog .catalog-search-wrap--top .catalog-search-icon {
    stroke: #1D5FD1 !important;
  }

  /* --- Товар / рассрочка / прочие акценты --- */
  .header-phone {
    color: #0F3D8C !important;
  }

  .product-stock--order {
    color: #1D5FD1 !important;
  }

  .product-stock--order .stock-dot {
    background: #1D5FD1 !important;
  }

  .product-benefits .benefit {
    background: #F3F7FD !important;
    border-color: #E4EDFB !important;
    color: #0A0F2C !important;
  }

  .benefit-icon {
    background: #ffffff !important;
    border-color: #E8EEF6 !important;
  }

  .benefit-icon svg * {
    stroke: #1D5FD1 !important;
  }

  body.page-installment .installment-conditions__inner {
    border-color: #DCE6F2 !important;
    box-shadow: none !important;
  }

  body.page-installment .installment-term-card {
    background: #EAF1FC !important;
    border-color: #DCE6F2 !important;
  }

  body.page-installment .product-card {
    border-color: #DCE6F2 !important;
  }

  body.page-installment .product-card:hover {
    border-color: #1D5FD1 !important;
  }

  .img-placeholder span,
  .sim-placeholder svg,
  .product-cat-label {
    color: #1D5FD1 !important;
    stroke: #1D5FD1 !important;
  }

  .page-hero h1,
  .legal-section h2 {
    background: none !important;
    color: #16233B !important;
    -webkit-text-fill-color: #16233B !important;
  }

  .scroll-arrow {
    border-color: #1D5FD1 !important;
    color: #1D5FD1 !important;
  }

  .scroll-arrow:hover {
    background: #0F3D8C !important;
    color: #ffffff !important;
  }

  /* Карточка товара: фото по центру, кнопки на всю ширину, без наложения FAB */
  .product-main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 16px 16px 28px !important;
    gap: 18px !important;
  }

  .breadcrumb {
    padding: 12px 16px !important;
  }

  .gallery,
  .product-info {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .main-img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    margin: 0 auto !important;
  }

  .main-img img,
  .main-img img.product-photo {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
    padding: 12px !important;
    margin: 0 auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  .product-title {
    font-size: 22px !important;
    line-height: 1.3 !important;
    margin-bottom: 12px !important;
    max-width: 100% !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .product-price {
    font-size: 28px !important;
    line-height: 1.15 !important;
  }

  .product-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 10px !important;
    margin: 0 !important;
  }

  .product-price-block {
    margin-bottom: 16px !important;
  }

  .product-actions .btn-order-main,
  .product-actions .btn-whatsapp,
  .product-actions .btn-call {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    transform: none !important;
    animation: none !important;
    box-shadow: none !important;
  }

  .product-actions .btn-order-main::after,
  .product-actions .btn-order::after {
    display: none !important;
  }

  body:has(.product-main) .fab-actions {
    display: none !important;
  }

  .product-benefits,
  .product-specs-block {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .similar-inner {
    padding: 0 16px !important;
  }

  .similar-grid .sim-img,
  .sim-img {
    position: relative !important;
    height: auto !important;
    min-height: 160px !important;
    max-height: none !important;
    aspect-ratio: 1 / 1;
    overflow: hidden !important;
    background: #ffffff !important;
  }

  .similar-grid .sim-img img,
  .sim-img img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    padding: 10px !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
  }

  /* Мобильное меню — синяя тема, единое выравнивание */
  .mobile-menu {
    z-index: 10050 !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 72px 20px 28px !important;
    overflow-y: auto !important;
    background: #ffffff !important;
  }

  .mobile-menu__close {
    top: 14px !important;
    right: 14px !important;
    width: 44px !important;
    height: 44px !important;
    border: 1px solid #DCE6F2 !important;
    border-radius: 50% !important;
    background: #EAF1FC !important;
    color: #0F3D8C !important;
  }

  .mobile-menu__close:hover,
  .mobile-menu__close:focus-visible {
    background: #0F3D8C !important;
    border-color: #0F3D8C !important;
    color: #ffffff !important;
  }

  .mobile-menu nav {
    align-items: stretch !important;
    gap: 2px !important;
    width: 100% !important;
  }

  .mobile-menu nav a {
    display: block !important;
    width: 100% !important;
    padding: 12px 0 !important;
    font-family: 'Manrope', -apple-system, 'Segoe UI', sans-serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em !important;
    color: #16233B !important;
    -webkit-text-fill-color: #16233B !important;
    text-align: left !important;
  }

  .mobile-menu nav a:hover,
  .mobile-menu nav a.active {
    color: #0F3D8C !important;
    -webkit-text-fill-color: #0F3D8C !important;
  }

  .mobile-menu__search {
    width: 100% !important;
    max-width: none !important;
    margin: 16px 0 8px !important;
  }

  .mobile-menu__search .header-search {
    display: flex !important;
    width: 100% !important;
    border: 1px solid #DCE6F2 !important;
    border-radius: 10px !important;
    overflow: hidden;
    background: #ffffff !important;
  }

  .mobile-menu__search .header-search input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    border: 0 !important;
    background: #ffffff !important;
    color: #16233B !important;
    font-family: 'Public Sans', -apple-system, 'Segoe UI', sans-serif !important;
    font-size: 15px !important;
  }

  .mobile-menu__search .header-search button {
    background: #0F3D8C !important;
    color: #ffffff !important;
    width: 44px !important;
    flex-shrink: 0 !important;
  }

  .mobile-menu__categories {
    width: 100% !important;
    max-width: none !important;
    margin: 12px 0 8px !important;
    padding-top: 16px !important;
    border-top: 1px solid #DCE6F2 !important;
  }

  .mobile-menu__categories-title {
    margin: 0 0 8px !important;
    font-family: 'Manrope', -apple-system, 'Segoe UI', sans-serif !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: #1D5FD1 !important;
    -webkit-text-fill-color: #1D5FD1 !important;
    text-align: left !important;
  }

  .mobile-menu__categories-list {
    gap: 0 !important;
  }

  .mobile-menu__cat-link {
    padding: 11px 0 !important;
    border-radius: 8px !important;
    font-family: 'Public Sans', -apple-system, 'Segoe UI', sans-serif !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    color: #5B6B84 !important;
    -webkit-text-fill-color: #5B6B84 !important;
    text-align: left !important;
  }

  .mobile-menu__cat-link:hover,
  .mobile-menu__cat-link:active {
    background: #EAF1FC !important;
    color: #0F3D8C !important;
    -webkit-text-fill-color: #0F3D8C !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .mobile-menu__cta {
    width: 100% !important;
    max-width: none !important;
    margin-top: 20px !important;
  }

  .mobile-menu__cta .btn-gold {
    width: 100% !important;
    min-height: 48px !important;
    background: #0F3D8C !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-radius: 10px !important;
    font-family: 'Manrope', sans-serif !important;
    font-weight: 700 !important;
  }

  body:has(.mobile-menu.is-open) .fab-actions {
    display: none !important;
  }

  /* Главная — как на десктопе: кухня под шапкой, читаемые блоки */
  body.home-page header,
  body.home-page header.site-header {
    background: transparent !important;
    border-bottom-color: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  body.home-page header .logo-text strong,
  body.home-page header .logo-text span {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }

  body.home-page header .burger-btn span {
    background: #ffffff !important;
  }

  body.home-page header.scrolled,
  body.home-page header.scrolled.site-header,
  body.home-page:has(.mobile-menu.is-open) header,
  body.home-page:has(.mobile-menu.is-open) header.site-header {
    background: rgba(255, 255, 255, 0.97) !important;
    border-bottom-color: #DCE6F2 !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }

  body.home-page header.scrolled .logo-text strong,
  body.home-page:has(.mobile-menu.is-open) header .logo-text strong {
    color: #16233B !important;
    -webkit-text-fill-color: #16233B !important;
  }

  body.home-page header.scrolled .logo-text span,
  body.home-page:has(.mobile-menu.is-open) header .logo-text span {
    color: #0F3D8C !important;
    -webkit-text-fill-color: #0F3D8C !important;
  }

  body.home-page header.scrolled .burger-btn span,
  body.home-page:has(.mobile-menu.is-open) header .burger-btn span {
    background: #0F3D8C !important;
  }

  body.home-page .home-hero {
    min-height: 100svh;
    padding: calc(var(--site-chrome-h, 64px) + 12px) 16px 28px !important;
  }

  body.home-page .home-hero .home-hero__title {
    font-size: clamp(26px, 7.4vw, 34px) !important;
    max-width: none;
  }

  body.home-page .home-hero__sub {
    font-size: 15px !important;
    line-height: 1.55;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.92) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.92) !important;
  }

  body.home-page .home-hero__buttons {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 22px;
  }

  body.home-page .home-hero .btn-gold,
  body.home-page .home-hero .btn-outline {
    width: 100%;
    justify-content: center;
    min-height: 46px !important;
  }

  body.home-page .home-hero__stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  body.home-page .home-hero__stat,
  body.home-page .home-hero__stat + .home-hero__stat {
    padding: 0 !important;
    border-left: 0 !important;
  }

  body.home-page .home-new .home-section__head {
    margin-bottom: 12px;
    gap: 8px;
  }

  body.home-page .home-new .home-section__head a {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #0F3D8C !important;
    -webkit-text-fill-color: #0F3D8C !important;
  }

  body.home-page .home-new .section-sub {
    color: #16233B !important;
    -webkit-text-fill-color: #16233B !important;
    font-weight: 600 !important;
    font-size: 14px !important;
  }

  body.home-page .home-stage.has-bg #new,
  body.home-page .home-stage.has-bg #why,
  body.home-page .home-stage.has-bg #products,
  body.home-page .home-stage.has-bg #rassrochka,
  body.home-page .home-stage.has-bg #contact,
  body.home-page .home-stage.has-bg .home-section,
  body.home-page .home-stage.has-bg .home-new,
  body.home-page .home-stage.has-bg .home-why,
  body.home-page .home-stage.has-bg .home-contact {
    background: transparent !important;
  }

  body.page-installment .home-stage.has-bg .page-hero,
  body.page-installment .home-stage.has-bg .installment-conditions,
  body.page-installment .home-stage.has-bg .installment-page,
  body.page-installment .home-stage.has-bg section {
    background: transparent !important;
  }

  body.home-admin-on .home-admin-bar {
    flex-wrap: wrap;
    min-height: 48px;
    padding: 8px 12px;
    font-size: 12px;
  }

  body.home-admin-on .home-block-toolbar {
    width: calc(100% - 16px);
    margin: 8px 8px 10px;
    padding: 8px;
    gap: 6px;
  }

  body.home-admin-on .home-block-toolbar__opacity input[type='range'] {
    width: 96px;
  }

  body.home-admin-on .home-hero {
    padding-top: calc(var(--site-chrome-h, 64px) + var(--home-admin-bar-h, 52px) + 12px) !important;
  }
}
