/* Mobile layouts use one clear text area, one image area and stable controls. */
@media (max-width: 600px) {
  :root { --studio-gap: 34px; }

  /* A sticky header must not change its geometry when the scroll state changes. */
  .site-header, .site-header.is-scrolled { padding-block: 0; overflow-x: clip; }
  .site-header.is-scrolled {
    background: #fffdf8;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .site-header .header-inner, .site-header.is-scrolled .header-inner {
    --mobile-contact-width: 84px;
    min-height: 58px; height: 58px; gap: 8px; padding-block: 0;
    transition: none;
  }
  .site-header .brand, .site-header.is-scrolled .brand {
    flex: 0 0 150px; width: 150px; height: 52px; transition: none;
  }
  .site-header .header-actions, .site-header.is-scrolled .header-actions { margin: 0; }

  /* Typographic menu control instead of the stock three-line icon. */
  .site-header .menu-toggle.icon-button {
    position: relative; display: block; flex: 0 0 auto;
    width: 83px; height: 38px; margin-left: auto;
    border: 1px solid rgba(0, 84, 97, .20); border-radius: 13px;
    background: #fffaf0; color: var(--teal); box-shadow: none;
    transform: none;
  }
  .site-header .menu-toggle::before {
    content: 'Меню'; position: absolute; left: 11px; top: 50%;
    transform: translateY(-50%); font-size: .78rem; font-weight: 750;
  }
  .site-header .menu-toggle span {
    position: absolute; right: 11px; width: 15px; height: 1.8px; margin: 0;
    border-radius: 5px; background: currentColor;
  }
  .site-header .menu-toggle span:first-child { top: 14px; }
  .site-header .menu-toggle span:nth-child(2) { top: 22px; width: 11px; }
  .site-header .menu-toggle[aria-expanded="true"] span:first-child { top: 18px; transform: rotate(45deg); }
  .site-header .menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 18px; width: 15px; transform: rotate(-45deg); }
  .site-header .main-nav, .site-header.is-scrolled .main-nav {
    grid-template-columns: 1fr; align-items: stretch; justify-content: stretch;
    gap: 0; padding: 11px 20px; background: #fffaf0;
  }
  .site-header .main-nav:not(.open) { visibility: hidden; transition: none; }
  .site-header .main-nav.open { visibility: visible; transition: transform .2s ease, opacity .2s ease; }
  .site-header .main-nav a, .site-header .main-nav a[href="kissel.html"] {
    display: block; width: 100%; margin: 0; padding: 12px 5px;
    border-bottom: 1px solid rgba(0, 84, 97, .10);
    text-align: left; transform: none;
  }
  .site-header .main-nav a:last-child { border-bottom: 0; }

  /* Anchor the contact control and its panel below the sticky header. */
  .site-header .header-contact, .site-header.is-scrolled .header-contact {
    position: absolute; top: calc(100% + 5px); right: 0; bottom: auto;
    z-index: 90; animation: none; translate: none;
  }
  .site-header .header-contact::before { width: 23px; height: 13px; top: -7px; right: 10px; }
  .site-header .header-contact:not(.is-open),
  .site-header.is-scrolled .header-contact:not(.is-open) {
    top: calc(100% + 5px); right: 0; bottom: auto;
    width: var(--mobile-contact-width); height: 38px; padding: 0;
    border-radius: 22px;
  }
  .site-header .header-contact:not(.is-open) .header-contact-toggle {
    display: flex; align-items: center; justify-content: center; gap: 3px;
    width: 100%; height: 100%; border-radius: inherit;
    padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer;
  }
  .site-header .header-contact:not(.is-open) .header-contact-toggle svg {
    display: block; width: 14px; height: 14px;
  }
  .site-header .header-contact:not(.is-open) .header-contact-toggle::before {
    content: 'Связаться'; order: 1; font-size: .70rem; font-weight: 800; letter-spacing: -.01em;
  }
  .site-header .header-contact:not(.is-open) .header-contact-title,
  .site-header .header-contact:not(.is-open) .header-contact-actions { display: none; }
  .site-header .header-contact.is-open,
  .site-header.is-scrolled .header-contact.is-open {
    top: calc(100% + 5px); right: 0; bottom: auto;
    width: 202px; height: 89px; padding: 9px 9px 10px;
    border-radius: 20px;
  }
  .site-header .header-contact.is-open .header-contact-title { padding-inline-start: 7px; }
  .site-header .header-contact.is-open .header-contact-toggle {
    display: grid; place-items: center;
    position: absolute; inset: 5px 6px auto auto;
    width: 29px; height: 29px; border: 0; background: transparent; color: inherit;
  }
  .site-header .header-contact.is-open .header-contact-toggle svg { display: none; }
  .site-header .header-contact.is-open .header-contact-toggle::after {
    content: '×'; font-size: 1.5rem; font-weight: 400; line-height: 1;
  }
  .site-header .header-contact.is-open .header-contact-actions,
  .site-header.is-scrolled .header-contact.is-open .header-contact-actions {
    width: 100%; justify-content: space-between; gap: 0;
  }
  .site-header .header-contact.is-open .header-contact-action {
    width: 42px; height: 42px;
  }
  .site-header .header-contact.is-open .header-contact-action svg {
    width: 24px; height: 24px;
  }
  .site-header .header-contact.is-open .header-contact-action img {
    width: 22px; height: 22px;
  }

  /* On small screens image and copy are separate; no opaque veil over the photo. */
  .page-hero, .page-hero-stm, .page-hero-where {
    display: flex; flex-direction: column;
    min-height: 0; background: #fffaf0;
  }
  .page-hero::before, .page-hero-stm::before { display: none; }
  .page-hero .page-hero-copy,
  .page-hero-where .page-hero-copy,
  .page-hero-stm .page-hero-copy,
  .page-hero-about .page-hero-copy {
    order: 0; width: 100%; min-height: 0; padding: 34px 25px 28px;
    justify-content: flex-start;
  }
  .page-hero h1, .page-hero-about h1, .page-hero-stm h1 {
    font-size: clamp(2.5rem, 10vw, 3.2rem); line-height: 1.02;
  }
  .page-hero p:not(.eyebrow) { margin: 17px 0 22px; font-size: 1.04rem; }
  .page-hero .page-hero-image,
  .page-hero-stm .page-hero-image,
  .page-hero-about .page-hero-image {
    position: relative; inset: auto; left: auto; right: auto;
    order: 1; z-index: 0; display: block;
    width: 100%; max-width: none; height: clamp(240px, 65vw, 320px);
    object-fit: cover; object-position: center;
    filter: none; -webkit-mask-image: none; mask-image: none;
  }
  .page-hero-stm { background-image: none; }
  .page-hero-stm .page-hero-image { object-position: 58% center; }
  .page-hero-where .map-art {
    position: relative; inset: auto; order: 1;
    width: calc(100% - 32px); height: 240px; margin: 0 16px 16px;
    border-radius: 24px;
  }

  .partner-hero-copy { padding: 33px 25px 26px; }
  .partner-hero-copy > p { margin: 16px 0 20px; }
  .partner-hero-media { height: clamp(255px, 68vw, 340px); }
  .partner-brief {
    width: calc(100% - 30px); margin: 15px auto 17px;
    border: 1px solid rgba(0,84,97,.12); box-shadow: none;
    background: #fffbf3;
  }
  .partner-brief h2 { font-size: 1.45rem; }
  .partner-brief li { grid-template-columns: 75px minmax(0,1fr); }

  .kissel-partner-copy { padding: 34px 25px 26px; }
  .kissel-partner-copy > p:not(.eyebrow) { margin: 16px 0 22px; }
  .kissel-partner-visual { aspect-ratio: 1.45; }
  .kissel-partner-visual img { left: 0; width: 100%; object-position: 52% center; }

  /* Buttons stay next to their copy instead of stretching across a photo. */
  .hero .button, .page-hero .button, .partner-hero .button,
  .kissel-partner .button, .home-feature-copy .button, .locator-form .button {
    width: auto; min-width: 0; align-self: flex-start; justify-self: start;
    padding-inline: 20px;
  }
  .partner-panel-action { width: auto; }

  /* Keep both carousel panels in a stable frame as only their opacity changes. */
  .home-feature-carousel.kissel-banner.container { min-height: 710px; }
  .home-feature-carousel .home-feature-copy,
  .home-feature-carousel .home-feature-copy:not(.is-active) {
    position: absolute; top: 0; left: 0; right: auto;
    display: block; width: 100%; transform: none;
    padding: 36px 25px 0;
  }
  .home-feature-carousel .home-feature-copy:not(.is-active) {
    opacity: 0; visibility: hidden; pointer-events: none;
  }
  .home-feature-carousel .home-feature-media { background-size: 100% 100%, auto 48%; }
  .home-feature-carousel .home-feature-media--kvass {
    background-size: 100% 100%, auto 48%; background-position: center, 22% bottom;
  }
  .home-feature-controls {
    position: absolute; right: 18px; bottom: 15px; margin: 0;
    width: auto; padding: 3px; border-radius: 14px;
    background: rgba(255,250,240,.85);
  }

  /* Categories form a measured grid instead of uneven wrapping chips. */
  .catalog-sidebar-inner { padding: 18px 14px; }
  .catalog-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .catalog-filter {
    width: 100%; min-height: 49px; padding: 9px 11px;
    border-radius: 15px; line-height: 1.16; font-size: .78rem;
  }
  .catalog-filter:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .catalog-filter-count { min-width: 24px; padding: 3px 5px; }
  .product-specs-head h2 { font-size: clamp(1.85rem, 8vw, 2.4rem); }

  /* The last content block and the footer use the same interval as sections. */
  .site-footer { margin-top: var(--studio-gap); }

  /* Let the photograph run through each banner; a light haze protects the copy. */
  .hero .hero-visual {
    inset: 52% 0 0; height: 48%;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 13%);
    mask-image: linear-gradient(180deg, transparent, #000 13%);
  }
  .hero .hero-visual img { object-position: 52% top; }
  .hero .hero-copy { background: transparent; }
  .page-hero:not(.page-hero-where) {
    position: relative; display: block;
    min-height: clamp(600px, 155vw, 700px);
    background: #f7efdf;
  }
  .page-hero:not(.page-hero-where)::before {
    display: block; z-index: 1;
    background: linear-gradient(180deg,
      rgba(255,250,240,.88) 0%,
      rgba(255,250,240,.76) 36%,
      rgba(255,250,240,.2) 61%,
      transparent 82%);
  }
  .page-hero:not(.page-hero-where) .page-hero-image {
    position: absolute; inset: 0;
    width: 100%; height: 100%; z-index: 0;
    object-fit: cover; object-position: 62% center;
  }
  .page-hero-about .page-hero-image { object-position: 58% center; }
  .page-hero-stm .page-hero-image { object-position: 57% center; }
  .page-hero:not(.page-hero-where) .page-hero-copy {
    position: relative; z-index: 2;
    background: transparent;
  }
  .kissel-partner { background: #f8eee2; }
  .partner-hero-media {
    margin-top: -22px;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%);
    mask-image: linear-gradient(180deg, transparent, #000 14%);
  }
  .kissel-partner-visual {
    margin-top: -24px;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 16%);
    mask-image: linear-gradient(180deg, transparent, #000 16%);
  }

  /* Primary actions belong at the foot of the opening banners. */
  .hero.section-shell.container { min-height: 630px; height: 630px; }
  .hero .hero-copy { position: static; min-height: 0; padding: 27px 24px 0; }
  .hero .hero-visual {
    inset: 215px 12px auto; height: clamp(230px, 67vw, 260px);
    width: auto; border-radius: 19px;
    -webkit-mask-image: none; mask-image: none;
  }
  .hero .hero-visual img { object-position: 50% center; }
  .hero .button-row {
    position: absolute; left: 24px; right: 24px; bottom: 18px;
    z-index: 3; margin: 0; gap: 8px;
  }
  .page-hero:not(.page-hero-where) .page-hero-copy {
    min-height: clamp(600px, 155vw, 700px);
    padding-bottom: 24px;
  }
  .page-hero:not(.page-hero-where) .page-hero-copy > .button { margin-top: auto; }
  .page-hero-where { position: relative; min-height: 605px; display: block; }
  .page-hero-where .page-hero-copy {
    position: relative; z-index: 2; min-height: 605px;
    display: flex; flex-direction: column; padding-bottom: 23px;
  }
  .page-hero-where .map-art {
    position: absolute; top: 260px; left: 16px; right: 16px;
    width: calc(100% - 32px); height: 240px; margin: 0;
  }
  .page-hero-where .page-hero-copy > .button { margin-top: auto; }
  .kissel-partner { padding-bottom: 82px; }
  .kissel-partner-copy { position: static; }
  .kissel-partner-actions {
    position: absolute; z-index: 3; bottom: 19px; left: 24px;
    width: auto; margin: 0;
  }
  .partner-hero-copy { display: contents; }
  .partner-hero-copy h1 {
    order: 0; width: 100%; max-width: none;
    padding: 33px 25px 0;
  }
  .partner-hero-copy > p {
    order: 0; width: 100%; max-width: none;
    margin: 16px 0 22px; padding-inline: 25px;
  }
  .partner-hero-media { order: 1; }
  .partner-hero-actions {
    order: 2; width: 100%; padding: 18px 25px 8px;
  }
  .partner-brief { order: 3; margin-top: 10px; }
  body, body.page-leaving { animation: none; transition: none; opacity: 1; }
}

@media (max-width: 360px) {
  .catalog-filters { grid-template-columns: 1fr; }
  .catalog-filter:last-child:nth-child(odd) { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .home-feature-carousel .home-feature-media,
  .home-feature-carousel .home-feature-copy { transition: none; }
}

/* Full-size opening photography on phones. The outer banner remains one frame. */
@media (max-width: 600px) {
  .hero.section-shell.container,
  .page-hero:not(.page-hero-where),
  .kissel-partner,
  .partner-hero {
    min-height: max(640px, calc(100svh - 82px));
    border-radius: 30px;
    overflow: hidden;
  }

  .hero.section-shell.container { height: max(640px, calc(100svh - 82px)); }
  .hero.section-shell.container::before {
    display: block;
    background: linear-gradient(180deg,
      #fffaf0 0%, rgba(255,250,240,.98) 22%,
      rgba(255,250,240,.55) 38%, transparent 54%,
      transparent 74%, rgba(255,250,240,.74) 89%, #fffaf0 100%);
    -webkit-mask-image: none; mask-image: none;
  }
  .hero .hero-visual {
    inset: 190px 0 0; width: 100%; height: auto;
    border-radius: 0;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 15%);
    mask-image: linear-gradient(180deg, transparent, #000 15%);
  }
  .hero .hero-visual img { object-position: 46% center; }
  .hero .hero-copy { position: static; padding-top: 25px; }
  .hero .hero-copy > h1, .hero .hero-copy > .hero-lead { position: relative; z-index: 2; }
  .hero .button-row { bottom: 22px; }

  .page-hero:not(.page-hero-where) .page-hero-image {
    inset: 0; height: 100%; object-fit: cover;
  }
  .page-hero:not(.page-hero-where)::before {
    background: linear-gradient(180deg,
      rgba(255,250,240,.91) 0%, rgba(255,250,240,.66) 34%,
      transparent 62%, rgba(255,250,240,.55) 91%);
  }
  .page-hero:not(.page-hero-where) .page-hero-copy {
    min-height: max(640px, calc(100svh - 82px));
    padding-bottom: 24px;
  }

  .kissel-partner { display: block; padding: 0; }
  .kissel-partner::after {
    display: block;
    background: linear-gradient(180deg,
      #fffaf5 0%, rgba(255,250,245,.96) 22%,
      rgba(255,250,245,.46) 43%, transparent 62%,
      transparent 82%, rgba(255,250,245,.72) 100%);
  }
  .kissel-partner-visual {
    position: absolute; inset: 185px 0 0; width: 100%; height: auto;
    margin: 0; aspect-ratio: auto;
    -webkit-mask-image: none; mask-image: none;
  }
  .kissel-partner-visual img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: 42% center;
  }
  .kissel-partner-copy { position: static; }
  .kissel-partner-copy > .kissel-soon-badge,
  .kissel-partner-copy > h1,
  .kissel-partner-copy > p { position: relative; z-index: 2; }
  .kissel-partner h1 { font-size: clamp(2.25rem, 9.1vw, 2.8rem); }
  .kissel-partner-copy > p:not(.eyebrow) {
    max-width: 29ch; font-size: .95rem; line-height: 1.38;
  }
  .kissel-soon-badge { margin-bottom: 15px; font-size: .96rem; }
  .kissel-partner-actions { bottom: 21px; }

  .partner-hero {
    display: block; min-height: 0; overflow: visible;
    box-shadow: none;
    background: url('assets/partner-shelf-branded-v2.png') left center / auto 100% no-repeat;
  }
  .partner-hero-media {
    position: absolute; inset: 300px 0 auto; width: 100%;
    height: calc(max(640px, 100svh - 82px) - 300px); margin: 0;
    border-radius: 30px; overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg,transparent,#000 17%);
    mask-image: linear-gradient(180deg,transparent,#000 17%);
  }
  .partner-hero-media img { object-position: 55% center; }
  .partner-hero::after {
    display: block; z-index: 1; border-radius: 30px;
    height: max(640px, calc(100svh - 82px));
    background: linear-gradient(180deg,
      rgba(255,250,241,.85), rgba(255,250,241,.68) 31%,
      rgba(255,250,241,.16) 48%, transparent 72%,
      rgba(255,250,241,.34) 100%);
  }
  .partner-hero-copy { display: block; position: relative; z-index: 2; width: 100%;
    height: max(640px, calc(100svh - 82px)); padding: 32px 25px 24px;
  }
  .partner-hero-copy h1 { padding: 0; }
  .partner-hero-copy > p { padding: 0; margin: 16px 0 0; }
  .partner-hero-actions {
    position: absolute; left: 25px; right: 25px; bottom: 22px;
    width: auto; padding: 0;
  }
  .partner-brief { position: relative; z-index: 3; margin: 18px auto 0; }

  .page-hero-about .page-hero-copy > .button {
    margin-top: 23px !important;
  }

  .kissel-world {
    position: relative; display: block;
    min-height: max(640px, calc(100svh - 82px));
    overflow: hidden; background: #f8eee2;
  }
  .kissel-world::before {
    content: ''; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg,
      rgba(255,250,244,.88), rgba(255,250,244,.66) 32%,
      rgba(255,250,244,.15) 56%, transparent 76%);
    pointer-events: none;
  }
  .kissel-world-visual {
    position: absolute; inset: 0; width: 100%; height: 100%;
    min-height: 0; margin: 0;
  }
  .kissel-world-visual img {
    width: 100%; height: 100%; object-fit: cover; object-position: 63% center;
  }
  .kissel-world-copy { position: relative; z-index: 2; width: 100%; padding: 34px 25px; }
  .kissel-world h2 { font-size: clamp(2.4rem, 9.2vw, 2.9rem); }
  .kissel-world-lead { max-width: 30ch; margin: 16px 0 18px; font-size: .98rem; line-height: 1.42; }
  .kissel-world-actions { display: flex; flex-wrap: wrap; gap: 9px 17px; }

  .home-feature-carousel .home-feature-media,
  .home-feature-carousel .home-feature-media--kvass {
    background-size: 100% 100%, auto 70%;
    background-position: center, center bottom;
  }
  .home-feature-carousel .home-feature-media--kvass { background-position: center, 35% bottom; }
  .home-feature-carousel .home-feature-copy { height: 100%; }
  .home-feature-carousel .home-feature-copy.is-active > .button {
    position: absolute; left: 25px; bottom: 18px; z-index: 2;
  }
  .home-feature-controls { bottom: 77px; }

  .kissel-lines-grid {
    display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden;
    padding: 3px 4px 20px; scroll-snap-type: x mandatory;
    scroll-padding-inline: 4px; overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch; scrollbar-width: thin;
  }
  .kissel-line-card {
    flex: 0 0 min(78vw, 340px); scroll-snap-align: start;
  }
  .kissel-line-visual { height: 235px; }
  .kissel-lines-nav {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 12px; margin: -10px 2px 16px;
  }
  .kissel-lines-nav .bestsellers-arrow:disabled {
    opacity: .38;
    cursor: default;
    background: transparent;
    color: #005461;
    transform: none;
  }

  body[data-page="home"] .category-grid {
    grid-template-rows: 320px 225px 320px 225px;
  }
  body[data-page="home"] .category { padding: 20px 16px; }
  body[data-page="home"] .category-spices .category-label,
  body[data-page="home"] .category-kissel .category-label,
  body[data-page="home"] .category-drinks .category-label,
  body[data-page="home"] .category-catalog .category-label { font-size: 1.22rem; }
  body[data-page="home"] .category-detail { font-size: .75rem; line-height: 1.3; }
  body[data-page="home"] .category-open {
    display: inline-flex; align-items: center; gap: 6px;
    max-width: 100%; padding: 9px 8px; border-radius: 999px;
    font-size: .68rem; line-height: 1.12; white-space: nowrap;
  }
  body[data-page="home"] .category-open svg { flex: 0 0 18px; width: 18px; }
}

@media (min-width: 601px) {
  .kissel-lines-nav { display: none; }
}

@media (max-width: 360px) {
  .kissel-partner-actions { bottom: 70px; }
  .page-hero-stm .page-hero-copy > .button,
  .page-hero-where .page-hero-copy > .button { margin-bottom: 52px; }
  body[data-page="home"] .category-grid {
    grid-template-columns: 1fr; grid-template-rows: none;
  }
  body[data-page="home"] .category-bakery,
  body[data-page="home"] .category-soups { grid-column: 1; grid-row: auto; min-height: 310px; }
  body[data-page="home"] .category-spices,
  body[data-page="home"] .category-kissel,
  body[data-page="home"] .category-drinks,
  body[data-page="home"] .category-catalog { grid-column: 1; grid-row: auto; min-height: 180px; }
}

/* Compact product tiles and a shared action row on the homepage. */
@media (max-width: 600px) {
  body[data-page="home"] .category-grid {
    grid-template-rows: 320px 184px 320px 184px;
  }
  body[data-page="home"] .category-spices,
  body[data-page="home"] .category-kissel,
  body[data-page="home"] .category-drinks,
  body[data-page="home"] .category-catalog {
    padding: 18px 16px;
  }
  body[data-page="home"] .category-open,
  body[data-page="home"] .category-soups .category-open,
  body[data-page="home"] .category:hover .category-open,
  body[data-page="home"] .category:focus-visible .category-open {
    display: grid; place-items: center;
    width: 44px; height: 44px; min-height: 44px;
    padding: 0; gap: 0;
  }
  body[data-page="home"] .category-open svg {
    flex: none; width: 23px; height: 23px;
  }
  body[data-page="home"] .category-open-text { display: none; }

  .home-feature-carousel .home-feature-copy.is-active > .button {
    left: 18px; bottom: 18px;
    min-height: 43px; padding: 0 14px;
    font-size: .84rem;
  }
  .home-feature-controls {
    right: 17px; bottom: 18px;
    padding: 0; gap: 2px; background: transparent;
  }
  .home-feature-arrow { width: 37px; height: 43px; }
  .home-feature-arrow svg { width: 25px; height: 18px; }

  .partner-hero {
    background: #f7efe3;
    overflow: hidden;
  }
  .partner-hero-media {
    top: 310px; bottom: 0; left: 0; right: 0;
    height: auto; border-radius: 0;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%);
    mask-image: linear-gradient(180deg, transparent, #000 14%);
  }
  .partner-hero-media img { object-position: 63% center; }
  .partner-hero::after {
    background: linear-gradient(180deg,
      #fffaf1 0%, rgba(255,250,241,.96) 33%,
      rgba(255,250,241,.42) 50%, transparent 68%);
  }
  .partner-brief { margin-top: 18px; }
}

@media (max-width: 360px) {
  body[data-page="home"] .category-grid { grid-template-rows: none; }
  body[data-page="home"] .category-spices,
  body[data-page="home"] .category-kissel,
  body[data-page="home"] .category-drinks,
  body[data-page="home"] .category-catalog { min-height: 172px; }
  .home-feature-carousel .home-feature-copy.is-active > .button {
    font-size: .74rem; padding-inline: 10px;
  }
  .home-feature-arrow { width: 32px; }
  .partner-hero-media { top: 330px; }
}

/* Mobile carousel, contact control and footer share the same compact rhythm. */
@media (max-width: 600px) {
  .bestsellers {
    padding: 24px 16px 21px;
  }
  .bestsellers-head {
    flex-direction: row; align-items: center; justify-content: space-between;
    gap: 7px; margin-bottom: 8px;
  }
  .bestsellers-head h2 {
    font-size: clamp(1.65rem, 7.2vw, 2rem);
    white-space: nowrap;
  }
  .bestsellers-controls {
    align-self: center; gap: 4px;
  }
  .bestsellers-controls > span { min-width: 38px; font-size: .67rem; }
  .bestsellers-arrow { width: 29px; height: 38px; padding: 0; }
  .bestsellers-arrow svg { width: 25px; height: 19px; }
  .bestsellers-arrow > span { display: none; }
  .bestsellers-track { height: 218px; }
  .bestsellers-track { perspective: none; transform-style: flat; }
  .bestseller-card { width: 166px; height: 205px; transform-style: flat; will-change: auto; }
  .bestseller-card[data-position="0"] { transform: translateX(-50%); }
  .bestseller-card[data-position="-1"] {
    opacity: .65; transform: translateX(calc(-50% - 147px)) scale(.78);
  }
  .bestseller-card[data-position="1"] {
    opacity: .65; transform: translateX(calc(-50% + 147px)) scale(.78);
  }
  .bestseller-card[data-position="-2"],
  .bestseller-card[data-position="2"] { opacity: 0; pointer-events: none; }
  .bestsellers-feature { gap: 7px; }
  .bestsellers-feature > strong { font-size: 1rem; }

  .site-footer { padding-bottom: 64px; }
  .site-footer .footer-main {
    display: grid; grid-template-columns: minmax(0,1fr);
    row-gap: 8px; padding-top: 14px;
  }
  .site-footer .footer-brand {
    grid-column: 1; grid-row: 1;
    width: 178px; height: 58px;
  }
  .site-footer .footer-nav {
    grid-column: 1; grid-row: 2;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0 12px; width: 100%; margin: 0;
    font-size: .81rem;
  }
  .site-footer .footer-nav a { padding: 5px 0; }
  .site-footer .footer-bottom {
    display: grid; grid-template-columns: minmax(0,1fr) 58px;
    align-items: end; column-gap: 10px; row-gap: 4px;
    margin-top: 10px; padding-top: 10px;
    font-size: .68rem; line-height: 1.35;
  }
  .site-footer .footer-bottom > p:first-of-type { grid-column: 1 / -1; grid-row: 1; }
  .site-footer .footer-legal { grid-column: 1; grid-row: 2; flex-direction: column; align-items: flex-start; gap: 1px; }
  .site-footer .footer-bottom > p:nth-of-type(2) { grid-column: 1; grid-row: 3; }
  .site-footer .footer-developer { grid-column: 2; grid-row: 2 / 4; align-self: end; justify-self: end; }
  .site-footer .footer-developer img { width: 45px; height: 45px; }
  .site-footer .footer-developer figcaption { font-size: 7px; }
  .site-footer .footer-bottom p { margin: 0; }
  .site-footer .footer-bottom, .site-footer .footer-legal a, .site-footer .footer-legal button { font-size: .76rem; }
}

@media (max-width: 360px) {
  .bestsellers-head h2 { font-size: 1.48rem; }
  .bestsellers-controls > span { min-width: 32px; }
  .bestsellers-arrow { width: 25px; }
  .site-footer .footer-brand { width: 170px; height: 56px; }
}

/* A single, stable photographic frame on narrow screens. */
@media (max-width: 600px) {
  html { scroll-behavior: auto; }
  main section[id] { scroll-margin-top: 84px; }
  body[data-page="home"] #partners,
  body[data-page="home"] #kissel,
  body[data-page="home"] #products,
  body[data-page="home"] #bestsellers { scroll-margin-top: 78px; }
  .hero .hero-visual,
  .hero .hero-visual img,
  .hero .hero-visual:hover img { animation: none; transition: none; will-change: auto; }
  .hero .hero-visual img,
  .hero .hero-visual:hover img { object-position: 44% center; }

  .partner-hero { overflow: visible; background: transparent; }
  .partner-hero-media {
    inset: 0 0 auto; width: 100%;
    height: max(640px, calc(100svh - 82px));
    border-radius: 30px;
    -webkit-mask-image: none; mask-image: none;
  }
  .partner-hero-media picture { display: contents; }
  .partner-hero-media img { object-position: 49% center; }
  .partner-hero::after {
    background: linear-gradient(180deg,
      rgba(255,250,241,.66) 0%, rgba(255,250,241,.28) 31%,
      transparent 52%, transparent 78%, rgba(5,40,43,.22) 100%);
  }
  .partner-hero-copy h1 { max-width: 100%; font-size: clamp(2.2rem, 9vw, 2.55rem); text-shadow: 0 1px 13px rgba(255,250,241,.45); }
  .partner-hero-copy > p { max-width: 30ch; color: #164d55; font-size: .99rem; font-weight: 560; line-height: 1.37; text-shadow: 0 1px 12px rgba(255,250,241,.55); }
  .partner-hero-actions .partner-text-link { color: #fffdf8; border-color: #fffdf8; text-shadow: 0 1px 5px rgba(0,35,40,.75); }
  .partner-brief { margin-top: 22px; }
  .partner-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .partner-tabs button { width: 100%; min-height: 52px; padding: 8px; white-space: normal; line-height: 1.12; }
}

@media (max-width: 360px) {
  .partner-hero-media { top: 0; }
  .partner-hero-copy > p { font-size: .87rem; line-height: 1.28; max-width: 27ch; }
  .kissel-partner h1 { font-size: 2rem; line-height: 1.04; }
  .kissel-partner-copy > p:not(.eyebrow) { font-size: .82rem; line-height: 1.28; max-width: 31ch; }
  .kissel-soon-badge { font-size: .82rem; margin-bottom: 9px; }
  .kissel-partner { min-height: 660px; }
  .kissel-partner-visual {
    top: 300px;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%);
    mask-image: linear-gradient(180deg, transparent, #000 14%);
  }
}

/* Keep the same menu treatment through the intermediate tablet width. */
@media (min-width: 601px) and (max-width: 1100px) {
  .site-header .menu-toggle.icon-button {
    position: relative; display: block;
    flex: 0 0 83px; width: 83px; height: 38px;
    margin-left: auto;
    border: 1px solid rgba(0,84,97,.2); border-radius: 13px;
    background: #fffaf0; box-shadow: none;
  }
  .site-header .menu-toggle::before {
    content: 'Меню'; position: absolute; left: 11px; top: 50%;
    transform: translateY(-50%); font-size: .78rem; font-weight: 750;
  }
  .site-header .menu-toggle span {
    position: absolute; right: 11px; width: 15px; height: 1.8px; margin: 0;
    border-radius: 5px; background: currentColor;
  }
  .site-header .menu-toggle span:first-child { top: 14px; }
  .site-header .menu-toggle span:nth-child(2) { top: 22px; width: 11px; }
  .site-header .menu-toggle[aria-expanded="true"] span:first-child { top: 18px; transform: rotate(45deg); }
  .site-header .menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 18px; width: 15px; transform: rotate(-45deg); }
}
