/* Mobile UX overrides for the PULSUN bundle storefront. Desktop is untouched. */
@media (max-width: 700px) {
  body.is-home { overflow-x: hidden; }
  body.is-home .site-header { height: 62px; }
  body.is-home .site-header__inner { min-height: 62px; gap: 8px; padding-inline: 12px; }
  body.is-home .site-header__logo img { width: auto; max-width: 112px; max-height: 30px; }
  body.is-home .site-header__nav,
  body.is-home .site-header__burger { display: none; }
  body.is-home .site-header__actions { gap: 5px; margin-left: auto; }
  body.is-home .site-header__cta { min-height: 34px; padding: 0 13px; font-size: 0; white-space: nowrap; }
  body.is-home .site-header__cta::before { content: "Вкусы"; font-size: 12px; }
  body.is-home .site-header__icon { width: 34px; height: 34px; }

  .bundle-page { padding-bottom: 88px; }
  .bundle-page .container { width: min(100% - 24px, var(--container)); }
  .bundle-hero {
    min-height: 530px;
    margin-top: -62px;
    padding: 94px 0 24px;
    background-image:
      linear-gradient(180deg, rgba(251,247,240,.98) 0, rgba(251,247,240,.9) 25%, rgba(251,247,240,.52) 55%, rgba(251,247,240,.18) 100%),
      var(--bundle-hero-image, none);
    background-position: center top, 64% center;
    background-size: cover;
  }
  .bundle-hero__content { max-width: 350px; }
  .bundle-kicker { margin-bottom: 8px; font-size: 10px; }
  .bundle-hero h1 { max-width: 330px; margin-bottom: 12px; font-size: clamp(35px, 10.5vw, 43px); line-height: .98; }
  .bundle-hero__lead { max-width: 315px; margin-bottom: 8px; font-size: 16px; line-height: 1.25; }
  .bundle-hero__text { max-width: 310px; margin-bottom: 16px; font-size: 13px; line-height: 1.4; }
  .bundle-hero__actions { gap: 8px; }
  .bundle-hero__actions > a { width: auto; min-height: 40px; padding: 10px 16px; font-size: 12px; }

  .bundle-layout { display: block; margin-top: 12px; }
  .bundle-main { gap: 10px; }
  .bundle-panel { padding: 17px 14px; border-radius: 15px; }
  .bundle-panel > h2,
  .bundle-section-head h2 { font-size: 25px; line-height: 1.05; }
  .bundle-section-head { display: block; margin-bottom: 14px; }
  .bundle-section-head p { margin-top: 5px; font-size: 11px; line-height: 1.4; }

  .order-terms__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: 12px; }
  .order-terms__grid > div { min-height: 102px; justify-content: center; padding: 10px 7px; border-bottom: 1px solid #eadfce; }
  .order-terms__grid > div:nth-last-child(-n+2) { border-bottom: 0; }
  .order-terms__grid span { font-size: 22px; }
  .order-terms__grid strong { font-size: 10px; }
  .order-terms__grid small { font-size: 9px; }

  .bundle-formats {
    display: flex;
    gap: 9px;
    margin-inline: -14px;
    padding: 10px 14px 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .bundle-formats::-webkit-scrollbar { display: none; }
  .bundle-format { flex: 0 0 min(74vw, 270px); min-width: 0; padding: 16px 12px 12px; scroll-snap-align: start; }
  .bundle-format h3 { font-size: 17px; }
  .bundle-format__bottles { min-height: 48px; font-size: 30px; }
  .bundle-format__price { font-size: 21px; }
  .bundle-format__choose { min-height: 36px; }
  .bundle-delivery-note { margin-top: 8px; font-size: 10px; }

  .bundle-filter-tabs,
  .bundle-flavor-filters,
  [data-flavor-filters] { display: flex; gap: 7px; margin-inline: -14px; padding: 0 14px 10px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .bundle-filter-tabs::-webkit-scrollbar,
  .bundle-flavor-filters::-webkit-scrollbar,
  [data-flavor-filters]::-webkit-scrollbar { display: none; }
  .bundle-flavors { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bundle-flavor { padding: 9px 7px; border-radius: 12px; }
  .bundle-flavor__image { height: 112px; }
  .bundle-flavor h3 { min-height: 30px; margin: 6px 0; font-size: 11px; line-height: 1.25; }
  .bundle-flavor__qty { grid-template-columns: 28px 1fr 28px; }
  .bundle-flavor__qty button { height: 28px; }

  .bundle-compare { padding-bottom: 175px !important; background-position: center bottom !important; background-size: 100% auto !important; background-repeat: no-repeat !important; min-height: 0 !important; }
  .bundle-compare__grid { gap: 7px; margin-top: 12px; }
  .bundle-compare__col { padding: 12px 10px; }
  .bundle-compare__col h3 { margin-bottom: 8px; font-size: 14px; }
  .bundle-compare__col p { margin: 6px 0; font-size: 10px; line-height: 1.35; }

  .bundle-included__grid { grid-template-columns: 1fr; gap: 7px; margin-top: 12px; }
  .bundle-included__grid > div { grid-template-columns: 32px 1fr; min-height: 66px; align-content: center; padding: 10px 12px; }
  .bundle-included__grid span { font-size: 23px; }
  .bundle-included__grid strong { font-size: 11px; }
  .bundle-included__grid small { font-size: 9px; }

  .bundle-steps ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
  .bundle-steps li { min-height: 54px; gap: 7px; padding: 7px; border-radius: 10px; background: #f8f1e7; font-size: 10px; line-height: 1.3; }
  .bundle-steps li span { width: 28px; height: 28px; flex-basis: 28px; }

  .bundle-cart {
    position: fixed;
    z-index: 950;
    right: 10px;
    bottom: 10px;
    left: 10px;
    top: auto;
    display: grid;
    grid-template-columns: auto 1fr minmax(128px, auto);
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 15px;
    background: rgba(255,252,247,.97);
    box-shadow: 0 8px 30px rgba(52,34,22,.22);
    backdrop-filter: blur(12px);
  }
  .bundle-cart__head { padding: 0; border: 0; }
  .bundle-cart__head h2 { font-size: 0; }
  .bundle-cart__head h2::after { content: "Заказ"; font-size: 12px; }
  .bundle-cart__head p { display: block; margin: 1px 0 0; font-size: 11px; }
  .bundle-cart__head a,
  .bundle-cart__items,
  .bundle-cart__hint,
  .bundle-cart__trust,
  .bundle-cart__summary > p:not(.bundle-cart__total) { display: none; }
  .bundle-cart__summary { padding: 0; border: 0; }
  .bundle-cart__summary .bundle-cart__total { display: block; padding: 0; margin: 0; border: 0; font-size: 0; }
  .bundle-cart__total span { display: block; font-family: var(--font-body); font-size: 9px; color: #887767; }
  .bundle-cart__total strong { display: block; font-size: 18px; line-height: 1.05; }
  .bundle-cart__checkout { min-height: 39px; padding: 9px 11px; text-align: center; font-size: 11px; line-height: 1.15; }

  body.is-home .site-footer { padding-bottom: 86px; }
  body.is-home .site-footer__inner { gap: 18px; padding-block: 28px; }
  body.is-home .site-footer__brand,
  body.is-home .site-footer__nav,
  body.is-home .site-footer__copy { text-align: center; }
  body.is-home .site-footer__nav { gap: 12px 18px; }
}

/* Actual header component uses header__* classes. Keep mobile header quiet. */
@media (max-width: 700px) {
  body.is-home .site-header {
    height: 62px;
    background: rgba(251,247,240,.94);
    border-bottom: 1px solid rgba(92,61,36,.08);
    box-shadow: 0 4px 18px rgba(52,34,22,.06);
    backdrop-filter: blur(12px);
  }
  body.is-home .header__inner {
    width: 100%;
    min-height: 62px;
    gap: 6px;
    padding-inline: 14px;
  }
  body.is-home .header__logo {
    display: flex;
    width: 118px;
    height: 29px;
    flex: 0 0 118px;
    align-items: flex-start;
    overflow: hidden;
    font-size: 25px;
    line-height: 29px;
  }
  body.is-home .header__logo img {
    display: block;
    width: 118px;
    max-width: 118px;
    height: auto;
    max-height: none;
  }
  body.is-home .header__nav,
  body.is-home .header__cta { display: none !important; }
  body.is-home .header__actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
  }
  body.is-home .header__icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 50%;
  }
  body.is-home .header__icon svg { width: 21px; height: 21px; }
  body.is-home .header__count { top: -1px; right: -1px; }
  body.is-home .header__burger { width: 38px; height: 38px; margin-left: 0; }
}

@media (max-width: 380px) {
  body.is-home .header__inner { padding-inline: 10px; }
  body.is-home .header__logo { width: 108px; flex-basis: 108px; }
  body.is-home .header__logo img { width: 108px; max-width: 108px; }
}

/* Mobile hero: separate the tagline from the header and protect text contrast. */
@media (max-width: 700px) {
  .bundle-hero {
    position: relative;
    isolation: isolate;
    background-position: center top, 66% center;
  }
  .bundle-hero::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    background: linear-gradient(90deg,
      rgba(251,247,240,.97) 0%,
      rgba(251,247,240,.92) 42%,
      rgba(251,247,240,.74) 66%,
      rgba(251,247,240,.18) 100%);
    pointer-events: none;
  }
  .bundle-hero__inner { position: relative; z-index: 1; }
  .bundle-hero__content {
    display: flex;
    max-width: 355px;
    flex-direction: column;
    align-items: flex-start;
  }
  .bundle-hero h1 { order: 1; text-shadow: 0 1px 12px rgba(251,247,240,.9); }
  .bundle-hero__lead { order: 2; color: #3f2a1c; text-shadow: 0 1px 9px #fbf7f0; }
  .bundle-hero__text { order: 3; color: #594536; text-shadow: 0 1px 9px #fbf7f0; }
  .bundle-hero__actions { order: 4; }
  .bundle-kicker {
    order: 5;
    width: auto;
    margin: 13px 0 0;
    padding: 6px 10px;
    border: 1px solid rgba(155,107,48,.18);
    border-radius: 999px;
    background: rgba(251,247,240,.82);
    color: #8b5c28;
    font-size: 9px;
    line-height: 1.2;
    letter-spacing: .08em;
    white-space: normal;
    backdrop-filter: blur(8px);
  }
}

@media (max-width: 380px) {
  body.is-home .site-header__logo img { max-width: 96px; }
  body.is-home .site-header__cta { padding-inline: 10px; }
  .bundle-hero h1 { font-size: 34px; }
  .bundle-hero__actions > a { padding-inline: 13px; }
  .bundle-cart { grid-template-columns: auto 1fr 118px; }
  .bundle-cart__checkout { font-size: 10px; }
}

/* Mobile content priority: products first, secondary reassurance afterwards. */
@media (max-width: 700px) {
  .bundle-main > #bundle-formats { order: 1; }
  .bundle-main > #bundle-flavors { order: 2; }
  .bundle-main > .order-terms { order: 3; }
  .bundle-main > .bundle-compare { order: 4; }
  .bundle-main > .bundle-included { order: 5; }
  .bundle-main > .bundle-steps { order: 6; }

  .order-terms { padding-block: 15px; overflow: hidden; }
  .order-terms > h2 { max-width: none; font-size: 22px; }
  .order-terms__grid {
    display: flex;
    gap: 8px;
    margin-inline: -14px;
    padding: 10px 14px 3px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .order-terms__grid::-webkit-scrollbar { display: none; }
  .order-terms__grid > div {
    flex: 0 0 142px;
    min-height: 92px;
    gap: 4px;
    padding: 10px 8px;
    border: 1px solid #eadfce !important;
    border-radius: 12px;
    background: rgba(255,252,247,.72);
    scroll-snap-align: start;
  }
  .order-terms__grid span { font-size: 21px; }
  .order-terms__grid strong { font-size: 10px; line-height: 1.25; }
  .order-terms__grid small { display: none; }

  .bundle-included__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .bundle-included__grid > div {
    display: flex;
    min-height: 116px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 5px;
    padding: 12px;
  }
  .bundle-included__grid span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: #f4e5cf;
    font-size: 19px;
  }
  .bundle-included__grid strong { font-size: 11px; line-height: 1.25; }
  .bundle-included__grid small { font-size: 9px; line-height: 1.35; }
}


/* Mobile hero spacing and earned points */
@media (max-width: 700px) {
  .bundle-hero__content {
    transform: translateY(44px);
  }

  .bundle-cart__points {
    display: block;
    margin-top: 3px;
    color: #a66b22;
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
  }

  .bundle-cart__points b {
    font-size: inherit;
  }
}
