*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* ChronosphereTheme palette — same as mobile app */
  --app-bg-primary:    #182D42;
  --app-bg-secondary:  #263E56;
  --app-panel:         rgba(69,96,121,0.86);
  --app-cyan:          #719CB2;
  --app-amber:         #AA8192;
  --app-orange:        #FF8C00;
  --app-wine:          #653C4D;
  --app-text:          #EFF7FF;
  --app-text-dim:      rgba(239,247,255,0.78);

  --primary:   var(--app-orange);
  --accent:    var(--app-orange);
  --accent2:   var(--app-cyan);
  --text:      var(--app-text);
  --text-bright: #F6FBFF;
  --text-dim:  var(--app-text-dim);
  --text-muted: #595C63;

  --surface-container: rgba(10,17,25,0.84);
  --surface-container-strong: rgba(10,17,25,0.92);
  --surface-panel: linear-gradient(180deg, rgba(10,17,25,0.88) 0%, rgba(10,17,25,0.94) 100%);
  --surface-control: rgba(69,96,121,0.07);
  --surface-control-hover: rgba(69,96,121,0.12);
  --surface-fill: var(--app-panel);
  --surface-tag: rgba(69,96,121,0.10);
  --glass: rgba(10,17,25,0.76);

  --border:   rgba(113,156,178,0.18);
  --border2:  rgba(113,156,178,0.30);
  --line:     rgba(113,156,178,0.16);
  --glow-top: radial-gradient(ellipse 120% 220px at 50% -40px, rgba(113,156,178,0.12) 0%, transparent 72%);

  --panel-shadow: 0 20px 56px rgba(0,0,0,0.54), 0 0 24px rgba(113,156,178,0.08);
  --panel-shadow-strong: 0 28px 72px rgba(0,0,0,0.62), 0 0 28px rgba(113,156,178,0.10);
  --control-shadow: 0 8px 22px rgba(0,0,0,0.20);
  --control-shadow-hover: 0 12px 28px rgba(0,0,0,0.24);

  --neu-bg: var(--surface-control);
  --neu-shadow: var(--control-shadow);
  --neu-inset: inset 0 0 0 1px rgba(113,156,178,0.16);
  --neu-radius: 18px;
  --control-radius: 10px;
}
html, body { width: 100%; height: 100%; overflow: hidden; font-family: 'Segoe UI', system-ui, sans-serif; color: var(--text); }
body { background: var(--app-bg-primary); }

/* -- Map -- */
#map {
  position: fixed;
  inset: 12px;
  width: calc(100% - 24px); height: calc(100% - 24px);
  border-radius: 20px;
  background: var(--app-bg-primary);
  overflow: hidden;
}
#map canvas { background: transparent !important; }

/* -- Top notch -- */
.top-notch {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 10; pointer-events: none;
  background: var(--surface-fill);
  border: 1px solid var(--border2);
  border-radius: var(--neu-radius); padding: 7px 22px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.24), 0 0 18px rgba(113,156,178,0.10);
  white-space: nowrap;
}
.notch-text {
  font-size: 11px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--text);
}

/* -- Bottom bar -- */
.bottom-bar {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 10; display: flex; align-items: center; gap: 10px;
  width: min(calc(100% - 32px), 680px);
}

/* -- Arc group (city + products buttons with connecting arc) -- */
.btn-arc-group {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.btn-arc-svg {
  display: none;
}

/* -- Square buttons -- */
.round-btn {
  width: 69px; height: 69px; border-radius: 16px; flex-shrink: 0;
  background: var(--surface-panel);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; gap: 4px; user-select: none;
  box-shadow: var(--control-shadow);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.round-btn:hover { transform: translateY(-1px); background: var(--surface-panel); border-color: var(--border2); box-shadow: var(--control-shadow-hover); }
.round-btn:active { transform: translateY(0) scale(0.98); background: var(--surface-panel); box-shadow: 0 4px 12px rgba(0,0,0,0.18); }
.round-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.round-btn-icon { display: flex; align-items: center; justify-content: center; width: 25px; height: 25px; line-height: 1; }
.round-btn-label {
  font-size: 10px; font-weight: 600; color: var(--text-dim); letter-spacing: 0.3px;
  max-width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: center;
}
.user-initial {
  font-size: 17px; font-weight: 700; color: var(--accent);
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent2), #1a3a50);
  display: flex; align-items: center; justify-content: center;
}

/* -- Search bar -- */
.search-bar {
  flex: 1; min-width: 0;
  background: var(--surface-fill);
  border: 1px solid var(--border2);
  border-radius: 16px;
  display: flex; align-items: center; padding: 7px 21px;
  box-shadow: var(--control-shadow);
  height: 69px;
}
.search-bar-wrapper { flex: 1; min-width: 0; }
#main-search-bar { width: 100%; }
.search-bar input {
  flex: 1; background: none; border: none; color: var(--text);
  font-size: 14px; outline: none; padding: 0;
}
.search-bar input::placeholder { color: var(--text-dim); }

/* -- City list -- */
.city-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; max-height: 50vh; overflow-y: auto; }
.city-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: var(--neu-radius);
  background: var(--surface-control); border: 1px solid var(--border);
  cursor: pointer; user-select: none;
  box-shadow: var(--control-shadow);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.city-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.city-item:hover, .city-item.active { background: var(--surface-control-hover); border-color: var(--border2); box-shadow: var(--control-shadow-hover); }
.city-item.active .city-item-name { color: var(--text); }
.city-item-name { font-size: 14px; font-weight: 600; color: var(--text); }
.city-item-count { font-size: 11px; color: var(--text-dim); }
.btn-cancel {
  width: 100%; padding: 11px; border: 1px solid var(--border);
  border-radius: var(--neu-radius); background: var(--surface-control);
  color: var(--text-dim); cursor: pointer; font-size: 13px;
  box-shadow: var(--control-shadow);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn-cancel:hover { background: var(--surface-control-hover); border-color: var(--border2); box-shadow: var(--control-shadow-hover); }

/* -- User menu -- */
.user-menu {
  position: fixed; bottom: 90px; right: 16px; z-index: 30;
  background: var(--surface-container-strong); border: 1px solid var(--border2);
  border-radius: 16px; padding: 16px 18px; min-width: 200px;
  box-shadow: var(--panel-shadow);
  display: none;
}
.user-menu.open { display: block; animation: fadeUp 0.18s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.user-menu-email { font-size: 12px; color: var(--text-dim); margin-bottom: 12px; word-break: break-all; }
.user-menu-logout {
  width: 100%; padding: 9px; border: 1px solid var(--border);
  border-radius: var(--neu-radius); background: var(--surface-control);
  color: var(--text); cursor: pointer; font-size: 13px; font-weight: 600;
  box-shadow: var(--control-shadow);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.user-menu-logout:hover { background: var(--surface-control-hover); border-color: var(--border2); box-shadow: var(--control-shadow-hover); }
.user-menu-panel-btn {
  display: block; width: 100%; padding: 9px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: var(--neu-radius);
  background: var(--surface-control); color: var(--text);
  font-size: 13px; font-weight: 600; text-align: center;
  text-decoration: none; cursor: pointer;
  box-shadow: var(--control-shadow);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.user-menu-panel-btn:hover { background: var(--surface-control-hover); border-color: var(--border2); box-shadow: var(--control-shadow-hover); }

/* -- Category chips -- TEMPORARILY HIDDEN */
.category-bar {
  display: none;
}
.chip {
  background: var(--surface-control); border: 1px solid var(--border);
  border-radius: var(--neu-radius); padding: 6px 16px;
  font-size: 12px; color: var(--text-dim); white-space: nowrap;
  cursor: pointer;
  user-select: none;
  box-shadow: var(--control-shadow);
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.chip:hover, .chip.active {
  background: var(--surface-control-hover);
  border-color: var(--border2);
  color: var(--text);
  box-shadow: var(--control-shadow-hover);
}

/* -- Shop overlay -- */
.shop-overlay {
  position: fixed; inset: 0; z-index: 20;
  background: linear-gradient(180deg, rgba(5,10,18,0.88), rgba(10,22,40,0.78));
  display: flex; align-items: center; justify-content: center;
  padding: 64px 12px 90px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.45s ease;
}
.shop-overlay.open { opacity: 1; pointer-events: auto; }

/* -- Shop panel -- */
.shop-panel {
  width: 100%; max-width: 690px; height: 100%;
  position: relative;
  background:
    var(--glow-top),
    linear-gradient(180deg, rgba(10,17,25,0.88) 0%, rgba(10,17,25,0.94) 100%);
  border: 1px solid var(--border2);
  border-radius: 28px; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--panel-shadow-strong);
  transform: scale(0.96) translateY(12px); opacity: 0;
  transition: transform 0.55s cubic-bezier(0.22,1,0.36,1), opacity 0.45s ease;
}
.shop-overlay.open .shop-panel { transform: scale(1) translateY(0); opacity: 1; }

.shop-handle {
  width: 44px; height: 4px; border-radius: 3px;
  background: rgba(113,156,178,0.28);
  margin: 12px auto 0; flex-shrink: 0;
}

/* -- Shop hero -- */
.shop-hero {
  flex-shrink: 0; padding: 14px 16px 16px;
  border-bottom: 1px solid var(--border);
}
.shop-hero-inner {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; border-radius: 20px;
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 120% 160px at 50% -20px, rgba(113,156,178,0.10) 0%, transparent 60%),
    linear-gradient(160deg, rgba(69,96,121,0.10) 0%, rgba(9,16,24,0.92) 100%);
  box-shadow: 0 6px 20px rgba(0,0,0,0.28);
}
.shop-hero-cover {
  width: 108px; height: 108px; border-radius: 18px; object-fit: cover;
  border: 1px solid rgba(255,140,0,0.18); flex-shrink: 0;
  background: linear-gradient(135deg, #0d1e2e, #060d14);
}
.shop-hero-cover-placeholder {
  width: 108px; height: 108px; border-radius: 18px; flex-shrink: 0;
  background: linear-gradient(135deg, #0d1e2e, #060d14);
  border: 1px solid rgba(255,140,0,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; color: rgba(255,140,0,0.3);
}
.shop-hero-info { flex: 1; min-width: 0; }
.shop-hero-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.shop-badge {
  font-size: 9px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px;
  border: 1px solid rgba(255,140,0,0.3); color: var(--accent);
  background: rgba(255,140,0,0.07);
}
.shop-badge.dim { color: var(--text-dim); border-color: var(--border); background: transparent; }
.shop-hero-name { font-size: 22px; font-weight: 800; line-height: 1.1; margin-bottom: 5px; color: var(--text-bright); }
.shop-hero-location { font-size: 12px; color: var(--text-dim); margin-bottom: 3px; }
.shop-hero-category { font-size: 12px; color: var(--text-dim); }
.shop-hero-address {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; font-size: 12px; color: var(--text-dim);
  padding-top: 10px; border-top: 1px solid var(--border);
}
.shop-hero-hours {
  display: flex; align-items: center; gap: 6px;
  margin-top: 6px; font-size: 12px; color: var(--text-dim);
}

.shop-hero-stat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.shop-stat-chip { padding: 4px 10px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: 1px; color: rgba(255,140,0,0.9); background: rgba(9,16,24,0.75); border: 1px solid rgba(255,140,0,0.18); }
.shop-close-btn {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: var(--neu-radius);
  background: var(--surface-control); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
  box-shadow: var(--control-shadow);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.shop-close-btn:hover { background: var(--surface-control-hover); border-color: var(--border2); box-shadow: var(--control-shadow-hover); }
.shop-panel-rel { position: relative; }

/* -- Metrics strip -- */
.shop-metrics {
  display: none;
}
.metric-cell {
  flex: 1; text-align: center; padding: 11px 6px;
  border-right: 1px solid var(--border);
}
.metric-cell:last-child { border-right: none; }
.metric-val { font-size: 17px; font-weight: 800; color: var(--primary); line-height: 1; }
.metric-lbl { font-size: 8px; font-weight: 700; letter-spacing: 1.2px; color: var(--text-dim); margin-top: 3px; text-transform: uppercase; }

/* -- Shop body (scrollable) -- */
.shop-body { flex: 1; overflow-y: auto; padding: 16px 16px 24px; }
.shop-body::-webkit-scrollbar { width: 4px; }
.shop-body::-webkit-scrollbar-track { background: transparent; }
.shop-body::-webkit-scrollbar-thumb { background: rgba(255,140,0,0.15); border-radius: 2px; }

.section-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
/* breathing room between consecutive sections */
.shop-cat-chips + .section-header,
.modal-product-grid + .section-header,
.empty-products + .section-header { margin-top: 22px; }
.section-title {
  font-size: 9px; font-weight: 800; letter-spacing: 2px;
  color: var(--text-dim); text-transform: uppercase; white-space: nowrap;
}
.section-line { flex: 1; height: 1px; background: var(--line); }

/* Category cards in shop modal - 2-column grid */
.shop-cat-chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
.shop-cat-card {
  width: auto; height: 80px; border-radius: 14px; flex-shrink: 0;
  position: relative; overflow: hidden; cursor: pointer;
  border: 1px solid rgba(255,140,0,0.10); background: #060d16;
  box-shadow: inset 0 1px 0 rgba(255,140,0,0.05);
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.shop-cat-card:hover { border-color: rgba(255,140,0,0.35); transform: scale(1.02); box-shadow: 0 6px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,140,0,0.15); }
.shop-cat-card.active { border-color: var(--accent); }
.shop-cat-card-bg {
  position: absolute; inset: 0;
  background-image: var(--cat-bg); background-size: cover; background-position: center;
  filter: blur(2px); opacity: 0.5;
}
.shop-cat-card-overlay { position: absolute; inset: 0; background: rgba(5,9,15,0.65); }
.shop-cat-card-content { position: absolute; inset: 0; padding: 12px; display: flex; flex-direction: column; }
.shop-cat-card-branch { font-size: 8px; font-weight: 800; letter-spacing: 1.5px; color: var(--accent); }
.shop-cat-card-name { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.2; margin-top: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-cat-card-count { font-size: 10px; font-weight: 600; color: var(--text-dim); margin-top: 3px; }

/* Product grid in shop modal */
.modal-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.product-card {
  background:
    radial-gradient(ellipse 100% 80px at 50% -10px, rgba(113,156,178,0.05) 0%, transparent 70%),
    rgba(9,16,24,0.92);
  border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; cursor: pointer;
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.product-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.38);
}
.product-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.product-img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: linear-gradient(135deg, #0d1e2e, #060d14); }
.product-img-placeholder {
  width: 100%; aspect-ratio: 1; background: linear-gradient(135deg, #0d1e2e, #060d14);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,140,0,0.2);
}
.product-body { padding: 8px 10px 10px; }
.product-name { font-size: 12px; font-weight: 700; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; line-height: 1.3; }
.product-price { font-size: 12px; font-weight: 800; color: var(--app-orange); margin-bottom: 2px; }
.product-price-none { font-size: 10px; color: var(--text-dim); font-weight: 600; margin-bottom: 2px; }
.product-cat-label { font-size: 10px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-products { color: var(--text-dim); font-size: 13px; text-align: center; padding: 24px 0; }
.catalog-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.catalog-bc-back { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--accent); background: none; border: none; cursor: pointer; padding: 0; }
.catalog-bc-back:hover { opacity: 0.7; }
.catalog-bc-sep { color: var(--text-dim); font-size: 14px; }
.catalog-bc-current { font-size: 11px; font-weight: 700; color: var(--text); }
.catalog-sort-chip {
  padding: 4px 9px; border-radius: var(--neu-radius); font-size: 9px; font-weight: 700;
  background: var(--surface-control); border: 1px solid var(--border); color: var(--text-dim);
  cursor: pointer;
  box-shadow: var(--control-shadow);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.catalog-sort-chip.active { background: var(--surface-fill); border-color: var(--border2); box-shadow: var(--control-shadow); color: var(--primary); }
.shop-action-row { display: flex; gap: 8px; margin-top: 22px; }
.shop-action-card {
  flex: 1; padding: 12px 14px;
  background: var(--surface-control);
  border: 1px solid var(--border); border-radius: 20px; cursor: pointer;
  box-shadow: var(--control-shadow);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.shop-action-card:hover { background: var(--surface-control-hover); border-color: var(--border2); box-shadow: var(--control-shadow-hover); }
.shop-action-label { font-size: 10px; font-weight: 700; letter-spacing: 1.3px; color: var(--text-dim); margin-bottom: 5px; }
.shop-action-value { font-size: 12px; font-weight: 700; color: var(--text); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* -- Product detail in-panel screen -- */
.pd-screen {
  position: absolute; inset: 0; z-index: 5;
  background: #05090f;
  display: block;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1);
  border-radius: inherit;
}
.pd-screen::-webkit-scrollbar { width: 4px; }
.pd-screen::-webkit-scrollbar-track { background: transparent; }
.pd-screen::-webkit-scrollbar-thumb { background: rgba(255,140,0,0.15); border-radius: 2px; }
.pd-screen.open { transform: translateX(0); }
.pd-screen-header {
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px;
  background: #05090f;
  border-bottom: 1px solid var(--line);
}
.pd-back-btn {
  width: 34px; height: 34px; border-radius: var(--neu-radius); flex-shrink: 0;
  background: var(--surface-control); border: 1px solid var(--border);
  color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--control-shadow);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.pd-back-btn:hover { background: var(--surface-control-hover); border-color: var(--border2); box-shadow: var(--control-shadow-hover); }
.pd-screen-shop-name { font-size: 13px; font-weight: 700; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* photo gallery area — Ozon-style portrait 4:5 with contain fit */
.pd-gallery-wrap {
  flex: 0 0 auto; position: relative; width: 100%;
  overflow: hidden;
  background: #040810;
  display: flex; flex-direction: column;
}
.gallery-main {
  position: relative;
  margin: 8px auto 0;
  width: calc(100% - 16px);
  max-width: 440px;
  aspect-ratio: 4 / 5;
  overflow: hidden; border-radius: 12px;
  border: none;
  background: #040810;
  box-shadow: 0 4px 20px rgba(0,0,0,0.55);
}
.gallery-main img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain; display: block;
  user-select: none; pointer-events: none;
  border-radius: 11px;
}
.gallery-main svg.pd-placeholder {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
/* thumbnail strip */
.gallery-thumbs {
  flex-shrink: 0;
  display: flex; gap: 6px;
  padding: 7px 8px;
  overflow-x: auto; scrollbar-width: none;
  align-items: center;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
  width: 44px; height: 44px; flex-shrink: 0;
  object-fit: cover; border-radius: 8px;
  border: 1.5px solid rgba(255,140,0,0.18);
  cursor: pointer;
  opacity: 0.55;
  transition: border-color 0.15s, transform 0.15s, opacity 0.15s;
  pointer-events: auto;
}
.gallery-thumb:hover { opacity: 0.82; }
.gallery-thumb.active { border-color: var(--border2); opacity: 1; transform: scale(1.08); }
/* nav arrows */
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: var(--neu-radius);
  background: var(--surface-control); border: 1px solid var(--border);
  color: var(--text); font-size: 24px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  box-shadow: var(--control-shadow);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.gallery-arrow:hover { background: var(--surface-control-hover); border-color: var(--border2); box-shadow: var(--control-shadow-hover); }
#gallery-prev, #drawer-gallery-prev { left: 10px; }
#gallery-next, #drawer-gallery-next { right: 10px; }
#gallery-counter, #drawer-gallery-counter {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 700; color: var(--text);
  background: rgba(0,0,0,0.4); padding: 2px 9px; border-radius: 20px;
  backdrop-filter: blur(4px); pointer-events: none;
  white-space: nowrap; z-index: 3;
}
.gallery-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px; z-index: 2;
}
.g-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.3); cursor: pointer; transition: background 0.15s, transform 0.15s;
}
.g-dot.active { background: var(--accent); transform: scale(1.3); }
/* info area below photo */
.pd-body {
  padding: 16px 16px 28px;
}
.pd-body::-webkit-scrollbar { width: 3px; }
.pd-body::-webkit-scrollbar-track { background: transparent; }
.pd-body::-webkit-scrollbar-thumb { background: rgba(255,140,0,0.15); border-radius: 2px; }

/* -- Drawer product detail: 3-column layout (photo+thumbs | info | other products) -- */
#drawer-pd-screen.pd-screen {
  overflow: hidden;
  display: flex; flex-direction: column;
  z-index: 8;
}
#drawer-pd-screen .pd-grid {
  flex: 1 1 auto; min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  justify-content: stretch;
  align-items: stretch;
  gap: 24px;
  padding: 18px 20px 10px;
  overflow-y: auto;
  overflow-x: hidden;
}
#drawer-pd-screen .pd-col-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 0;
  width: 100%;
  justify-self: stretch;
}
#drawer-pd-screen .pd-col-media .gallery-main {
  margin: 0;
  width: 460px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  align-self: center;
  justify-self: center;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#drawer-pd-screen .pd-col-media .gallery-main img,
#drawer-pd-screen .pd-col-media .gallery-main svg.pd-placeholder {
  border-radius: 0;
}
#drawer-pd-screen .pd-col-media .pd-gallery-wrap {
  background: transparent;
}
#drawer-pd-screen .pd-col-media .gallery-thumbs {
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  gap: 8px;
  max-width: 460px;
  width: 100%;
  justify-content: center;
  scrollbar-width: thin;
}
#drawer-pd-screen .pd-col-media .gallery-thumb {
  width: 72px; height: 90px;
  object-fit: cover;
  flex-shrink: 0;
}
#drawer-pd-screen .pd-col-info {
  min-height: 0;
  display: flex; flex-direction: column;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  align-self: stretch;
}
#drawer-pd-screen .pd-col-info .pd-body {
  padding: 0;
  width: min(340px, 100%);
  margin: 0 auto;
  display: flex; flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
#drawer-pd-screen .pd-col-info .pd-cat { display: none; }
#drawer-pd-screen .pd-col-info .drawer-pd-shop-info { margin-top: auto; }
#drawer-pd-screen .pd-col-aside {
  min-height: 0;
  display: block;
  width: 100%;
  padding-right: 4px;
  justify-self: stretch;
  align-self: start;
}
#drawer-pd-screen .pd-col-aside::-webkit-scrollbar { width: 4px; }
#drawer-pd-screen .pd-col-aside::-webkit-scrollbar-track { background: transparent; }
#drawer-pd-screen .pd-col-aside::-webkit-scrollbar-thumb { background: rgba(255,140,0,0.2); border-radius: 2px; }
.pd-aside-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #05090f;
  padding: 2px 0 10px;
}
.pd-aside-title {
  font-size: 10px; font-weight: 800; letter-spacing: 1.5px;
  color: var(--text-dim); text-transform: uppercase;
  padding: 2px 2px 8px;
}
.pd-aside-header .drawer-breadcrumb {
  margin-bottom: 8px;
  gap: 3px;
}
.pd-aside-header .drawer-bc-crumb {
  font-size: 10px;
  padding: 2px 3px;
}
.pd-aside-header .drawer-bc-sep {
  font-size: 10px;
}
.pd-aside-header .drawer-cat-chips {
  gap: 5px;
  margin-bottom: 0;
}
.pd-aside-header .drawer-cat-chip {
  padding: 4px 8px;
  font-size: 11px;
}
.pd-aside-header .drawer-cat-chip-count {
  font-size: 9px;
  padding: 1px 4px;
}
.pd-aside-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  align-content: start;
}
.pd-aside-card {
  display: block;
  min-width: 0;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(9,16,24,0.92);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0,0,0,0.30);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.pd-aside-card:hover {
  border-color: var(--border2);
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.38);
}
.pd-aside-card:active { transform: translateY(-1px); }
.pd-aside-card.active {
  border-color: var(--accent);
  background: rgba(255,140,0,0.12);
}
.pd-aside-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
}
.pd-aside-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #0d1e2e, #060d14);
  border-radius: 0;
}
.pd-aside-placeholder {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0;
  background: linear-gradient(135deg, #0d1e2e, #060d14);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,140,0,0.2);
}
.pd-aside-price {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 11px;
  font-weight: 400;
  color: var(--app-orange);
  background: rgba(10,17,25,0.82);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(255,140,0,0.16);
  line-height: 1.4;
  pointer-events: none;
}
.pd-aside-price.no-price {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 600;
}
.pd-aside-info { padding: 8px 10px 10px; }
.pd-aside-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* Narrow fallback: when drawer isn't expanded enough, drop aside below */
@media (max-width: 1100px) {
  #drawer-pd-screen.pd-screen { overflow-y: auto; }
  #drawer-pd-screen .pd-grid {
    grid-template-columns: 1fr;
    overflow: visible;
  }
  #drawer-pd-screen .pd-col-media,
  #drawer-pd-screen .pd-col-info,
  #drawer-pd-screen .pd-col-aside {
    overflow: visible;
    min-height: 0;
  }
  #drawer-pd-screen .pd-col-aside { max-height: none; }
}

.pd-cat { display: none; }
.pd-title { font-size: 20px; font-weight: 800; line-height: 1.2; margin-bottom: 8px; }
.pd-price { font-size: 22px; font-weight: 800; color: var(--app-orange); margin-bottom: 10px; }
.pd-price.no-price { font-size: 14px; color: var(--text-dim); font-weight: 600; }
.pd-sizes { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: 10px; }
.pd-sizes-label { font-size: 10px; font-weight: 700; color: rgba(255,140,0,0.65); letter-spacing: 0.5px; text-transform: uppercase; margin-right: 2px; }
.pd-size-tag {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 24px; padding: 0 7px;
  background: rgba(255,140,0,0.12); border: 1px solid rgba(255,140,0,0.25);
  border-radius: 6px; font-size: 11px; font-weight: 600; color: var(--app-orange);
}
.pd-desc { font-size: 14px; color: var(--app-orange); line-height: 1.55; }

/* -- Product detail: shop info block -- */
.pd-shop-info { margin-top: 6px; }
.drawer-pd-shop-info { margin-top: 6px; }
.dpd-shop-divider {
  height: 1px;
  background: var(--border);
  margin: 14px 0 12px;
}
.dpd-shop-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 8px;
}
.dpd-shop-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 5px;
}
.dpd-shop-row svg { flex-shrink: 0; opacity: 0.6; }
.dpd-shop-open-btn {
  margin-top: 14px;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255,140,0,0.24);
  border-radius: var(--neu-radius);
  background: rgba(255,140,0,0.08);
  color: var(--app-orange);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  box-shadow: var(--control-shadow);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.dpd-shop-open-btn:hover {
  background: rgba(255,140,0,0.14);
  border-color: rgba(255,140,0,0.36);
  box-shadow: var(--control-shadow-hover);
}


/* -- Auth modal -- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: linear-gradient(180deg, rgba(5,10,18,0.88), rgba(10,22,40,0.80));
  display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  position: relative; overflow: hidden;
  background:
    var(--glow-top),
    linear-gradient(180deg, rgba(10,17,25,0.88) 0%, rgba(10,17,25,0.94) 100%);
  border: 1px solid var(--border2);
  border-radius: 24px; padding: 32px 28px;
  width: 100%; max-width: 380px;
  box-shadow: var(--panel-shadow);
}
.modal h2 { font-size: 18px; margin-bottom: 20px; text-align: center; }
.modal .tabs { display: flex; gap: 0; margin-bottom: 20px; border-radius: var(--neu-radius); overflow: hidden; border: 1px solid var(--border); box-shadow: none; background: var(--surface-control); }
.modal .tab {
  flex: 1; padding: 10px; text-align: center; font-size: 13px; font-weight: 600;
  cursor: pointer; background: transparent; color: var(--text-dim); border: none;
  transition: background 0.2s, color 0.2s;
}
.modal .tab.active { color: var(--primary); background: var(--surface-fill); }
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-dim); margin-bottom: 6px;
}
.form-group input {
  width: 100%; background: var(--surface-fill); border: 1px solid var(--border2);
  border-radius: var(--neu-radius); padding: 10px 14px; color: var(--text); font-size: 14px; outline: none;
  box-shadow: var(--control-shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 1px rgba(113,156,178,0.26), var(--control-shadow); }
.btn-submit {
  width: 100%; padding: 12px; border: 1px solid var(--border2); border-radius: var(--neu-radius); font-size: 14px; font-weight: 700;
  background: var(--surface-fill);
  color: var(--primary); cursor: pointer; letter-spacing: 0.5px;
  box-shadow: var(--control-shadow);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  margin-top: 6px;
}
.btn-submit:hover { border-color: var(--primary); box-shadow: var(--control-shadow-hover); }
.btn-submit:active { box-shadow: 0 4px 12px rgba(0,0,0,0.18); }
.auth-error { color: #FF9E5B; font-size: 12px; margin-bottom: 10px; text-align: center; min-height: 16px; }
.user-badge {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-control); border: 1px solid var(--border);
  border-radius: 12px; padding: 6px 14px 6px 10px;
  font-size: 12px; color: var(--primary);
}
.user-badge .avatar { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--accent2), #1a3a50); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.user-badge .logout-btn { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 14px; margin-left: 4px; }

/* -- Marker -- */
.map-marker {
  width: 36px; height: 36px;
  cursor: pointer;
}
.map-marker-inner {
  width: 100%; height: 100%; border-radius: 50%;
  border: 2.5px solid var(--app-orange);
  background: #EFF7FF;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--app-orange);
  box-shadow: 0 4px 16px rgba(255,140,0,0.28), 0 1px 4px rgba(0,0,0,0.15);
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
}
.map-marker:hover .map-marker-inner {
  transform: scale(1.2);
  box-shadow: 0 6px 20px rgba(255,140,0,0.38), 0 2px 6px rgba(0,0,0,0.2);
}
.map-marker-inner img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* -- Event marker -- */
/* -- City dots (zoom-out view) -- */
.city-dot { cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.city-dot-circle {
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255,140,0,0.22);
  border: 2px solid rgba(255,140,0,0.7);
  box-shadow: 0 0 10px rgba(255,140,0,0.32);
  transition: transform 0.15s, box-shadow 0.15s;
}
.city-dot:hover .city-dot-circle { transform: scale(1.4); box-shadow: 0 0 18px rgba(255,140,0,0.56); }
.city-dot.active .city-dot-circle {
  background: rgba(255,140,0,0.42);
  border-color: #FF8C00;
  box-shadow: 0 0 16px rgba(255,140,0,0.72);
}
.city-dot-label {
  font-size: 10px; font-weight: 700; color: var(--text);
  background: rgba(6,10,18,0.72); border-radius: 4px; padding: 1px 5px;
  white-space: nowrap; backdrop-filter: blur(4px); pointer-events: none;
}

.category-dot { cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.category-dot-circle {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,140,0,0.2);
  border: 2px solid rgba(255,140,0,0.75);
  box-shadow: 0 0 10px rgba(255,140,0,0.35);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.category-dot-count { font-size: 9px; font-weight: 700; color: var(--text); line-height: 1; }
.category-dot:hover .category-dot-circle { transform: scale(1.35); box-shadow: 0 0 18px rgba(255,140,0,0.58); }
.category-dot.active .category-dot-circle {
  background: rgba(255,140,0,0.40);
  border-color: #FF8C00;
  box-shadow: 0 0 16px rgba(255,140,0,0.72);
}
.category-dot-label {
  font-size: 10px; font-weight: 700; color: var(--text);
  background: rgba(6,10,18,0.72); border-radius: 4px; padding: 1px 5px;
  white-space: nowrap; backdrop-filter: blur(4px); pointer-events: none;
}

/* -- Category pick sheet -- */
/* cat runners SVG - fixed full-viewport overlay, above modal */
.cat-runners-svg {
  display: none;
}

#cat-pick-modal { align-items: flex-start; justify-content: flex-start; padding: 0; background: transparent; pointer-events: none; }
#cat-pick-modal.open { pointer-events: auto; }
.cat-pick-sheet {
  position: absolute;
  width: 260px;
  background: var(--surface-container-strong);
  border: 1px solid rgba(255,140,0,0.25);
  border-radius: 16px;
  padding: 14px 14px 18px;
  box-shadow: 0 20px 48px rgba(0,0,0,0.52), 0 0 16px rgba(255,140,0,0.12);
  transform: translateY(8px);
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0.34,1.06,0.64,1), opacity 0.18s ease;
}
#cat-pick-modal.open .cat-pick-sheet { transform: translateY(0); opacity: 1; }
.cat-pick-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.cat-pick-title { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: 0.4px; }
.cat-pick-close {
  width: 28px; height: 28px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--surface-control);
  color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.cat-pick-close:hover { background: var(--surface-control-hover); color: var(--text); }
.cat-pick-list {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.cat-pick-item {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 12px; border: 1px solid rgba(255,140,0,0.25);
  background: rgba(255,140,0,0.08);
  color: var(--text-dim); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cat-pick-item:hover { background: rgba(255,140,0,0.18); color: var(--text); }
.cat-pick-item.active {
  background: rgba(255,140,0,0.22);
  border-color: rgba(255,140,0,0.7);
  color: var(--text);
  box-shadow: 0 0 10px rgba(255,140,0,0.3);
}
.cat-pick-count {
  font-size: 11px; font-weight: 700;
  background: rgba(255,140,0,0.18); color: var(--accent);
  border-radius: 8px; padding: 1px 6px; min-width: 18px; text-align: center;
}
.cat-pick-item.active .cat-pick-count { background: rgba(255,140,0,0.30); color: var(--text); }
#category-pick-btn.active .round-btn-icon svg { stroke: var(--accent); }
#category-pick-btn.active .round-btn-label { color: var(--accent); }

.event-marker { cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.event-marker-inner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2.5px solid #FF8C00;
  background: rgba(6,10,18,0.75);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 12px rgba(255,140,0,0.4), 0 4px 12px rgba(0,0,0,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.event-marker-inner.ev-live {
  border-color: #FF8C00;
  box-shadow: 0 0 12px rgba(255,140,0,0.5), 0 4px 12px rgba(0,0,0,0.4);
  animation: ev-pulse 1.6s ease-in-out infinite;
}
@keyframes ev-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255,140,0,0.4), 0 4px 12px rgba(0,0,0,0.4); }
  50% { box-shadow: 0 0 24px rgba(255,140,0,0.78), 0 4px 12px rgba(0,0,0,0.4); }
}
.event-marker:hover .event-marker-inner { transform: scale(1.2); }
.event-marker-label {
  font-size: 9px; font-weight: 700; color: var(--text); letter-spacing: 0.3px;
  background: rgba(6,10,18,0.7); border-radius: 4px; padding: 1px 4px;
  white-space: nowrap; max-width: 90px; overflow: hidden; text-overflow: ellipsis;
  backdrop-filter: blur(4px); pointer-events: none;
}

/* -- Event panel -- */
.event-panel {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(20px);
  width: calc(100% - 32px); max-width: 500px;
  background: var(--surface-container-strong);
  border: 1px solid var(--border2);
  border-radius: 20px;
  z-index: 30;
  padding: 18px 20px 20px;
  box-shadow: var(--panel-shadow);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.28s cubic-bezier(0.22,1,0.36,1);
}
.event-panel.open { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.event-panel-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; cursor: pointer; color: var(--text-dim); padding: 4px;
}
.event-panel-close:hover { color: var(--text); }
.ev-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ev-category { font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--primary); }
.ev-status { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.ev-status-live     { background: rgba(255,140,0,0.15); color: #FF8C00; border: 1px solid rgba(255,140,0,0.35); }
.ev-status-assembly { background: rgba(255,140,0,0.15); color: #FF8C00; border: 1px solid rgba(255,140,0,0.35); }
.ev-status-upcoming { background: rgba(255,140,0,0.15); color: #FF8C00; border: 1px solid rgba(255,140,0,0.35); }
.ev-title { font-size: 17px; font-weight: 800; color: var(--text-bright); margin-bottom: 8px; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--text-dim); margin-bottom: 10px; }
.ev-timer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.ev-timer-label { font-size: 9px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.ev-timer-value { font-size: 22px; font-weight: 900; color: var(--text-bright); font-family: monospace; letter-spacing: 2px; }
.ev-timer-live { color: #FF8C00; }
.ev-timer-assembly { color: #FF8C00; }
.ev-phase-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; }
.ev-phase-value { font-size: 28px; font-weight: 900; font-family: monospace; letter-spacing: 2px; margin-right: 16px; }
.ev-teams { display: flex; align-items: flex-start; gap: 10px; }
.ev-team { flex: 1; }
.ev-team-name { font-size: 11px; font-weight: 700; color: var(--text); margin-bottom: 6px; text-align: center; }
.ev-slots { display: flex; flex-direction: column; gap: 4px; }
.ev-slot { font-size: 11px; padding: 4px 8px; border-radius: 8px; text-align: center; }
.ev-slot.filled { background: rgba(255,140,0,0.10); color: var(--text); border: 1px solid rgba(255,140,0,0.20); }
.ev-slot.empty { background: rgba(255,255,255,0.04); color: var(--text-dim); border: 1px dashed rgba(255,255,255,0.1); }
.ev-vs { font-size: 13px; font-weight: 900; color: var(--text-dim); padding-top: 22px; flex-shrink: 0; }

/* -- Shop-open state -- */
body.shop-open .bottom-bar { z-index: 25; }

/* -- In-panel shop search -- */
.shop-panel-search {
  flex-shrink: 0;
  display: flex; align-items: center;
  padding: 8px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(69,96,121,0.08);
}
.shop-panel-search input {
  flex: 1; background: none; border: none; color: var(--text);
  font-size: 13px; outline: none; padding: 0;
}
.shop-panel-search input::placeholder { color: var(--text-dim); }

/* -- Global search panel -- */
#global-panel {
  display: none;
  position: fixed;
  top: 64px; bottom: 92px;
  z-index: 22;
  flex-direction: column;
  overflow: hidden;
  background:
    var(--glow-top),
    linear-gradient(180deg, rgba(10,17,25,0.88) 0%, rgba(10,17,25,0.94) 100%);
  border: 1px solid var(--border2);
  border-radius: 24px;
  box-shadow: var(--panel-shadow);
  opacity: 0; pointer-events: none;
  transform: translateX(20px);
  transition: opacity 0.28s cubic-bezier(0.22,1,0.36,1), transform 0.32s cubic-bezier(0.22,1,0.36,1);
}
.global-panel-header {
  flex-shrink: 0; padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border); position: relative;
}
.global-panel-title-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px; padding-right: 36px;
}
.global-panel-label {
  font-size: 10px; font-weight: 800; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--text-dim);
}
.global-panel-count {
  font-size: 11px; font-weight: 800; color: var(--primary);
  background: var(--surface-tag); border: 1px solid var(--border);
  border-radius: 8px; padding: 1px 8px; line-height: 1.6;
}
.global-panel-filters {
  display: flex; gap: 6px; flex-wrap: wrap; min-height: 0;
}
.global-panel-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: var(--neu-radius);
  background: var(--surface-control); border: 1px solid var(--border);
  color: var(--text-dim); display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--control-shadow);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.global-panel-close:hover { background: var(--surface-control-hover); border-color: var(--border2); box-shadow: var(--control-shadow-hover); }
.global-panel-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.global-panel-body {
  flex: 1; overflow-y: auto; padding: 14px 14px 16px;
  scrollbar-width: thin; scrollbar-color: rgba(255,140,0,0.15) transparent;
}
.global-panel-body::-webkit-scrollbar { width: 4px; }
.global-panel-body::-webkit-scrollbar-track { background: transparent; }
.global-panel-body::-webkit-scrollbar-thumb { background: rgba(255,140,0,0.15); border-radius: 2px; }
.global-panel-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.global-city-separator {
  grid-column: 1 / -1; font-size: 9px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-dim); padding: 6px 2px 2px;
}
.drawer-city-separator {
  font-size: 10px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--primary); padding: 12px 4px 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.global-panel-empty {
  text-align: center; color: var(--text-dim); font-size: 13px; padding: 40px 0;
}
.global-filter-chip {
  padding: 4px 10px; border-radius: var(--neu-radius); font-size: 11px; font-weight: 600;
  background: var(--surface-control); border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer; user-select: none; white-space: nowrap;
  box-shadow: var(--control-shadow);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.global-filter-chip:hover { background: var(--surface-control-hover); border-color: var(--border2); box-shadow: var(--control-shadow-hover); color: var(--text); }
.global-filter-chip.active { background: var(--surface-fill); border-color: var(--border2); box-shadow: var(--control-shadow); color: var(--primary); }
.global-filter-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* -- Responsive -- */
@media (max-width: 600px) {
  .bottom-bar { gap: 8px; }
  .shop-panel { max-height: 80vh; }
  .modal-product-grid { grid-template-columns: repeat(2, 1fr); min-width: 0; }
  #products-btn { display: none; }
  #favorites-btn { display: none; }
}
@media (max-width: 400px) {
  .round-btn { width: 46px; height: 46px; }
  .search-bar { height: 46px; padding: 4px 14px; }
  .chip { padding: 5px 12px; font-size: 11px; }
  .bottom-bar { bottom: 16px; gap: 6px; }
  .modal { padding: 24px 18px; }
}
@media (min-width: 768px) {
  .modal-product-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .shop-hero-name { font-size: 24px; }
  .shop-handle { display: none; }
}

/* -- Product Drawer (desktop only) -- glass overlay on map -- */

@media (min-width: 768px) {
  .product-drawer {
    position: fixed;
    /* Symmetric: bottom padding = distance from bottom-bar top to screen bottom (24px bar-bottom + 69px btn + 12px gap = 105px) */
    bottom: 105px;
    top: 105px;
    left: 24px;
    width: 690px;
    overflow: hidden;
    background: var(--surface-panel);
    border: 1px solid var(--border2);
    border-radius: 24px;
    z-index: 15;
    display: flex;
    flex-direction: column;
    box-shadow: var(--panel-shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-20px);
    transition: opacity 0.28s cubic-bezier(0.22,1,0.36,1),
                transform 0.32s cubic-bezier(0.22,1,0.36,1),
                left 0.32s cubic-bezier(0.22,1,0.36,1),
                right 0.32s cubic-bezier(0.22,1,0.36,1),
                width 0.32s cubic-bezier(0.22,1,0.36,1);
  }
  .product-drawer.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }
  /* When the shop (catalog) panel is open, shift the drawer to the right of it
     and let its width fill the remaining space. */
  body.shop-open .product-drawer {
    left: calc(24px + 690px + 12px);
    right: 24px;
    width: auto;
  }
  /* Compressed-mode grids: drawer products and in-detail aside become 2-column */
  body.shop-open .product-drawer .product-drawer-grid {
    grid-template-columns: repeat(2, minmax(140px, 156px));
    justify-content: start;
    align-items: start;
  }
  body.shop-open .product-drawer .pd-aside-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: start;
    align-items: start;
  }
  body.shop-open .product-drawer .drawer-product-card,
  body.shop-open .product-drawer .pd-aside-card {
    width: 100%;
    max-width: 168px;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.26);
  }
  body.shop-open .product-drawer .drawer-product-info,
  body.shop-open .product-drawer .pd-aside-info {
    padding: 7px 8px 8px;
  }
  body.shop-open .product-drawer .drawer-product-name,
  body.shop-open .product-drawer .drawer-product-shop,
  body.shop-open .product-drawer .pd-aside-name {
    font-size: 11px;
  }
  body.shop-open .product-drawer .drawer-product-price,
  body.shop-open .product-drawer .pd-aside-price {
    bottom: 5px;
    left: 5px;
    font-size: 10px;
    padding: 2px 6px;
  }

  /* header */
  .product-drawer-header {
    flex-shrink: 0;
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--border);
    position: relative;
  }
  .product-drawer-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    padding-right: 36px;
  }
  .product-drawer-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-dim);
  }
  .product-drawer-count {
    font-size: 11px;
    font-weight: 800;
    color: var(--accent);
    background: rgba(255,140,0,0.1);
    border: 1px solid rgba(255,140,0,0.2);
    border-radius: 8px;
    padding: 1px 8px;
    line-height: 1.6;
  }
  /* City name: centered title in drawer header */
  .product-drawer-city {
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    letter-spacing: 0.3px;
    padding: 2px 0 4px;
  }
  /* Breadcrumb: path between categories */
  .drawer-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
    flex-wrap: wrap;
  }
  .drawer-bc-crumb {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
  }
  .drawer-bc-crumb:hover { color: var(--text); background: var(--primary-soft); }
  .drawer-bc-crumb.active { color: var(--text); pointer-events: none; }
  .drawer-bc-sep { font-size: 11px; color: var(--text-dim); opacity: 0.5; user-select: none; }
  .drawer-filters-sticky {
    position: relative;
    z-index: 1;
  }
  body.shop-open .drawer-filters-sticky {
    position: sticky;
    top: -14px;
    z-index: 2;
    margin: -14px -14px 12px;
    padding: 14px 14px 12px;
    background: linear-gradient(180deg, rgba(7,12,18,0.98) 0%, rgba(7,12,18,0.94) 80%, rgba(7,12,18,0) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255,140,0,0.08);
  }
  body.shop-open .drawer-filters-sticky .drawer-breadcrumb {
    margin-bottom: 8px;
  }
  body.shop-open .drawer-filters-sticky .drawer-cat-chips {
    margin-bottom: 0;
  }
  /* Horizontal filter chips strip */
  .drawer-cat-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }
  .drawer-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: var(--neu-radius);
    font-size: 12px;
    font-weight: 600;
    background: var(--surface-control);
    border: 1px solid var(--border);
    color: var(--text-dim);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    box-shadow: var(--control-shadow);
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
  }
  .drawer-cat-chip:hover {
    background: var(--surface-control-hover);
    border-color: var(--border2);
    box-shadow: var(--control-shadow-hover);
    color: var(--text);
  }
  .drawer-cat-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
  .drawer-cat-chip-count {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    background: var(--surface-tag);
    border-radius: 6px;
    padding: 1px 5px;
    line-height: 1.5;
  }
  .product-drawer-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border-radius: var(--neu-radius);
    background: var(--surface-control);
    border: 1px solid var(--border);
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--control-shadow);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  }
  .product-drawer-close:hover { background: var(--surface-control-hover); border-color: var(--border2); box-shadow: var(--control-shadow-hover); }
  .product-drawer-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
  .product-drawer-expand {
    margin-left: auto;
    width: 26px;
    height: 26px;
    border-radius: var(--neu-radius);
    background: var(--surface-control);
    border: 1px solid var(--border);
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: var(--control-shadow);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  }
  .product-drawer-expand:hover { background: var(--surface-control-hover); border-color: var(--border2); box-shadow: var(--control-shadow-hover); }
  .product-drawer-expand:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

  /* body */
  .product-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,140,0,0.15) transparent;
  }
  .product-drawer-body::-webkit-scrollbar { width: 4px; }
  .product-drawer-body::-webkit-scrollbar-track { background: transparent; }
  .product-drawer-body::-webkit-scrollbar-thumb { background: rgba(255,140,0,0.15); border-radius: 2px; }

  /* Fixed card width - same in both normal and expanded states, no reflow */
  .product-drawer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }

  /* product card */
  .drawer-product-card {
    background: rgba(9,16,24,0.92);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0,0,0,0.30);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  }
  .drawer-product-card:hover {
    border-color: var(--border2);
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(0,0,0,0.38);
  }
  .drawer-product-card:active { transform: translateY(-1px); }
  .drawer-product-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

  .drawer-product-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
  }
  .drawer-product-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: linear-gradient(135deg, #0d1e2e, #060d14);
    display: block;
  }
  .drawer-product-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #0d1e2e, #060d14);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,140,0,0.2);
  }
  .drawer-product-price {
    position: absolute;
    bottom: 6px;
    left: 6px;
    font-size: 11px;
    font-weight: 400;
    color: var(--app-orange);
    background: rgba(10,17,25,0.82);
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid rgba(255,140,0,0.16);
    line-height: 1.4;
    pointer-events: none;
  }
  .drawer-product-info { padding: 8px 10px 10px; }
  .drawer-product-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
    line-height: 1.3;
  }
  .drawer-product-shop {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .drawer-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
    padding: 40px 0;
  }

  /* active state for products button */
  #products-btn.active {
    border-color: var(--primary);
    background: var(--surface-panel);
    box-shadow: var(--control-shadow-hover);
  }
  #products-btn.active .round-btn-label { color: var(--primary); }

  /* drawer runners SVG - fixed full-viewport overlay, always visible */
  .drawer-runners-svg {
    display: none;
  }
  #favorites-btn.active {
    border-color: var(--app-orange);
    background: rgba(255,140,0,0.1);
  }
  #favorites-btn.active .round-btn-label { color: var(--app-orange); }

  /* expanded drawer stretches right */
  .product-drawer.expanded {
    left: 24px;
    right: 24px;
    width: auto;
  }

  /* shop panel: fixed left sidebar on desktop */
  .shop-overlay {
    inset: unset;
    top: 64px; left: 24px; bottom: 92px; right: auto;
    width: 690px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    pointer-events: none;
    align-items: stretch;
    justify-content: flex-start;
    transition: opacity 0.25s;
  }
  .shop-overlay.open { pointer-events: auto; }
  .shop-panel {
    max-width: 100%;
    width: 100%;
    height: 100%;
    transform: translateX(-16px) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), opacity 0.25s;
  }
  .shop-overlay.open .shop-panel { transform: translateX(0) scale(1); }

  /* global panel: right of shop overlay when catalog is open */
  #global-panel {
    display: flex;
    left: 24px;
    right: 24px;
  }
  body.shop-open.global-search-open #global-panel {
    left: calc(24px + 690px + 8px);
  }
  body.global-search-open #global-panel {
    opacity: 1; pointer-events: auto; transform: translateX(0);
  }
}

/* -- prefers-reduced-motion -- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .shop-panel { transition: none; }
  .round-btn { transition: none; }
}

/* ===================================================================
   Wide screen layout (? 900px)
   Overlay-model: map is fullscreen, panels float on top with glass effect.
   - Map occupies 100% of the viewport (fixed, z-index 0).
   - Panels overlay on the left side with backdrop-filter blur.
   - shop-overlay, global-panel, product-drawer are all positioned
     as fixed glass panels over the map.
=================================================================== */
@media (min-width: 900px) {

  /* -- All panels overlay the map as glass cards -- */

  /* -- Map: near-fullscreen with rounded corners -- */
  #map {
    position: fixed;
    inset: 12px;
    width: calc(100% - 24px); height: calc(100% - 24px);
    border-radius: 20px;
    overflow: hidden;
    margin: 0;
  }

  /* -- Product drawer: glass overlay on the left -- */
  .product-drawer {
    left: 16px;
    width: 570px;
    background: var(--surface-panel);
    border: 1px solid var(--border2);
    box-shadow: var(--panel-shadow);
  }

  /* -- Expanded: full-width glass overlay -- */
  .product-drawer.expanded {
    left: 16px;
    right: 16px;
    width: auto;
  }

  /* -- Drawer next to shop panel: shift right to clear the 570px shop overlay -- */
  body.shop-open .product-drawer {
    left: calc(16px + 570px + 12px);
    right: 16px;
    width: auto;
  }

  /* -- Shop overlay: glass panel on the left -- */
  .shop-overlay {
    top: 64px;
    bottom: 92px;
    left: 16px;
    width: 570px;
  }
  body.shop-open .shop-overlay {
    bottom: 92px;
  }

  /* -- Collapsed drawer when shop is open: TEMPORARILY HIDDEN -- */

  /* -- Global search panel: glass overlay -- */
  #global-panel {
    display: flex;
    left: 16px;
    right: 16px;
    width: auto;
  }
  body.shop-open.global-search-open #global-panel {
    left: calc(16px + 570px + 8px);
  }
  body.global-search-open #global-panel {
    opacity: 1; pointer-events: auto; transform: translateX(0);
  }

  /* When global search is open, hide drawer */
  body.global-search-open .product-drawer {
    display: none;
  }
}

/* -- Utility -- */
.d-none { display: none !important; }

/* -- Welcome overlay -- */
/* #welcome-overlay reuses .modal-overlay and .modal */
.welcome-brand {
  text-align: center;
  margin-bottom: 24px;
}
.welcome-logo {
  font-size: 16px; font-weight: 800; letter-spacing: 4px;
  text-transform: uppercase; color: var(--primary);
}
.welcome-tagline {
  font-size: 12px; color: var(--text-dim); margin-top: 8px;
  letter-spacing: 0.3px;
}
.welcome-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 0 14px;
}
.welcome-divider::before,
.welcome-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.welcome-divider span {
  font-size: 11px; color: var(--text-dim); white-space: nowrap;
}
.welcome-map-btn {
  width: 100%; padding: 12px; border-radius: var(--neu-radius); font-size: 14px;
  font-weight: 700; letter-spacing: 0.3px; cursor: pointer;
  border: 1px solid var(--border2);
  background: var(--surface-fill);
  color: var(--primary);
  box-shadow: var(--control-shadow);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.welcome-map-btn:hover {
  border-color: var(--primary);
  box-shadow: var(--control-shadow-hover);
}
.welcome-map-btn:active {
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.welcome-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; font-size: 13px; padding: 0; margin-bottom: 16px;
  transition: color 0.2s;
}
.welcome-back-btn:hover { color: var(--text); }
.welcome-city-title {
  font-size: 14px; font-weight: 700; margin-bottom: 12px;
}

/* -- Controls: rounded rectangles, not pills -- */
.round-btn,
.search-bar,
.btn-cancel,
.user-menu-logout,
.user-menu-panel-btn,
.chip,
.shop-close-btn,
.catalog-sort-chip,
.pd-back-btn,
.gallery-arrow,
.dpd-shop-open-btn,
.modal .tabs,
.form-group input,
.btn-submit,
.cat-pick-close,
.cat-pick-item,
.global-panel-close,
.global-filter-chip,
.drawer-cat-chip,
.product-drawer-close,
.product-drawer-expand,
.welcome-map-btn {
  border-radius: var(--control-radius);
}

/* ============================================================
   MOBILE (phones / small tablets) — Avito-like layout
   Mirrors the Flutter app bottom nav but with "Категории"
   replacing "Скоро" at the middle slot.
   ============================================================ */

/* Mobile tabs are hidden by default (shown only in the mobile media block) */
.mobile-tab { display: none; }

@media (max-width: 768px) {
  html, body { -webkit-text-size-adjust: 100%; overscroll-behavior: none; }

  /* -- Map fills the viewport -- */
  #map {
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  /* -- Hide brand notch on mobile (Avito-like clean top) -- */
  .top-notch { display: none !important; }

  /* -- Bottom bar: flat 4-tab strip pinned to bottom with safe-area -- */
  .bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    transform: none;
    width: 100%;
    max-width: none;
    gap: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(10, 17, 25, 0.94);
    border-top: 1px solid var(--border2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.35);
    z-index: 30;
  }

  /* Hide desktop-only bottom-bar items on mobile */
  .bottom-bar .btn-arc-group,
  .bottom-bar #products-btn,
  .bottom-bar #city-btn,
  .bottom-bar .btn-arc-svg,
  .bottom-bar .search-bar-wrapper,
  .bottom-bar #main-search-bar,
  .bottom-bar #favorites-btn { display: none !important; }

  /* Show mobile tabs */
  .bottom-bar .mobile-tab { display: flex; }

  /* All remaining bottom-bar buttons become equal tabs */
  .bottom-bar .round-btn,
  .bottom-bar #auth-area {
    flex: 1 1 0;
    min-width: 0;
  }
  .bottom-bar #auth-area > .round-btn { width: 100%; }
  .bottom-bar .round-btn {
    width: auto;
    height: 56px;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
    box-shadow: none;
    gap: 2px;
    padding: 6px 4px;
  }
  .bottom-bar .round-btn:hover,
  .bottom-bar .round-btn:active {
    background: rgba(255, 140, 0, 0.08);
    border-color: transparent;
    box-shadow: none;
    transform: none;
  }
  .bottom-bar .round-btn .round-btn-icon {
    width: 22px; height: 22px;
    color: var(--text-dim);
  }
  .bottom-bar .round-btn .round-btn-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-dim);
    max-width: 100%;
  }
  .bottom-bar .round-btn.active,
  .bottom-bar .round-btn[aria-current="page"] { background: rgba(255, 140, 0, 0.10); }
  .bottom-bar .round-btn.active .round-btn-icon,
  .bottom-bar .round-btn.active .round-btn-label,
  .bottom-bar #category-pick-btn.active .round-btn-icon,
  .bottom-bar #category-pick-btn.active .round-btn-label { color: var(--accent); }
  .bottom-bar .round-btn.active .round-btn-icon svg { stroke: var(--accent); }
  .bottom-bar .user-initial {
    width: 22px; height: 22px;
    font-size: 12px;
  }

  /* -- Shop overlay → full-screen sheet -- */
  .shop-overlay {
    padding: 0;
    background: var(--app-bg-primary);
    align-items: stretch;
    justify-content: stretch;
  }
  .shop-panel {
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 0;
    border: none;
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }
  .shop-handle { display: none; }

  /* -- Product drawer → full-screen sheet, not side-by-side -- */
  .product-drawer {
    display: none;
  }
  .product-drawer.open {
    display: flex;
    flex-direction: column;
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
    border: none !important;
    background: var(--surface-panel);
    z-index: 25;
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  /* Make sure the desktop "body.shop-open shifts drawer" rule doesn't apply */
  body.shop-open .product-drawer.open { left: 0 !important; }
  body.shop-open .shop-overlay { left: 0 !important; right: 0 !important; width: 100% !important; }

  /* Drawer internal: single column catalog for readability */
  .product-drawer .product-drawer-grid,
  body.shop-open .product-drawer .product-drawer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
  }
  /* Inline product detail (pd-screen inside drawer) stacks vertically */
  #drawer-pd-screen .pd-grid,
  .product-drawer .pd-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 12px !important;
  }
  .pd-aside-grid,
  body.shop-open .product-drawer .pd-aside-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  /* -- Global search panel → full-screen -- */
  #global-panel {
    top: 0 !important;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
    border: none !important;
    transform: translateY(14px);
  }
  body.global-search-open #global-panel { transform: translateY(0); }
  body.shop-open.global-search-open #global-panel { left: 0 !important; right: 0 !important; }

  /* -- Category pick sheet → bottom sheet -- */
  .cat-pick-sheet {
    width: 100%;
    max-width: none;
    border-radius: 20px 20px 0 0;
    max-height: 80vh;
  }
  #cat-pick-modal {
    align-items: flex-end;
    padding: 0;
  }

  /* -- City modal → full-width bottom sheet -- */
  #city-modal .modal {
    width: 100%;
    max-width: none;
    border-radius: 20px 20px 0 0;
    margin-top: auto;
  }
  #city-modal { align-items: flex-end; padding: 0; }

  /* -- Avito-style product cards: image on top, info below -- */
  .product-card,
  .drawer-product-card,
  .pd-aside-card,
  .global-product-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
  }
  .product-card .product-image,
  .drawer-product-card .drawer-product-image,
  .pd-aside-card .pd-aside-image,
  .global-product-card .global-product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 12px 12px 0 0;
  }
  .product-card .product-info,
  .drawer-product-card .drawer-product-info,
  .pd-aside-card .pd-aside-info,
  .global-product-card .global-product-info {
    padding: 8px 10px 10px;
    gap: 4px;
  }
  .product-card .product-price,
  .drawer-product-card .drawer-product-price,
  .pd-aside-card .pd-aside-price,
  .global-product-card .global-product-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--accent);
  }
  .product-card .product-name,
  .drawer-product-card .drawer-product-name,
  .pd-aside-card .pd-aside-name,
  .global-product-card .global-product-name {
    font-size: 13px;
    line-height: 1.25;
    font-weight: 500;
  }

  /* -- Global panel products grid: 2 col Avito-like -- */
  #global-panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; }

  /* Modal product grid (shop panel) stays 2-col already via existing rule */

  /* -- Drawer filter chips slightly smaller -- */
  .drawer-filters-sticky,
  .pd-aside-header { padding: 8px 10px; }

  /* Hide expand button on mobile (drawer is already fullscreen) */
  .product-drawer .product-drawer-expand { display: none; }

  /* -- User menu pinned above bottom bar -- */
  .user-menu {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    right: 10px;
    left: 10px;
    min-width: 0;
  }
}

/* Extra-small phones */
@media (max-width: 400px) {
  .bottom-bar .round-btn { height: 54px; }
  .bottom-bar .round-btn .round-btn-label { font-size: 9px; letter-spacing: 0.4px; }
  .bottom-bar .round-btn .round-btn-icon { width: 20px; height: 20px; }
}

