/* ============================================================
   MOBILE.CSS: dock navigation + mobile layouts (max-width: 768px)
   ============================================================ */

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

.nav__phone, .dock, .msheet, .msheet-overlay, .filter-label, .filter-label-row, .filter-summary, .dots, .seg-m { display: none; }
.dock__badge.is-hidden { display: none; }
.contacts-link-item { display: flex; align-items: center; gap: 12px; }
.contacts-link-item svg { width: 20px; height: 20px; flex-shrink: 0; }

@media (max-width: 768px) {
  :root { --dock-space: calc(88px + env(safe-area-inset-bottom)); }

  .container { padding-inline: 20px; }
  .section-title .t-serif, .section-title strong, .hero__title .t-serif, .hero__title strong { display: block; }
  h2 strong { margin-left: 0; }
  .section-title { font-size: clamp(28px, 8vw, 34px); line-height: 1.1; }

  /* Top pill */
  .header { top: max(12px, env(safe-area-inset-top)); padding: 0 12px; }
  .nav { height: 56px; padding: 0 4px 0 18px; border-radius: 999px; }
  .nav__links, .nav__btn-wish, #cartBtn { display: none !important; }
  .nav__logo { height: 38px; }
  .nav__phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
  }
  .nav__phone svg { width: 22px; height: 22px; }
  .help-fab { display: none; }

  /* Floating dock */
  .dock {
    display: flex;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 95;
    height: 64px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .15);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
  }
  .has-buybar .dock { display: none; }
  .dock__ind {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-radius: 999px;
    background: linear-gradient(rgba(34, 34, 34, .94), rgba(8, 8, 8, .9));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 16px rgba(0, 0, 0, .18);
    opacity: 0;
    transition: transform .35s var(--ease), width .35s var(--ease), opacity .2s var(--ease);
    pointer-events: none;
  }
  .dock__item {
    position: relative;
    z-index: 1;
    flex: 1 1 0;
    min-width: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: none;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 11px;
    line-height: 1;
    color: rgba(17, 17, 17, .7);
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .dock__item svg { width: 22px; height: 22px; }
  .dock__item.is-active { color: #fff; }
  .dock__badge {
    position: absolute;
    top: 6px;
    left: calc(50% + 4px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .footer { padding-bottom: var(--dock-space); }
  .has-buybar .footer { padding-bottom: 0; }
  .toast { bottom: calc(var(--dock-space) + 8px); }

  /* Menu sheet */
  .msheet-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(17, 17, 17, .5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease);
  }
  .msheet-overlay.is-active { opacity: 1; pointer-events: auto; }
  .msheet {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 40px;
    z-index: 1101;
    background: #fff;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, .12);
    transform: translateY(100%);
    visibility: hidden;
    transition: transform .35s var(--ease), visibility 0s .35s;
  }
  .msheet.is-open { transform: none; visibility: visible; transition: transform .35s var(--ease); }
  .msheet__handle { flex-shrink: 0; width: 44px; height: 5px; margin: 10px auto 0; border-radius: 3px; background: rgba(0, 0, 0, .18); }
  .msheet__head { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 8px 20px 4px 20px; }
  .msheet__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1; }
  .msheet__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 20px 16px; }
  .msheet__label { margin: 12px 0 10px; font-family: var(--font-ui); font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .msheet__tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .msheet__tile {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 96px;
    padding: 14px 52px 14px 16px;
    border-radius: 20px;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 22px;
    line-height: 1.1;
    text-decoration: none;
    transition: scale .15s var(--ease);
  }
  .msheet__tile:active { scale: .98; }
  .msheet__tile-go { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; font-style: normal; }
  .msheet__tile-go svg { width: 14px; height: 14px; }
  .msheet__tile.is-current { background: #111; color: #fff; }
  .msheet__tile.is-current .msheet__tile-go { background: rgba(255, 255, 255, .16); }
  .msheet__rows { list-style: none; margin: 0; padding: 0; }
  .msheet__rows li { border-bottom: 1px solid var(--line); }
  .msheet__rows li:last-child { border-bottom: 0; }
  .msheet__row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 56px;
    padding: 0;
    background: none;
    border: 0;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 16px;
    color: var(--ink);
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
  }
  .msheet__row span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .msheet__row svg { width: 22px; height: 22px; flex-shrink: 0; }
  .msheet__row svg:last-child { width: 18px; height: 18px; color: var(--muted); }
  .msheet__foot { flex-shrink: 0; padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
  .msheet__phone { display: block; margin-bottom: 12px; font-family: var(--font-ui); font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
  .msheet__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .msheet__btns .btn { width: 100%; min-height: 52px; padding: 0 12px; }
  .msheet__addr { margin: 12px 0 0; font-family: var(--font-ui); font-size: 13px; line-height: 1.4; color: var(--muted); }

  /* Drawers sit above everything on mobile */
  .page-title-block { padding-top: 92px; }

  /* Dots */
  .dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
  .dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(0, 0, 0, .2); transition: transform .25s var(--ease), background-color .25s var(--ease); }
  .dots span.is-active { background: #111; transform: scale(1.5); }

  /* Hero */
  .hero { min-height: 0; padding-top: 92px; padding-bottom: 12px; gap: 24px; }
  .hero__title .t-serif { font-size: clamp(40px, 12vw, 52px); }
  .hero__title strong { font-size: clamp(32px, 9.6vw, 42px); }
  .hero__subtitle { font-size: 17px; margin: 14px 0 22px; }
  .hero__actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero__actions .btn { width: 100%; min-height: 52px; }
  .hero__facts { margin-top: 18px; gap: 8px; }
  .hero__fact-divider { display: none; }
  .hero__fact-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px 0 12px;
    border-radius: 999px;
    background: var(--surface);
    font-size: 13px;
    white-space: normal;
  }
  .hero__fact-item::before { content: ""; width: 5px; height: 9px; margin-top: -3px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); flex-shrink: 0; }
  .hero__card { border-radius: 28px; }
  .hero__clip { border-radius: 28px; }
  .hero__price-card { left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; padding: 14px 18px; }
  .hero__loc-card { left: 12px; right: auto; top: 12px; bottom: auto; padding: 8px 14px; border-radius: 999px; }
  .hero__loc-label, .hero__loc-caption { display: none; }

  /* Ribbon */
  .ribbon-wrap { padding-block: 20px; }
  .ribbon { height: 44px; }
  .ribbon__item { font-size: 12px; }

  /* Featured carousel */
  .section-header-row { flex-direction: column; align-items: flex-start; gap: 0; margin-bottom: 20px; }
  .section-all-link { min-height: 48px; }
  .featured__grid, .bento-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    margin-inline: -20px;
    padding-inline: 20px;
    scroll-padding-inline: 20px;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .featured__grid::-webkit-scrollbar, .bento-grid::-webkit-scrollbar { display: none; }
  .featured__grid .pcard { flex: 0 0 72%; scroll-snap-align: start; }

  /* Collections carousel */
  .bento-card { flex: 0 0 82%; height: auto; aspect-ratio: 4 / 5; scroll-snap-align: start; }
  .bento-card__panel { left: 12px; right: 12px; bottom: 12px; padding: 16px; flex-direction: column; align-items: stretch; gap: 10px; }
  .bento-card__name, .bento-card--1 .bento-card__name { font-size: 28px; line-height: 1.1; }
  .bento-card__materials { font-size: 13px; }
  .bento-card__meta { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .bento-card__price { white-space: nowrap; font-size: 15px; }
  .bento-card__arrow { width: 48px; height: 48px; flex-shrink: 0; }


  /* Why */
  .why-card { padding: 24px 20px; }
  .why-columns { gap: 0; }
  .why-col { display: grid; grid-template-columns: 36px 1fr; column-gap: 14px; padding: 16px 0; }
  .why-col:last-child { padding-bottom: 0; }
  .why-num { grid-row: 1 / 3; align-self: start; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 12px; }
  .why-title { margin: 0; font-size: 16px; }
  .why-text { margin: 4px 0 0; font-size: 14px; }

  /* How to order: vertical stepper */
  .how__grid { display: flex; flex-direction: column; gap: 0; counter-reset: step; }
  .how-step { position: relative; flex-direction: row; align-items: flex-start; gap: 16px; padding: 0 0 28px; background: none; font-size: 16px; }
  .how-step::before { counter-increment: step; content: counter(step); width: 40px; height: 40px; border-radius: 50%; background: #111; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
  .how-step svg { display: none; }
  .how-step span { padding-top: 9px; }
  .how-step:not(:last-child)::after { content: ""; position: absolute; left: 19.5px; top: 46px; bottom: 6px; width: 1px; background: rgba(0, 0, 0, .15); }
  .how-step:last-child { padding-bottom: 0; }

  /* Contacts */
  .contacts-left { gap: 10px; }
  .contacts-links { gap: 10px; }
  .contacts-link-item { min-height: 56px; padding: 0 18px; border-radius: 24px; background: var(--surface); font-size: 16px; }
  .contacts-actions { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 4px; }
  .contacts-actions .btn { width: 100%; min-height: 52px; gap: 8px; }
  .map { aspect-ratio: auto; height: 240px; border-radius: 24px; }
  .map:not(.is-active) iframe { pointer-events: none; }

  /* Catalog filters: one surface */
  .filter-bar { position: static; transform: none; will-change: auto; view-transition-name: none; display: block; overflow: visible; border-radius: 24px; padding: 12px; margin-bottom: 4px; background: var(--surface); border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .filter-bar::before, .filter-bar::after { display: none; }
  .filter-label-row { display: flex; align-items: center; justify-content: space-between; height: 28px; margin-bottom: 6px; }
  .filter-clear { position: relative; height: 28px; min-width: 76px; margin-right: -6px; padding: 0 6px; background: none; border: 0; font-family: var(--font-ui); font-weight: 600; font-size: 13px; color: var(--ink); text-align: right; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; visibility: hidden; opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .25s ease, transform .25s ease, visibility 0s .25s; }
  .filter-clear::after { content: ""; position: absolute; inset: -10px -6px; }
  .filter-clear.is-on { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition: opacity .25s ease, transform .25s ease; }
  .filter-bar__groups { display: block; }
  .filter-bar__selects { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-left: 0; }
  .filter-label-row .filter-label { margin: 0; }
  .filter-label { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-family: var(--font-ui); font-weight: 600; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .filter-bar__selects .filter-label { grid-column: 1 / -1; margin-bottom: 0; }
  .filter-bar .seg-control { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; height: 48px; margin-bottom: 12px; background: #fff; }
  .filter-bar .seg-btn { width: 100%; min-width: 0; padding: 0; font-size: 13px; text-align: center; }
  .seg-d { display: none; }
  .seg-m { display: inline; }
  .filter-bar .filter-select { width: 100%; min-width: 0; padding: 0 34px 0 14px; background-position: right 14px center; font-size: 16px; }
  .filter-summary { display: flex; align-items: center; height: 48px; margin-bottom: 4px; font-family: var(--font-ui); font-size: 14px; color: var(--muted); }
  .page-title-block .catalog-count { display: none; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .catalog-grid .pcard__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; line-height: 1.3; }
  .catalog-grid .pcard__bottom { flex-wrap: wrap; gap: 2px 8px; }
  .catalog-grid .pcard__price { font-size: 16px; white-space: nowrap; }
  .pcard__quickview { display: none; }

  /* Product */
  .gallery__thumbs { display: none; }
  .dots--gallery { margin: 12px 0 4px; }
  .product-layout { gap: 20px; }
  .sizes-grid { gap: 8px; }
}

@media (max-width: 768px) {
  .filter-bar .seg-btn::after { content: ""; position: absolute; inset: -4px 0; }
}

@media (max-width: 768px) {
  .msheet__tiles + .msheet__label { margin-top: 22px; }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .filter-clear, .filter-clear.is-on { transition: none; }
}
