/**
 * Mobile layout — Figma nodes:
 * 3709:3020 Mobile home, 3987:2560 / 3993:2876 Burger,
 * 4008:3155 Menu_1, 4039:4146 Menu_2, 4083:2097 Menu_1 alt
 * Breakpoint: max-width 767px (mobile-first overrides for phone)
 */

:root {
  --m-blue: #0059b7;
  --m-blue-dark: #1c5c8d;
  --m-blue-soft: #e3f1fc;
  --m-text: #2f2f2f;
  --m-muted: #6b6b6b;
  --m-gray: #e7e7e7;
  --m-border: #a9a9a9;
  --m-footer: #e7e7e7;
  --m-bottom-h: 79px;
}

/* ——— Bottom navigation (sticky) ——— */

.m-bottom-nav {
  display: none;
}

.m-header-actions,
.m-search,
.m-panel,
.drawer__socials {
  display: none;
}

@media (max-width: 767px) {
  body {
    padding-bottom: calc(var(--m-bottom-h) + env(safe-area-inset-bottom, 0px));
  }

  body.drawer-open {
    overflow: hidden;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Hide desktop chrome pieces */
  .header__phone,
  .header__nav,
  .header__divider,
  .header__messengers,
  .header__actions,
  .header__top > .search,
  .header__top > form.search,
  .sidebar,
  .btn--menu {
    display: none !important;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    padding: 8px 0 0;
    border-bottom: none;
  }

  .header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 50px;
  }

  .header__top .logo {
    min-width: 0;
    width: auto;
    flex: 1;
  }

  .logo__title {
    font-family: var(--font-logo, Onest, Manrope, sans-serif) !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: normal !important;
    color: #000 !important;
  }

  .logo__subtitle {
    font-family: var(--font-logo, Onest, Manrope, sans-serif) !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    letter-spacing: -0.2px;
    color: #636363 !important;
    text-transform: none !important;
  }

  .m-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .m-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 15px;
    padding: 0;
    background: #fff;
    border: 0.5px solid var(--m-border);
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    font-family: inherit;
  }

  .m-icon-btn--tg {
    background: #e3f1fc;
    border-color: #0061aa;
  }

  .m-icon-btn--phone {
    background: #dcf6ee;
    border-color: #007055;
  }

  .m-icon-btn--phone img {
    width: 16px !important;
    height: 16px !important;
    transform: scaleY(-1) rotate(180deg);
  }

  .m-icon-btn--tg img {
    transform: rotate(-45deg);
  }

  .m-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 20px;
    height: 16px;
  }

  .m-burger span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 40px;
    background: #2f2f2f;
  }

  .m-icon-btn--menu {
    background: transparent;
    border-color: transparent;
  }

  .m-icon-btn--cart {
    background: #fff;
    border-color: var(--m-border);
  }

  .m-icon-btn--profile {
    background: #e8f3dc;
    border-color: #145100;
    color: #145100;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
  }

  .m-icon-btn img {
    width: 16px;
    height: 16px;
    object-fit: contain;
  }

  .m-icon-btn--cart img {
    width: 18px;
    height: 18px;
  }

  .m-icon-btn--menu img {
    width: 16px;
    height: 16px;
  }

  .m-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 100px;
    background: #e02424;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
  }

  .m-badge--green {
    background: #16a34a;
  }

  .m-search {
    display: block;
    margin: 8px 0 12px;
    max-height: 60px;
    opacity: 1;
    overflow: hidden;
    transition:
      max-height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.2s ease,
      margin 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .site-header.is-scrolled .m-search {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    margin-bottom: 0;
    pointer-events: none;
  }

  .site-header.is-scrolled {
    padding-bottom: 8px;
  }

  .m-search .search {
    display: flex;
    width: 100%;
    background: var(--m-gray);
    border: 0.5px solid var(--m-border);
    border-radius: 6px;
    height: 44px;
    padding: 0 16px;
    gap: 10px;
  }

  .m-search .search__input {
    background: transparent;
    border: 0;
    font-size: 16px;
    color: var(--m-muted);
    width: 100%;
  }

  .m-search .search__icon img {
    width: 16px;
    height: 16px;
  }

  .layout {
    display: block;
  }

  .page-main {
    padding-top: 0;
  }

  /* ——— Bottom nav ——— */

  .m-bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    height: calc(var(--m-bottom-h) + env(safe-area-inset-bottom, 0px));
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 0.5px solid rgba(169, 169, 169, 0.45);
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    box-sizing: border-box;
  }

  .m-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #484848;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.1;
    text-align: center;
    min-width: 0;
    min-height: 48px;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    position: relative;
  }

  .m-bottom-nav__item img {
    width: 22px;
    height: 22px;
    display: block;
    margin: 0;
    flex-shrink: 0;
    object-fit: contain;
    object-position: center;
    box-sizing: border-box;
  }

  .m-bottom-nav__item span {
    display: block;
    width: 100%;
    line-height: 1.1;
  }

  .m-bottom-nav__item.is-active {
    color: var(--m-blue);
  }

  .m-bottom-nav__item.is-active img {
    filter: invert(28%) sepia(98%) saturate(1500%) hue-rotate(192deg) brightness(92%) contrast(101%);
  }

  /* ——— Drawer = full-screen burger ——— */

  .drawer {
    z-index: 55;
    display: block !important;
    visibility: hidden;
    pointer-events: none;
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
  }

  .drawer[hidden] {
    display: none !important;
  }

  .drawer.is-open,
  .drawer.is-closing {
    visibility: visible;
    pointer-events: auto;
  }

  .drawer__backdrop {
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .drawer.is-open .drawer__backdrop {
    opacity: 1;
  }

  .drawer__panel,
  aside.drawer__panel {
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 100%;
    min-height: 100dvh;
    border-radius: 0;
    box-sizing: border-box;
    padding: env(safe-area-inset-top, 0px) 0 calc(var(--m-bottom-h) + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    background: #fff;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
  }

  .drawer.is-open .drawer__panel {
    transform: translateX(0);
  }

  .drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px 8px;
    min-height: 50px;
    flex-shrink: 0;
  }

  .drawer__close {
    width: 28px;
    height: 28px;
    border-radius: 15px;
    background: var(--m-gray);
    border: 0.5px solid var(--m-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .drawer__close img {
    width: 20px;
    height: 20px;
  }

  .drawer__search {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: auto;
    max-width: none;
    margin: 0 16px;
    padding: 0;
    background: var(--m-gray);
    border: 0.5px solid var(--m-border);
    border-radius: 6px;
    height: 44px;
    min-height: 44px;
    flex-shrink: 0;
    overflow: hidden;
  }

  .drawer__search + .drawer__body {
    border-top: 0.5px solid var(--m-border);
    margin-top: 12px;
    padding-top: 12px;
  }

  .drawer__search .search {
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    height: 100%;
    margin: 0;
    padding: 10px 16px;
    background: transparent;
    border: 0;
    border-radius: 0;
    flex-shrink: 1;
    min-width: 0;
  }

  .drawer__search .search__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  .drawer__search .search__icon img {
    width: 16px;
    height: 16px;
    max-width: 16px;
    display: block;
    object-fit: contain;
  }

  .drawer__search .search__input {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.25;
    color: var(--m-text);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
  }

  .drawer__search .search__input::placeholder {
    color: var(--m-muted);
    opacity: 1;
  }

  .drawer__search .search__input::-webkit-search-decoration,
  .drawer__search .search__input::-webkit-search-cancel-button,
  .drawer__search .search__input::-webkit-search-results-button {
    -webkit-appearance: none;
  }

  .drawer__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0 16px 24px;
    -webkit-overflow-scrolling: touch;
  }

  .drawer__label {
    font-size: 10px;
    font-weight: 600;
    color: var(--m-text);
    text-transform: uppercase;
    margin: 12px 0 8px;
  }

  .drawer__cat {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .drawer__cat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 0.5px solid transparent;
    background: transparent;
    text-align: left;
    color: var(--m-text);
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
  }

  .drawer__cat-item.is-active,
  .drawer__cat-item:active {
    background: var(--m-gray);
    border-color: var(--m-border);
  }

  .drawer__cat-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
  }

  .drawer__cat-icon--blue {
    background: var(--m-blue-soft);
  }

  .drawer__cat-icon--green {
    background: #e1f5ee;
  }

  .drawer__cat-icon--peach {
    background: #faeeda;
  }

  .drawer__cat-icon img {
    width: 16px;
    height: 16px;
    display: block;
    object-fit: contain;
    object-position: center;
  }

  /* Full-bleed category glyph (already includes its own tile) */
  .drawer__cat-icon img[src*="cat-service-full"] {
    width: 28px;
    height: 28px;
  }

  .drawer__cat-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
  }

  .drawer__cat-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
  }

  .drawer__cat-count {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--m-muted);
    line-height: 1.4;
  }

  .drawer__cat-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.7;
    display: block;
    object-fit: contain;
  }

  .drawer__info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--m-text);
  }

  .drawer__info-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--m-muted);
    font-size: 12px;
  }

  .drawer__phone {
    display: block;
    margin-top: 20px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--m-text);
  }

  .drawer__socials {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
  }

  .drawer__socials a {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
  }

  .drawer__socials a[aria-label="Телефон"],
  .drawer__socials a[href^="tel:"] {
    border-radius: 50%;
  }

  .drawer__socials img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
  }

  /* Hide old accordion expanders inside drawer on mobile */
  .drawer .sidebar__expand,
  .drawer .sidebar__sub,
  .drawer .sidebar__count,
  .drawer .sidebar__divider,
  .drawer .drawer__nav .sidebar__row {
    display: none !important;
  }

  /* ——— Catalog drilldown panel ——— */

  .m-panel {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 56;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    background: #fff;
    flex-direction: column;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: calc(var(--m-bottom-h) + env(safe-area-inset-bottom, 0px));
    transform: translateX(100%);
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
  }

  .m-panel.is-open {
    display: flex;
    transform: translateX(0);
    pointer-events: auto;
  }

  .m-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 0.5px solid rgba(169, 169, 169, 0.5);
  }

  .m-panel__title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .m-panel__back,
  .m-panel__close {
    width: 28px;
    height: 28px;
    border-radius: 15px;
    background: var(--m-gray);
    border: 0.5px solid var(--m-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .m-panel__back img,
  .m-panel__close img {
    width: 20px;
    height: 20px;
  }

  .m-panel__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--m-text);
  }

  .m-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px 24px;
  }

  .m-panel__all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--m-blue-soft);
    border: 0.5px solid var(--m-blue-dark);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
    color: var(--m-blue-dark);
    text-decoration: none;
  }

  .m-panel__all-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .m-panel__all-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: var(--m-blue-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .m-panel__all-icon img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
  }

  .m-panel__all-title {
    font-size: 14px;
    font-weight: 700;
  }

  .m-panel__all-sub {
    font-size: 10px;
    font-weight: 500;
  }

  .m-panel__section {
    font-size: 10px;
    font-weight: 600;
    color: var(--m-text);
    text-transform: uppercase;
    margin: 8px 0;
  }

  .m-panel__brand {
    display: flex;
    gap: 10px;
    margin-top: 16px;
  }

  .m-panel__brand .search {
    flex: 1;
    background: #fff;
    border: 0.5px solid var(--m-border);
    border-radius: 6px;
    height: 40px;
  }

  .m-panel__brand-btn {
    width: 56px;
    height: 40px;
    border-radius: 6px;
    background: var(--m-blue-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .m-panel__brand-btn img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
  }

  .m-panel__section {
    font-size: 10px;
    font-weight: 600;
    color: var(--m-text);
    text-transform: none;
    margin: 16px 0 8px;
  }

  .product-card__actions {
    flex-direction: row;
    gap: 6px;
  }

  .product-card__actions .btn {
    flex: 1;
    width: auto;
    padding: 0 6px;
    font-size: 11px;
  }


  /* ——— Home mobile content (Figma 3709:3020) ——— */

  .content {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .page-main .container {
    max-width: none;
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .layout {
    display: block;
  }

  .hero-slider {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    margin: 0;
  }

  .hero-slider__viewport {
    border-radius: 10px;
    overflow: hidden;
  }

  .hero {
    position: relative;
    display: block;
    border-radius: 10px;
    min-height: 200px;
    height: 200px;
    padding: 14px 16px 36px;
    overflow: hidden;
    gap: 0;
  }

  .hero__text {
    position: relative;
    z-index: 2;
    max-width: min(210px, 56%);
    gap: 8px;
  }

  .hero__title {
    font-size: 15px !important;
    font-weight: 700;
    line-height: 1.25;
    max-width: none;
  }

  .hero__title br {
    display: none;
  }

  .hero__list {
    font-size: 11px;
    font-weight: 600;
    color: #ababab;
    gap: 4px;
  }

  .hero__list li {
    gap: 6px;
    line-height: 1.25;
    align-items: flex-start;
  }

  .hero__list .icon-check,
  .hero__list img.icon-check {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 1px;
  }

  .hero__price {
    font-size: 14px;
    line-height: 1.3;
    margin: 0;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 4px;
    font-size: 11px;
    line-height: 1.3;
  }

  .hero .btn--light,
  .hero .btn--telegram {
    width: auto;
    min-width: 126px;
    max-width: 100%;
    padding: 7px 12px;
    font-size: 12px;
    line-height: 1.2;
    border-radius: 6px;
    background: #0084eb;
    color: #fff;
    border: 0;
    margin-top: 2px;
  }

  /* Product image — right side, large enough to read */
  .hero__image,
  .hero__media {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 54%;
    margin: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    pointer-events: none;
  }

  .hero__image::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 42%;
    background: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 2;
    pointer-events: none;
  }

  .hero--telegram .hero__image::before {
    background: linear-gradient(90deg, #1a3a5c 0%, rgba(26, 58, 92, 0) 100%);
  }

  .hero__image img,
  .hero picture,
  .hero picture img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: 72% center;
  }

  .hero picture {
    width: 100%;
    height: 100%;
  }

  /* Equipment slide: focus on scanners cluster */
  .hero:not(.hero--software):not(.hero--telegram) .hero__image img {
    object-fit: cover;
    object-position: 78% 45%;
    transform: scale(1.08);
    transform-origin: right center;
  }

  /* Software slide: tablet readable, contained */
  .hero--software .hero__image {
    width: 50%;
    padding: 10px 6px 10px 0;
  }

  .hero--software .hero__image img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    object-position: center right;
    transform: none;
  }

  /* Telegram slide — only iPhone, large & readable */
  .hero--telegram .hero__image {
    width: 48%;
    align-items: center;
    justify-content: flex-end;
    padding: 6px 4px 6px 0;
  }

  .hero--telegram .hero__image::before {
    width: 24%;
    background: linear-gradient(90deg, #1a3a5c 0%, rgba(26, 58, 92, 0) 100%);
  }

  .hero--telegram .hero__image-stack {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    width: 100%;
  }

  .hero--telegram .hero__tg-icon {
    display: none;
  }

  .hero--telegram .hero__image img,
  .hero--telegram .hero__tg-phone {
    width: auto !important;
    height: 96% !important;
    max-height: 200px !important;
    max-width: 110px !important;
    object-fit: contain !important;
    object-position: center right !important;
    transform: none !important;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
  }

  .hero-slider__controls {
    position: absolute;
    left: 16px;
    bottom: 10px;
    right: auto;
    margin: 0;
    z-index: 3;
    gap: 8px;
  }

  .hero-slider__arrow {
    display: none;
  }

  .hero-slider__dots {
    gap: 5px;
  }

  .hero-slider__dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.35);
  }

  .hero-slider__dot.is-active {
    width: 14px;
    background: #fff;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 6px;
  }

  .product-card {
    border-radius: 8px;
    border: 0.5px solid var(--m-border);
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 230px;
  }

  .product-card__media {
    height: 118px;
    background: #fff;
    position: relative;
  }

  .product-card__media > a img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
  }

  .product-card__body {
    background: #f2f2f2;
    border-top: 0.5px solid #b6b6b6;
    padding: 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-radius: 0 0 6px 6px;
  }

  .product-card__title {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--m-text);
  }

  .product-card__title a {
    color: inherit;
    text-decoration: none;
  }

  .product-card__subtitle,
  .product-card__delivery,
  .product-card__rating,
  .product-card__tags {
    display: none !important;
  }

  .product-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 9px;
    color: #6e6e6e;
  }

  .product-card__stock {
    color: #3b7000;
    font-size: 10px;
    font-weight: 600;
  }

  .product-card__price {
    font-size: 15px;
    font-weight: 700;
    color: var(--m-text);
  }

  .product-card__price svg {
    display: none;
  }

  .product-card__actions {
    flex-direction: row !important;
    gap: 6px;
    margin-top: auto;
  }

  .product-card__actions .btn {
    flex: 1;
    width: auto !important;
    height: 22px;
    min-height: 22px;
    padding: 0 6px !important;
    font-size: 11px !important;
    border-radius: 4px;
    line-height: 22px;
  }

  .product-card__actions .btn--primary {
    background: #2f2f2f;
    border-color: #2f2f2f;
    color: #fff;
  }

  .product-card__actions .btn--secondary {
    background: #fff;
    border: 0.5px solid var(--m-border);
    color: var(--m-text);
  }

  .product-card__badge {
    font-size: 7px;
    height: 12px;
    line-height: 12px;
    padding: 0 6px;
    border-radius: 44px;
  }

  .product-card__badge--new {
    background: #a9d9ff;
    color: #00447f;
  }

  .product-card__badge--hit {
    background: #ff7878;
    color: #620000;
  }

  .btn--wishlist {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: 0.5px solid var(--m-border);
  }

  .btn--wishlist img,
  .btn--wishlist svg {
    width: 20px;
    height: 20px;
  }

  .section-head {
    margin-top: 16px;
    margin-bottom: 10px;
    align-items: center;
  }

  .section-title {
    font-size: 14px !important;
    font-weight: 700;
    color: var(--m-text);
  }

  .section-head .btn--text {
    font-size: 12px;
    font-weight: 600;
    color: var(--m-muted);
  }

  .m-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 16px 0;
  }

  .m-info-tile {
    border-radius: 12px;
    padding: 14px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--m-text);
    text-decoration: none;
    min-height: 72px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
  }

  .m-info-tile img {
    width: 20px;
    height: 20px;
  }

  .m-picker {
    display: block;
    margin: 14px 0 0;
    padding: 0;
    border-radius: 10px;
    background: #c7e6ff;
    height: 82px;
    position: relative;
    overflow: hidden;
  }

  .m-picker__title {
    margin: 0;
    padding: 14px 15px 0;
    font-size: 12px;
    font-weight: 700;
    color: #00457d;
  }

  .m-picker__form {
    display: flex;
    gap: 10px;
    padding: 10px 15px 14px;
  }

  .m-picker__input {
    flex: 1;
    height: 36px;
    border-radius: 8px;
    border: 0;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 500;
    background: #fff;
    color: var(--m-text);
  }

  .m-picker__btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 69, 125, 0.12);
  }

  .m-picker__btn img {
    width: 16px;
    height: 16px;
    filter: none;
  }

  .product-card {
    border-radius: 8px;
    border: 0.5px solid var(--m-border);
    overflow: hidden;
  }

  .product-card__media {
    height: 118px;
    background: #fff;
  }

  .product-card__body {
    background: #f2f2f2;
    border-top: 0.5px solid #b6b6b6;
    padding: 8px;
  }

  .product-card__title {
    font-size: 12px;
    font-weight: 600;
  }

  .product-card__price {
    font-size: 15px;
    font-weight: 700;
  }

  .product-card__actions .btn--primary {
    background: #2f2f2f;
    border-color: #2f2f2f;
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    padding: 6px 4px;
  }

  .product-card__actions .btn--secondary {
    background: #fff;
    border: 0.5px solid var(--m-border);
    border-radius: 4px;
    font-size: 11px;
    padding: 6px 4px;
  }

  .section-head .btn--text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
  }

  .promo--telegram {
    position: relative;
    overflow: hidden;
  }

  .promo--telegram .promo__image--phone {
    position: absolute;
    right: 8px;
    bottom: 8px;
    top: auto;
    left: auto;
    transform: none;
    margin: 0;
    width: auto;
    height: auto;
    max-height: none;
    display: flex;
    align-items: flex-end;
    z-index: 1;
    pointer-events: none;
  }

  .promo__tg-icon {
    display: none;
  }

  .promo__tg-phone {
    width: auto;
    height: auto;
    max-width: 108px;
    max-height: 176px;
    object-fit: contain;
    object-position: bottom right;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.3));
  }

  .m-only {
    display: block;
  }

  .m-videos,
  .m-articles-desktop,
  .m-review {
    display: none !important;
  }

  .content-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .content-tile {
    min-height: 0;
    border-radius: 10px;
  }

  .content-tile__media {
    aspect-ratio: 352 / 200;
  }

  .content-tile__body {
    padding: 12px;
    gap: 3px;
  }

  .content-tile__title {
    font-size: 13px;
  }

  .content-tile__meta {
    font-size: 11px;
  }

  .content-tile--review {
    grid-column: 1 / -1;
    aspect-ratio: auto;
    min-height: 0;
    height: auto;
    padding: 14px 14px 16px;
    gap: 10px;
  }

  .content-tile--media:hover .content-tile__media img {
    transform: none;
  }

  .review-card__text {
    -webkit-line-clamp: 6;
  }

  .trust-section .section-head {
    margin-bottom: 10px;
  }

  .trust-section .section-title {
    font-size: 14px;
    letter-spacing: -0.28px;
  }

  .trust {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .trust__card {
    min-height: 72px;
    padding: 12px;
    border-radius: 10px;
    align-items: flex-start;
  }

  .trust__logo {
    width: 36px;
    height: 36px;
    margin: 0;
    flex-shrink: 0;
  }

  .trust__body {
    gap: 3px;
  }

  .trust__title {
    font-size: 12px;
    font-weight: 600;
  }

  .trust__stars {
    width: 48px;
    height: 8px;
  }

  .trust__text {
    font-size: 11px;
    gap: 4px;
  }

  .hero-slider__arrow {
    display: none;
  }

  .footer__socials,
  .footer__socials--mobile-only {
    display: flex;
    gap: 10px;
    margin-top: 12px;
  }

  .footer__socials img,
  .footer__socials--mobile-only img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
  }

  .m-info-tile--green { background: #e1f5ee; }
  .m-info-tile--blue { background: var(--m-blue-soft); }
  .m-info-tile--peach { background: #faeeda; }
  .m-info-tile--teal { background: #e0f2f1; }

  .m-ratings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 16px 0;
  }

  .m-rating-card {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
  }

  .m-rating-card img {
    height: 24px;
    width: auto;
    margin-bottom: 8px;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .site-footer {
    padding-bottom: 24px;
  }

  /* Product / cart mobile */
  .product-layout,
  .cart-layout,
  .contacts-layout {
    grid-template-columns: 1fr;
  }

  .product-gallery__stage {
    height: min(72vw, 360px);
    min-height: 260px;
  }

  .product-gallery__stage > img {
    max-width: 88%;
    max-height: 90%;
  }

  .buybox {
    padding: 16px;
    border-radius: 14px;
  }

  .buybox h1 {
    font-size: 22px;
  }

  .buybox__subtitle {
    font-size: 16px;
  }

  .buybox__sku {
    font-size: 14px;
  }

  .buybox__tags .tag {
    padding: 6px 10px;
    font-size: 12px;
  }

  .buybox__installment {
    padding: 11px 12px;
    border-radius: 12px;
    min-height: 48px;
    gap: 10px;
  }

  .buybox__pay {
    min-width: 0;
  }

  .buybox__installments strong {
    font-size: 13px;
  }

  .buybox__installment.is-selected {
    background: var(--m-blue-soft);
    border-color: var(--m-blue-dark);
    box-shadow: inset 0 0 0 1px rgba(28, 92, 141, 0.1);
    color: var(--m-blue-dark);
  }

  .buybox__installment.is-selected:hover,
  .buybox__installment.is-selected:active {
    background: #d4e8f7;
    border-color: var(--m-blue);
  }

  .buybox__installment.is-selected .buybox__pay,
  .buybox__installment.is-selected strong {
    color: var(--m-blue-dark);
  }

  .buybox__installment-mark {
    width: 20px;
    height: 20px;
    border-radius: 4px;
  }

  .buybox__installment.is-selected .buybox__installment-mark {
    background: var(--m-blue);
    border-color: var(--m-blue);
  }

  .buybox__installments-more a {
    color: var(--m-blue);
  }

  .buybox__installments-more a:hover {
    color: var(--m-blue-dark);
  }

  .buybox__price {
    font-size: 26px;
  }

  /* Figma buybox buttons: row + full-width expert */
  .buybox__toolbar {
    display: none;
  }

  .buybox__actions {
    display: flex;
    flex-direction: row;
    gap: 6px;
    width: 100%;
  }

  .buybox__actions .btn--primary,
  .buybox__actions .btn--secondary {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    height: 40px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 20px;
    white-space: nowrap;
  }

  .buybox__actions .btn--primary {
    background: #1a1917;
    border-color: #1a1917;
    color: #fff;
    font-weight: 600;
  }

  .buybox__actions .btn--secondary {
    background: #fff;
    border: 1px solid #e0ded9;
    color: #1a1917;
    font-weight: 400;
  }

  .buybox > .btn--outline {
    width: 100%;
    min-height: 40px;
    height: 40px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #e0ded9;
    background: #fff;
    color: #5f5e5a;
    font-size: 13px;
    font-weight: 400;
    line-height: 20px;
  }

  .cart-item,
  .fav-row {
    flex-wrap: wrap;
  }
}

@media (min-width: 768px) {
  .m-bottom-nav,
  .m-header-actions,
  .m-search,
  .m-info-grid,
  .m-videos,
  .m-ratings,
  .m-panel,
  .m-picker,
  .m-review,
  .m-only,
  .m-articles-desktop {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .benefits {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .promo--dark,
  .promo--telegram {
    position: relative;
    border-radius: 10px;
    padding: 16px 16px 18px;
    min-height: 176px;
    overflow: hidden;
  }

  .promo__content {
    position: relative;
    z-index: 2;
    max-width: min(200px, 54%);
    gap: 8px;
  }

  .promo__title {
    font-size: 15px;
    line-height: 1.25;
  }

  .promo__list {
    gap: 6px;
  }

  .promo__list li {
    font-size: 11px;
    line-height: 1.3;
    gap: 6px;
  }

  .promo__list img {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }

  .promo__price {
    font-size: 14px;
    line-height: 1.3;
  }

  .promo__grid {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 4px;
    font-size: 11px;
    line-height: 1.3;
  }

  .promo--dark .promo__image {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 48%;
    height: 88%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    pointer-events: none;
  }

  .promo--dark .promo__image::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 40%;
    background: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
    pointer-events: none;
  }

  .promo--dark .promo__image img {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    object-position: center right;
  }

  .promo--telegram::after {
    content: "";
    position: absolute;
    right: 40%;
    top: 0;
    bottom: 0;
    width: 28%;
    background: linear-gradient(90deg, #1a3a5c 0%, rgba(26, 58, 92, 0) 100%);
    z-index: 1;
    pointer-events: none;
  }

  .promo--dark .btn--banner,
  .promo--telegram .btn--telegram {
    width: auto;
    min-width: 126px;
    padding: 7px 12px;
    font-size: 12px;
    border-radius: 6px;
  }

  .promo--telegram .promo__content {
    max-width: min(190px, 52%);
  }

  .trust {
    gap: 6px;
  }

  .trust__card {
    border-radius: 10px;
    padding: 12px;
    min-height: 72px;
    align-items: flex-start;
  }

  .trust__title {
    font-size: 12px;
    font-weight: 600;
  }

  .trust__text {
    font-size: 10px;
  }

  .trust__logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
  }

  .trust__stars {
    width: 48px;
    height: 8px;
  }

  .site-footer {
    background: var(--m-footer);
    padding: 24px 0 calc(24px + var(--m-bottom-h));
  }

  .footer__phone {
    font-size: 20px;
    font-weight: 700;
  }

  .footer__socials img {
    width: 28px;
    height: 28px;
  }

  .m-badge--green {
    background: #145100;
  }

  /* Hide second product grid density a bit */
  #more-title {
    font-size: 14px;
  }

  /* Personal cabinet */
  .cabinet {
    gap: 12px;
  }

  .cabinet-user {
    padding: 16px;
  }

  .cabinet-user__avatar {
    width: 56px;
    height: 56px;
    border-radius: 28px;
    font-size: 20px;
  }

  .cabinet-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .cabinet-nav__item {
    border-right: 1px solid var(--m-border, #e0ded9);
  }

  .cabinet-nav__item:nth-child(2n) {
    border-right: none;
  }

  .cabinet-nav__item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--m-border, #e0ded9);
  }

  .cabinet-nav__item:nth-child(n + 3) {
    border-bottom: none;
  }

  .cabinet-panel {
    padding: 14px;
  }

  .cabinet-panel__title {
    font-size: 15px;
    margin-bottom: 12px;
  }

  .order-card {
    padding: 12px;
  }

  .order-card__foot {
    flex-direction: column;
    align-items: stretch;
  }

  .order-card__actions {
    width: 100%;
  }

  .order-card__btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .m-icon-btn--profile.is-active {
    box-shadow: inset 0 0 0 1.5px #145100;
  }
}
