/* ==========================================================================
   Phone experience (<= 760px): compact header with menu + search toggle,
   slide-in menu drawer, full-width search, fixed bottom tab bar, bottom sheets
   (categories / live feed sidebar), stacked hero, and no floating chat / cart.
   Loaded last. Breakpoint must match MOBILE_QUERY in src/store/mobileUi.ts.
   ========================================================================== */

:root {
  --m-tabbar-h: 62px;
  --m-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Nothing on the page may widen the layout viewport (fixed UI would drift off-screen). */
html,
body {
  overflow-x: clip;
}
html.is-scroll-locked {
  overflow: hidden;
  overflow-anchor: none;
}
html.is-scroll-locked body {
  overflow: hidden;
  /* Keep layout width stable when the scrollbar vanishes (prevents sidebar jump). */
  padding-right: var(--scroll-lock-pad, 0px);
}
/* Sticky nav leaves the viewport once overflow is locked — pin it for the lock. */
html.is-scroll-locked #site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Match body padding so fixed header doesn't widen into the missing scrollbar. */
  padding-right: var(--scroll-lock-pad, 0px);
  box-sizing: border-box;
  z-index: 2600;
}

/* Mobile-only chrome is hidden on larger screens. */
.m-hdr-btn,
.site-header .logo-mark-m,
.m-tabbar,
.m-search-panel,
.m-search-backdrop {
  display: none;
}
@media (min-width: 761px) {
  .m-drawer,
  .m-sheet {
    display: none;
  }
}

@keyframes m-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
@keyframes m-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes m-drop {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
@keyframes m-search-in {
  from { opacity: 0; transform: scaleX(0.7); }
  to { opacity: 1; transform: none; }
}

/* Shared round icon button (sheet / drawer close). */
.m-icon-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eef2f7;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.15s ease;
}
.m-icon-btn:active { transform: scale(0.92); }

.m-chev {
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.45;
  transition: transform 0.25s var(--m-ease);
}
.m-chev--down { transform: rotate(135deg); margin: -4px 0 0; }
.is-open > .m-drawer-type-row .m-chev--down { transform: rotate(-45deg); margin: 4px 0 0; opacity: 0.8; }

.m-live-dot {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

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

  /* ---------------- header ---------------- */
  .site-header .catbar,
  .site-header .ep-search,
  .site-header .search {
    display: none;
  }
  .site-header .header-row,
  .site-header.is-scrolled .header-row {
    grid-template-columns: auto auto 1fr;
    gap: 0.55rem;
    min-height: 60px;
    padding: 0.4rem 0;
  }
  .site-header .logo::before { inset: -8px -14px; }
  .site-header .logo-full,
  .site-header.is-scrolled .logo-full {
    height: 32px;
  }
  .m-hdr-btn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.18s ease, transform 0.18s ease;
  }
  .m-hdr-btn:active {
    transform: scale(0.93);
    background: rgba(255, 255, 255, 0.24);
  }
  .site-header .m-search-close { display: none; }

  .site-header .header-actions {
    justify-self: end;
    gap: 0.4rem;
  }
  /* Track / wishlist / account live in the drawer; cart + alerts stay. */
  .site-header .header-actions > .icon-link:not(.cart-link),
  .site-header .notif-refresh {
    display: none;
  }
  .site-header .header-actions .icon-link,
  .site-header.is-scrolled .header-actions .icon-link {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
  }
  .site-header .header-actions .icon-link span:not(.ico):not(.badge) { display: none; }
  .site-header .header-actions .icon-link .ico .icon-img { width: 21px; height: 21px; }
  .site-header .header-actions .badge { top: -6px; right: -6px; }
  .site-header .notif-panel { position: fixed; top: var(--nav-h); left: 0.75rem; right: 0.75rem; width: auto; }

  /* ---------------- full-width search (Facebook-style) ---------------- */
  .site-header.is-searching .header-row {
    grid-template-columns: auto 1fr auto;
  }
  .site-header.is-searching .m-menu-btn,
  .site-header.is-searching .header-actions {
    display: none;
  }
  .site-header.is-searching .logo-full { display: none; }
  .site-header.is-searching .logo-mark-m {
    display: block;
    width: 38px;
    height: 38px;
    padding: 3px;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    box-shadow: 0 4px 12px -4px rgba(6, 28, 82, 0.55);
  }
  .site-header.is-searching .ep-search {
    display: block;
    min-width: 0;
    max-width: none;
    margin: 0;
  }
  .site-header.is-searching .ep-search .search,
  .site-header.is-searching .search {
    display: flex;
    max-width: none;
    margin: 0;
    padding: 0.1rem 0.25rem 0.1rem 0.9rem;
    transform-origin: right center;
    animation: m-search-in 0.3s var(--m-ease);
  }
  .site-header.is-searching .search input {
    padding: 0.55rem 0.25rem;
    font-size: 16px; /* >= 16px keeps iOS from zooming on focus */
  }
  .site-header.is-searching .search button { width: 34px; height: 34px; }
  .site-header.is-searching .m-search-close { display: inline-grid; }

  .m-search-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(12, 24, 44, 0.42);
    animation: m-fade 0.25s ease;
  }
  .m-search-panel {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 5;
    max-height: calc(100dvh - 100% - var(--m-tabbar-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.4rem 0 0.9rem;
    border-radius: 0 0 22px 22px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 24px 40px -20px rgba(10, 30, 70, 0.45);
    animation: m-drop 0.28s var(--m-ease);
  }
  .m-search-section { padding: 0.55rem 1rem; }
  .m-search-section + .m-search-section { border-top: 1px solid rgba(42, 54, 66, 0.06); }
  .m-search-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
  }
  .m-search-section-head h3 {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
  }
  .m-search-section-head button {
    border: 0;
    background: none;
    color: var(--teal);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
  }
  .m-search-recent { list-style: none; margin: 0; padding: 0; }
  .m-search-recent li { display: flex; align-items: center; }
  .m-search-recent li > button:first-child {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
  }
  .m-search-recent-ico {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eef2f7;
    color: #5c6b78;
  }
  .m-search-recent-term {
    overflow: hidden;
    font-size: 0.94rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .m-search-recent-x {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: #8193a5;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
  }
  .m-search-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .m-search-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.85rem 0.3rem 0.3rem;
    border: 1px solid rgba(42, 54, 66, 0.07);
    border-radius: 999px;
    background: #f2f6fb;
    color: var(--text);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
  }
  .m-search-chip img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    object-fit: cover;
  }
  .m-search-chips--text .m-search-chip { padding: 0.45rem 0.9rem; }

  /* ---------------- no floating chat / cart; one compact post button ---------------- */
  .chat-fab,
  .chat-backdrop,
  .ep-chat-dock,
  .cart-fab {
    display: none !important;
  }
  .compose-dock {
    right: 1rem;
    bottom: calc(var(--m-tabbar-h) + env(safe-area-inset-bottom) + 0.9rem);
  }
  .compose-fab {
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 10px 24px -6px rgba(196, 123, 90, 0.6);
  }
  .compose-fab img { width: 1.3rem; height: 1.3rem; }
  .compose-fab-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  html.is-scroll-locked .compose-dock {
    opacity: 0;
    pointer-events: none;
  }
  .ep-toast-stack {
    bottom: calc(var(--m-tabbar-h) + env(safe-area-inset-bottom) + 0.75rem);
  }

  /* ---------------- bottom tab bar ---------------- */
  .m-tabbar {
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 260;
    height: calc(var(--m-tabbar-h) + env(safe-area-inset-bottom));
    padding: 0 0.25rem env(safe-area-inset-bottom);
    border-top: 1px solid rgba(42, 54, 66, 0.08);
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(16px) saturate(1.6);
    backdrop-filter: blur(16px) saturate(1.6);
    box-shadow: 0 -10px 30px -18px rgba(10, 45, 120, 0.35);
  }
  .m-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #6b7a88;
    font: inherit;
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.01em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s ease;
  }
  .m-tab .m-tab-ico {
    box-sizing: content-box;
    padding: 3px 14px;
    border-radius: 999px;
    transition: background 0.25s var(--m-ease), transform 0.2s ease;
  }
  .m-tab:active .m-tab-ico { transform: scale(0.9); }
  .m-tab.is-active { color: var(--teal-deep); }
  .m-tab.is-active .m-tab-ico { background: rgba(24, 119, 242, 0.12); }
  .m-tab--live .m-tab-ico { color: #e8590c; }
  .m-tab-pulse {
    position: absolute;
    top: 8px;
    left: calc(50% + 8px);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    border: 1.5px solid #fff;
    animation: m-pulse 1.8s ease-out infinite;
  }

  /* ---------------- bottom sheets ---------------- */
  .m-sheet {
    position: fixed;
    inset: 0;
    z-index: 250;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear 0.4s;
  }
  .m-sheet.is-open {
    visibility: visible;
    pointer-events: auto;
    transition: visibility 0s;
  }
  .m-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 24, 44, 0.46);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  .m-sheet.is-open .m-sheet-backdrop { opacity: 1; }
  .m-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(var(--m-tabbar-h) + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - var(--m-tabbar-h) - env(safe-area-inset-bottom) - 2.5rem);
    border-radius: 22px 22px 0 0;
    background: #f4f7fb;
    box-shadow: 0 -20px 50px -20px rgba(10, 30, 70, 0.45);
    outline: none;
    transform: translateY(calc(100% + var(--m-tabbar-h) + 40px));
    transition: transform 0.4s var(--m-ease);
  }
  .m-sheet.is-open .m-sheet-panel { transform: none; }
  .m-sheet-grip {
    flex: none;
    padding: 0.5rem 1rem 0.7rem;
    border-bottom: 1px solid rgba(42, 54, 66, 0.07);
    border-radius: 22px 22px 0 0;
    background: #fff;
    touch-action: none;
  }
  .m-sheet-handle {
    display: block;
    width: 40px;
    height: 4.5px;
    margin: 0 auto 0.6rem;
    border-radius: 99px;
    background: #cfd8e3;
  }
  .m-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }
  .m-sheet-titles { min-width: 0; }
  .m-sheet-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.22rem;
  }
  .m-sheet-sub {
    margin: 0.15rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
  }
  .m-sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.85rem 0.85rem 1.1rem;
    -webkit-overflow-scrolling: touch;
  }
  .m-sheet-cta {
    display: block;
    margin-top: 0.85rem;
    padding: 0.8rem 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--teal), var(--teal-deep));
    color: #fff;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 10px 22px -12px rgba(24, 119, 242, 0.8);
  }
  .m-cat-panel .cat-scroll {
    max-height: none;
    overflow: visible;
    padding-top: 0.55rem;
  }

  /* "Offers" sheet */
  .m-offers { display: flex; flex-direction: column; gap: 1.1rem; }
  .m-offers-group { display: flex; flex-direction: column; gap: 0.55rem; }
  .m-offers-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5b6b80;
  }
  .m-offers-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
  }
  .m-offers-more {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: none;
    color: var(--teal-deep);
  }
  .m-offers-list,
  .m-offers-chips { list-style: none; margin: 0; padding: 0; }
  .m-offers-list { display: flex; flex-direction: column; gap: 0.5rem; }
  .m-offer-camp,
  .m-offer-combo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.75rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(24, 119, 242, 0.08);
    box-shadow: 0 6px 16px -12px rgba(15, 40, 90, 0.35);
    color: inherit;
    text-decoration: none;
  }
  .m-offer-camp.is-lead {
    background: linear-gradient(120deg, #fff7f0, #fff 70%);
    border-color: rgba(244, 104, 4, 0.18);
  }
  .m-offer-camp-ico {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(160deg, #fff1e6, #ffe0c7);
    color: #e8590c;
  }
  .m-offer-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
  .m-offer-name {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f2a4f;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }
  .m-offer-sub { font-size: 0.75rem; color: var(--muted); }
  .m-offer-end { flex: none; }
  .m-offer-time {
    display: inline-block;
    padding: 0.22rem 0.5rem;
    border-radius: 999px;
    background: #fff1e6;
    color: #b4530f;
    font-size: 0.72rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .m-offer-combo img {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--surface-2);
  }
  .m-offer-price { flex: none; font-weight: 850; color: var(--teal-deep); font-size: 0.95rem; }
  .m-offers-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .m-offer-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(24, 119, 242, 0.08);
    color: inherit;
    text-decoration: none;
  }
  .m-offer-chip img { flex: none; width: 28px; height: 28px; object-fit: contain; }
  .m-offer-chip-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.84rem;
    font-weight: 750;
    color: #0f2a4f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .m-offer-chip-off {
    flex: none;
    padding: 0.14rem 0.4rem;
    border-radius: 999px;
    background: #e8f7ee;
    color: #1f8a4c;
    font-size: 0.66rem;
    font-weight: 850;
  }
  .m-offers-empty { text-align: center; padding: 0.75rem 0.25rem 0; }
  .m-offers-empty-title { margin: 0 0 0.2rem; font-weight: 800; color: #0f2a4f; }

  /* Feed right sidebar inside the "Live" sheet */
  .m-sheet-body.m-rail.comm-col-right {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: auto;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.85rem 0.85rem 1.1rem;
    scrollbar-gutter: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .m-rail .activity-panel,
  .m-rail .faq-panel,
  .m-rail .activity-scroll,
  .m-rail .faq-scroll {
    max-height: none;
  }

  /* ---------------- menu drawer ---------------- */
  .m-drawer {
    position: fixed;
    inset: 0;
    z-index: 300;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear 0.38s;
  }
  .m-drawer.is-open {
    visibility: visible;
    pointer-events: auto;
    transition: visibility 0s;
  }
  .m-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 24, 44, 0.5);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.32s ease;
  }
  .m-drawer.is-open .m-drawer-backdrop { opacity: 1; }
  .m-drawer-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: min(86vw, 350px);
    overflow: hidden;
    border-radius: 0 22px 22px 0;
    background: #fff;
    box-shadow: 20px 0 50px -20px rgba(10, 30, 70, 0.5);
    outline: none;
    transform: translateX(-102%);
    transition: transform 0.38s var(--m-ease);
  }
  .m-drawer.is-open .m-drawer-panel { transform: none; }
  .m-drawer-head {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(0.8rem + env(safe-area-inset-top)) 0.9rem 0.8rem 1rem;
    background:
      radial-gradient(60% 180% at 12% -40%, rgba(255, 255, 255, 0.22), transparent 60%),
      linear-gradient(100deg, #0b3a9e 0%, #1457d0 45%, #1a70ea 100%);
  }
  .m-drawer-logo img {
    display: block;
    width: auto;
    height: 32px;
    filter:
      drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff)
      drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff);
  }
  .m-drawer-close {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
  }
  .m-drawer-scroll {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
  }
  .m-drawer-account {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(24, 119, 242, 0.14);
    border-radius: 16px;
    background: linear-gradient(135deg, #eef5ff, #f7faff);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
  }
  .m-drawer-avatar {
    flex: none;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border-radius: 50%;
    background: color-mix(in srgb, var(--teal) 16%, #fff);
    color: var(--teal-deep);
    font-weight: 800;
    box-shadow: 0 0 0 2px #fff;
  }
  .m-drawer-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .m-drawer-account-copy {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
  }
  .m-drawer-account-copy strong {
    overflow: hidden;
    font-size: 0.95rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .m-drawer-account-copy small { color: var(--muted); font-size: 0.75rem; }
  .m-drawer-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.5rem;
    color: #8193a5;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
  }

  .m-drawer-camps { display: flex; flex-direction: column; gap: 0.5rem; }
  .m-drawer-camp {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid #fecdd3;
    border-radius: 14px;
    background: linear-gradient(120deg, #fff4ec, #fff1f3);
  }
  .m-drawer-camp-ico {
    flex: none;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f97316, #e11d48);
    color: #fff;
  }
  .m-drawer-camp-copy {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
  }
  .m-drawer-camp-copy strong {
    overflow: hidden;
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .m-drawer-camp-copy small { color: #be123c; font-size: 0.72rem; font-weight: 700; }
  .m-drawer-camp-time {
    flex: none;
    padding: 0.28rem 0.45rem;
    border-radius: 7px;
    background: #0f172a;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .m-drawer-quick {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .m-drawer-quick a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.7rem 0.75rem;
    border: 1px solid rgba(42, 54, 66, 0.06);
    border-radius: 14px;
    background: #f5f8fc;
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 700;
  }
  .m-drawer-quick a svg { flex: none; color: var(--teal); }
  .m-drawer-quick a.is-active {
    border-color: rgba(24, 119, 242, 0.25);
    background: rgba(24, 119, 242, 0.1);
    color: var(--teal-deep);
  }

  .m-drawer-types,
  .m-drawer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(42, 54, 66, 0.08);
    border-radius: 16px;
  }
  .m-drawer-type + .m-drawer-type,
  .m-drawer-links li + li {
    border-top: 1px solid rgba(42, 54, 66, 0.07);
  }
  .m-drawer-type { transition: background 0.2s ease; }
  .m-drawer-type.is-open { background: #f6f9fe; }
  .m-drawer-type-row { display: flex; align-items: stretch; }
  .m-drawer-type-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    padding: 0.55rem 0.75rem;
    font-size: 0.92rem;
    font-weight: 700;
  }
  .m-drawer-type-img {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #eef1f4;
    object-fit: cover;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--type-dot, rgba(24, 119, 242, 0.35));
  }
  .m-drawer-type-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .m-drawer-type-link .cat-offer-badge { margin-left: 0; }
  .m-drawer-type-toggle {
    flex: none;
    display: grid;
    place-items: center;
    width: 48px;
    padding: 0;
    border: 0;
    border-left: 1px solid rgba(42, 54, 66, 0.07);
    background: none;
    color: var(--muted);
    cursor: pointer;
  }
  .m-drawer-cats { padding: 0.1rem 0.7rem 0.75rem; }
  .m-drawer-type.is-open .m-drawer-cats { animation: m-drop 0.28s var(--m-ease); }
  .m-drawer-cats ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .m-drawer-cats li a {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    padding: 0.42rem 0.5rem;
    border: 1px solid rgba(42, 54, 66, 0.07);
    border-radius: 10px;
    background: #fff;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.2;
  }
  .m-drawer-cats li img {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eef1f4;
    object-fit: cover;
  }
  .m-drawer-cats-all {
    display: inline-block;
    margin-top: 0.55rem;
    color: var(--teal-deep);
    font-size: 0.8rem;
    font-weight: 800;
  }
  .m-drawer-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 650;
  }
  .m-drawer-links a.is-active { color: var(--teal-deep); }

  .m-drawer-chat {
    padding: 0.9rem;
    border: 1px solid rgba(24, 119, 242, 0.12);
    border-radius: 16px;
    background: linear-gradient(140deg, #eef6ff, #effcf5);
  }
  .m-drawer-chat-sub { margin: -0.2rem 0 0.7rem; color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
  .m-drawer-chat-btns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .m-drawer-chat-btns .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.62rem 0.5rem;
    font-size: 0.84rem;
  }
  .m-drawer-chat-btns .btn-ico { width: 18px; height: 18px; margin: 0; }
  .m-drawer-trust {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    color: #8193a5;
    font-size: 0.72rem;
    font-weight: 700;
  }

  /* ---------------- hero: image on top, padded copy below (no text-on-pets) ---------------- */
  .hero-slider {
    --hero-media-h: calc((100vw - 2rem) * 0.52);
    min-height: 0;
    margin-top: 0.75rem;
    border-radius: 22px;
    border-color: color-mix(in srgb, var(--teal) 12%, transparent);
    background: #fff;
    box-shadow: 0 12px 30px rgba(42, 54, 66, 0.07);
    overflow: hidden;
  }
  .hero-track { min-height: 0; }
  .hero-slide,
  .hero-slide.is-active {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding: 0;
  }
  .hero-slide::after,
  .hero-slide-aquarium::after {
    display: block;
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: calc(var(--hero-media-h) - 2.75rem);
    height: 2.75rem;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(255, 255, 255, 0.55) 55%,
      #fff 100%
    );
  }
  .hero-media {
    position: relative;
    inset: auto;
    height: var(--hero-media-h);
    object-position: 72% center;
    display: block;
  }
  .hero-slide-aquarium .hero-media { object-position: center; }
  .hero-copy {
    position: relative;
    z-index: 2;
    max-width: none;
    margin: 0;
    padding: 0.85rem 1.15rem 1.2rem;
    text-align: center;
    background: linear-gradient(180deg, #f7faff 0%, #ffffff 55%);
  }
  .hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.45rem;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--sky-soft) 80%, #fff);
    border: 1px solid color-mix(in srgb, var(--teal) 16%, transparent);
    color: var(--teal-deep);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .hero-copy h1 {
    margin: 0 auto 0.4rem;
    max-width: 18ch;
    font-size: clamp(1.38rem, 5.8vw, 1.68rem);
    letter-spacing: -0.028em;
    line-height: 1.18;
    color: color-mix(in srgb, var(--text) 90%, var(--teal-deep));
    background: none;
    -webkit-text-fill-color: currentColor;
  }
  .hero-copy > p {
    margin: 0 auto 0.95rem;
    max-width: 34ch;
    font-size: 0.9rem;
    line-height: 1.45;
    font-weight: 500;
    color: var(--muted);
  }
  .hero-cta {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
    padding-bottom: 0.15rem;
  }
  .hero-cta .btn {
    flex: 1 1 0;
    max-width: 10.5rem;
    justify-content: center;
    padding: 0.62rem 0.7rem;
    font-size: 0.84rem;
    border-radius: 999px;
    white-space: nowrap;
  }
  .hero-cta .btn-primary {
    box-shadow: 0 8px 18px rgba(24, 119, 242, 0.22);
  }
  .hero-cta .btn-ghost {
    background: #fff;
    border-color: color-mix(in srgb, var(--teal) 28%, transparent);
  }
  .hero-nav {
    top: calc(var(--hero-media-h) / 2);
    width: 34px;
    height: 34px;
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.9);
  }
  .hero-prev { left: 0.55rem; }
  .hero-next { right: 0.55rem; }
  .hero-dots {
    top: calc(var(--hero-media-h) - 1.35rem);
    bottom: auto;
  }
  .hero-dot {
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }
  .hero-dot.is-active { background: var(--teal); }

  /* ---------------- "who are you shopping for": fully round type photos ---------------- */
  .cat-slider--circles .cat-ico--circle { overflow: hidden; border-radius: 50%; }
  .cat-ico--circle img {
    width: 100%;
    height: 100%;
    padding: 0;
    border-radius: 50%;
    object-fit: cover;
  }
  .cat-ico--circle:not(.is-photo) img {
    padding: 16%;
    border-radius: 0;
    object-fit: contain;
  }

  /* ---------------- community feed ---------------- */
  .community-head-glow { inset: -2rem 0 -1rem; }
  /* both sidebars move into the bottom-bar sheets (Categories / Live) */
  .community-grid > .comm-col-left,
  .community-grid > .comm-col-right {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .m-drawer-panel,
  .m-sheet-panel,
  .m-drawer-backdrop,
  .m-sheet-backdrop {
    transition: none !important;
  }
  .m-tab-pulse,
  .m-search-panel,
  .site-header.is-searching .search {
    animation: none !important;
  }
}
