/* FAW MARKET — mobile layer: burger + drawer, bottom tab bar, PDP buy bar, lineup strip.
   Loaded after styles.css. */
.burger, .tabbar, .buybar, .swipe-hint { display: none; }

/* FAW model range strip above the footer */
.lineup { margin-top: 48px; background: linear-gradient(180deg, var(--bg), #E6EAF3); overflow: hidden; line-height: 0; }
.lineup img { display: block; width: 100%; max-width: 1511px; height: auto; margin: 0 auto; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.lineup + .footer { margin-top: 0; border-top: 4px solid var(--accent); }

/* Drawer */
.drawer-wrap { position: fixed; inset: 0; z-index: 150; background: rgba(12,20,50,0); transition: background .2s ease-out; }
.drawer-wrap.show { background: rgba(12,20,50,.55); }
.drawer { position: absolute; top: 0; bottom: 0; left: 0; width: min(86vw, 380px); background: var(--surface); overflow-y: auto; transform: translateX(-100%); transition: transform .2s ease-out; display: flex; flex-direction: column; padding-bottom: 24px; }
.drawer-wrap.show .drawer { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.drawer-head .btn { width: 44px; height: 44px; padding: 0; }
.drawer-head .logo-uz { display: none; }
.drawer-cats { display: flex; flex-direction: column; padding: 8px; background: linear-gradient(160deg, var(--brand), var(--brand-dark)); margin: 12px; border-radius: var(--r-lg); }
.drawer-cats a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 10px; color: #fff; font: 700 14px var(--display); text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,.12); }
.drawer-cats a:last-child { border-bottom: 0; }
.drawer-cats a span { flex: 1; }
.drawer-cats a .icon-sm { opacity: .6; }
.drawer-sec { padding: 12px 16px; display: grid; gap: 8px; }
.drawer-sec h4 { margin: 0; font: 700 12px var(--display); text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); }
.drawer-row { grid-template-columns: 1.4fr 1fr; gap: 12px; }
.drawer-row > div { display: grid; gap: 8px; }
.drawer-hours { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.drawer-hours b { white-space: nowrap; }
.drawer-hours .icon { color: var(--brand); }
.drawer-hours b { color: var(--text); }
.drawer-seg { display: flex; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.drawer-seg button { flex: 1; height: 44px; background: none; border: 0; font-weight: 700; font-size: 14px; color: var(--text-2); }
.drawer-seg button + button { border-left: 1px solid var(--border); }
.drawer-seg button.on { background: var(--brand); color: #fff; }
.drawer-phone { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: var(--r); background: var(--brand); color: #fff; font: 800 17px var(--display); }
.drawer-phone + .drawer-phone { background: #fff; color: var(--brand); border: 2px solid var(--brand); }
.drawer .btn { min-height: 44px; }

@media (max-width: 899px) {
  /* compact sticky header */
  .topbar, .navbar { display: none; }
  .burger { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -6px; background: none; border: 0; border-radius: var(--r); color: var(--brand); }
  .burger .icon { width: 24px; height: 24px; }
  .header .container { height: 58px; gap: 6px; }
  .header .hdr-hours, .header .b2b-login, .header .icon-btn:has(#cmpCount) { display: none; }
  .header .icon-btn { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .header .icon-btn .icon { width: 24px; height: 24px; }
  .header .badge { top: 3px; left: 24px; }
  .tabs-bar { top: 58px; }
  .buybox { top: auto; }

  /* bottom tab bar replaces the side dock */
  .dock { display: none; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(14,22,51,.08);
  }
  .tabbar > * { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 64px; background: none; border: 0; color: var(--text-2); font: 600 11px/13px var(--font); }
  .tabbar > * .icon { width: 24px; height: 24px; color: var(--brand); }
  .tabbar > *:active { background: var(--surface-2); }
  .tabbar .badge { top: 6px; left: calc(50% + 4px); }
  .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); }

  /* bigger touch targets */
  .search-hints button { min-height: 36px; padding: 6px 12px; font-size: 13px; }
  .filter-chip, .toolbar select { height: 40px; }
  .view-toggle button { width: 40px; height: 38px; }
  .card-tools button { width: 36px; height: 36px; }
  .share a, .share button, .copy { width: 44px; height: 44px; }
  .fits .chip { min-height: 34px; }
  .crumbs a { padding: 6px 0; }

  /* product page: catalog sections as one swipeable row */
  .pdp-sections { display: flex; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px !important; }
  .pdp-sections::-webkit-scrollbar { display: none; }
  .pdp-sections > * { flex: none; min-width: 132px; min-height: 58px; border-bottom: 0 !important; }
  .pdp-sections .num { font-size: 18px; }

  /* product page: smaller gallery, sticky buy bar */
  .gallery-main { aspect-ratio: 4/3; }
  .thumbs-row { grid-template-columns: repeat(5, 56px); }
  .swipe-hint { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--brand); }
  body.has-buybar .tabbar { display: none; }
  .buybar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 96; display: flex; align-items: center; gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(14,22,51,.1);
    transform: translateY(110%); transition: transform .2s ease-out;
  }
  body.has-buybar .buybar { transform: none; }
  .buybar .bb-price { flex: 1; min-width: 0; }
  .buybar .bb-price b { display: block; font: 900 19px/22px var(--display); white-space: nowrap; }
  .buybar .bb-price small { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .buybar .btn { height: 48px; }
  .buybar .bb-call { width: 48px; padding: 0; color: var(--brand); }

  .lineup { margin-top: 32px; }
  .lineup img { width: auto; height: 90px; max-width: none; position: relative; left: 50%; transform: translateX(-50%); }
}

@media (max-width: 599px) {
  /* readable text: nothing under 12px */
  .brand-tag { font-size: 11px; padding: 4px 8px; }
  .card-brand, .stock, .stock-more, .vt .lbl small, .cat span, .kv small, .manager small, .tech-card p b, .fits-title, .legend { font-size: 12px; }
  .tbl th { font-size: 12px; }
  .card-name { font-size: 14px; line-height: 19px; min-height: 38px; }
  .price { font-size: 18px; }

  /* compact cards: one big button, quantity lives on the product page */
  .card-actions { flex-direction: row; }
  .card-actions .qty { display: none; }
  .card-actions .btn { height: 44px; font-size: 14px; }
  .card-tools { top: 6px; right: 6px; }
  .grid { gap: 10px; }

  /* filter bar in one swipeable row; list view is a desktop feature */
  .toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 8px; }
  .toolbar::-webkit-scrollbar { display: none; }
  .toolbar > * { flex: none; }
  .toolbar > span[style] { display: none; }
  .toolbar .view-toggle { display: none; }
  .card-tools [data-act="compare"] { display: none; }
  .section-head a { white-space: nowrap; }
  .section-head h2 { min-width: 0; }

  .vt .lbl b { font-size: 13px; }
  .vt .lbl small { flex-direction: column; gap: 1px; }
  .store-actions .btn { flex: 1 1 100%; }
  .store-photo { min-height: 260px; }
  .b2b-band h2 { font-size: 20px; line-height: 25px; }
  .b2b-action { padding: 12px; }
  .section { padding: 28px 0; }
  .section-head h2 { font-size: 20px; line-height: 26px; }
  .hero .container { padding-top: 12px; }
  .hero-truck { max-width: 300px; margin-bottom: -18px; }
  .hero-kicker { font-size: 12px; margin-bottom: 10px; }
  .hero h1 { font-size: 26px; line-height: 31px; }
  .hero-slogan { font-size: 15px; margin-bottom: 6px; }
  .hero .sub { font-size: 14px; line-height: 21px; margin-bottom: 14px; }
  .hero-phones a { height: 48px; }
  .tabs-bar a { padding: 14px; }
  .kv { grid-template-columns: 1fr 1fr; }
  .kv b { font-size: 13px; }
}

/* "Show more" under the catalog grid (phones) */
.more-btn { display: flex; width: 100%; height: 48px; margin-top: 12px; }
