/* ---------- Дизайн-система Parfum Lider ---------- */
:root {
  --bg: #f7f5f2;
  --surface: #ffffff;
  --ink: #1d1a16;
  --ink-soft: #4c463e;
  --muted: #8d857a;
  --line: #e8e3dc;
  --accent: #a07c46;
  --accent-dark: #826334;
  --accent-soft: #f3ece1;
  --sale: #c0455e;
  --ok: #3a7d44;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29,26,22,.05), 0 8px 24px rgba(29,26,22,.06);
  --shadow-hover: 0 2px 4px rgba(29,26,22,.06), 0 14px 34px rgba(29,26,22,.12);
  --font: "Manrope", system-ui, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
img { max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 14px 32px; background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.logo {
  font-family: var(--font-display); font-size: 26px; font-weight: 700;
  letter-spacing: .01em; white-space: nowrap;
}
.logo span { color: var(--accent); font-style: italic; }
.logo-footer { font-size: 22px; }

.city-btn {
  display: inline-flex; align-items: center; gap: 6px; border: none; background: none;
  font-weight: 700; font-size: 13.5px; color: var(--ink-soft); padding: 8px 10px;
  border-radius: 10px; white-space: nowrap;
}
.city-btn:hover { background: var(--accent-soft); color: var(--accent-dark); }
.city-btn svg { width: 16px; height: 16px; fill: none; stroke: var(--accent-dark); stroke-width: 2; }
.city-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; max-height: 50vh; overflow-y: auto; }
.city-list button {
  text-align: left; padding: 10px 14px; border: none; background: none; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
}
.city-list button:hover { background: var(--accent-soft); color: var(--accent-dark); }
.city-list button.active { background: var(--ink); color: #fff; }

.search-wrap { position: relative; flex: 1; max-width: 560px; }
.search-wrap input {
  width: 100%; padding: 11px 16px 11px 42px; border: 1.5px solid var(--line);
  border-radius: 999px; background: var(--bg); outline: none; transition: border .15s;
}
.search-wrap input:focus { border-color: var(--accent); background: #fff; }
.search-icon {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 2;
}
.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-hover);
  overflow: hidden; max-height: 420px; overflow-y: auto;
}
.suggest-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; cursor: pointer; }
.suggest-item:hover { background: var(--accent-soft); }
.suggest-item img { width: 38px; height: 38px; object-fit: contain; }
.suggest-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 10px 16px 2px; }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn {
  position: relative; display: grid; place-items: center; width: 42px; height: 42px;
  border: none; background: transparent; border-radius: 12px; transition: background .15s;
}
.icon-btn:hover { background: var(--accent-soft); }
.icon-btn svg { width: 21px; height: 21px; fill: none; stroke: var(--ink-soft); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge {
  position: absolute; top: 4px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--sale); color: #fff; font-size: 10.5px; font-weight: 700;
  border-radius: 999px; display: grid; place-items: center;
}

/* ---------- Layout ---------- */
#app { min-height: 70vh; max-width: 1440px; margin: 0 auto; padding: 20px 32px 64px; }
.footer {
  border-top: 1px solid var(--line); background: var(--surface);
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 28px 32px; font-size: 13.5px;
}

/* ---------- Категории ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); font-size: 13.5px; font-weight: 600; transition: all .15s; border: 1.5px solid var(--line);
}
.chip:hover { border-color: var(--accent); color: var(--accent-dark); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Каталог ---------- */
.catalog { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; }
.catalog-head .filters-toggle { display: none; }
.filters { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 22px; }
.filter-block h4 {
  margin: 0 0 10px; font-size: 12px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted);
}
.filter-list {
  display: flex; flex-direction: column; gap: 7px; max-height: 260px; overflow-y: auto;
  padding-right: 12px; /* место под скроллбар, чтобы он не налезал на счётчики */
  scrollbar-width: thin; scrollbar-color: #d8d1c6 transparent;
}
.filter-list::-webkit-scrollbar { width: 5px; }
.filter-list::-webkit-scrollbar-thumb { background: #d8d1c6; border-radius: 3px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.check .cnt { color: var(--muted); font-size: 12px; margin-left: auto; }
.price-inputs { display: flex; gap: 8px; }
.price-inputs input {
  width: 100%; padding: 8px 10px; border: 1.5px solid var(--line);
  border-radius: 10px; outline: none;
}
.price-inputs input:focus { border-color: var(--accent); }

.catalog-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.catalog-head h2 { font-family: var(--font-display); font-size: 28px; margin: 0; font-weight: 600; }
.catalog-head .total { color: var(--muted); }
.catalog-head select {
  margin-left: auto; border: 1.5px solid var(--line); background: var(--surface);
  border-radius: 10px; padding: 8px 12px; outline: none; font-weight: 600;
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; }

.card {
  position: relative; background: var(--surface); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column;
  box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card-img { position: relative; aspect-ratio: 1; display: grid; place-items: center; cursor: pointer; }
.card-img img { max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.card-badges { position: absolute; top: 0; left: 0; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.card-badge {
  font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-dark);
}
.fav-btn {
  position: absolute; top: 0; right: 0; z-index: 2; width: 34px; height: 34px;
  border: none; background: transparent; border-radius: 10px; display: grid; place-items: center;
}
.fav-btn svg { width: 19px; height: 19px; fill: none; stroke: #c9c1b4; stroke-width: 2; transition: all .15s; }
.fav-btn:hover svg { stroke: var(--sale); }
.fav-btn.active svg { fill: var(--sale); stroke: var(--sale); }
.card-vendor { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 10px; }
.card-name {
  font-size: 13.5px; font-weight: 600; line-height: 1.4; margin: 4px 0 10px; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px;
}
.card-name:hover { color: var(--accent-dark); }
.card-bottom { margin-top: auto; display: flex; align-items: center; gap: 10px; }
.price { font-size: 17px; font-weight: 800; }
.price-old { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.price-sale { color: var(--sale); }
.add-btn {
  margin-left: auto; width: 38px; height: 38px; border-radius: 12px; border: none;
  background: var(--ink); color: #fff; display: grid; place-items: center; transition: background .15s;
}
.add-btn:hover { background: var(--accent-dark); }
.add-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.add-btn.in-cart { background: var(--accent); }
.card.unavailable .card-img, .card.unavailable .card-name { opacity: .45; }
.oos { font-size: 12px; color: var(--muted); font-weight: 600; }

.load-more { display: block; margin: 28px auto 0; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; border: none; font-weight: 700; font-size: 14px;
  background: var(--ink); color: #fff; transition: background .15s, opacity .15s;
}
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent-dark); background: transparent; }
.btn.small { padding: 8px 16px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: var(--accent-dark); }
.link-btn { background: none; border: none; color: var(--accent-dark); font-weight: 600; padding: 0; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Карточка товара ---------- */
.product-page { background: var(--surface); border-radius: 20px; padding: 36px; box-shadow: var(--shadow); }
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.breadcrumbs a:hover { color: var(--accent-dark); }
.product-main { display: grid; grid-template-columns: minmax(300px, 480px) 1fr; gap: 44px; }
.product-gallery { position: sticky; top: 100px; align-self: start; }
.product-gallery .main-img { aspect-ratio: 1; display: grid; place-items: center; }
.product-gallery img { max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.product-info h1 { font-family: var(--font-display); font-size: 27px; font-weight: 600; line-height: 1.3; margin: 6px 0 6px; }
.product-vendor { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent-dark); font-weight: 700; }
.rating-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.stars { color: #d9a441; letter-spacing: 2px; font-size: 15px; }
.buy-box {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--bg); border-radius: var(--radius); padding: 18px 20px; margin: 16px 0 22px;
}
.buy-box .price { font-size: 28px; }
.buy-box .price-old { font-size: 16px; }
.bonus-hint { font-size: 12.5px; color: var(--accent-dark); font-weight: 600; width: 100%; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); }
.qty button { width: 34px; height: 38px; border: none; background: none; font-size: 17px; color: var(--ink-soft); }
.qty span { min-width: 28px; text-align: center; font-weight: 700; }

.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  padding: 15px 0; font-weight: 700; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.accordion summary::after { content: "+"; font-size: 20px; color: var(--muted); font-weight: 400; }
.accordion details[open] summary::after { content: "–"; }
.accordion .acc-body { padding: 0 0 16px; color: var(--ink-soft); white-space: pre-line; font-size: 14px; }
.params-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.params-table td { padding: 6px 0; vertical-align: top; }
.params-table td:first-child { color: var(--muted); width: 45%; padding-right: 16px; }

.section-title { font-family: var(--font-display); font-size: 24px; font-weight: 600; margin: 40px 0 16px; }
.stores-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.store-item { background: var(--bg); border-radius: 12px; padding: 14px 16px; font-size: 13.5px; }
.store-item b { display: block; margin-bottom: 2px; }
.store-qty { color: var(--ok); font-weight: 700; font-size: 12.5px; }
.store-qty.zero { color: var(--muted); }

.review { border-bottom: 1px solid var(--line); padding: 16px 0; }
.review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 13.5px; }
.review-head b { font-size: 14.5px; }
.verified { color: var(--ok); font-size: 12px; font-weight: 700; }
.review-form { background: var(--bg); border-radius: var(--radius); padding: 20px; margin-top: 18px; display: grid; gap: 12px; }
.review-form textarea { min-height: 80px; resize: vertical; }
.star-input { display: flex; gap: 4px; font-size: 26px; color: #d5cec3; cursor: pointer; }
.star-input .on { color: #d9a441; }

.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 14px; overflow-x: auto; padding-bottom: 8px; }

/* ---------- Формы ---------- */
.field { display: grid; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 11px;
  background: var(--surface); outline: none; transition: border .15s; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.form-error { color: var(--sale); font-size: 13px; }

/* ---------- Drawer (корзина / уведомления) ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(24,20,15,.45); z-index: 90;
  opacity: 1; transition: opacity .2s;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 96vw); z-index: 100;
  height: 100dvh; /* мобильные браузеры: реальная высота видимой области, не 100vh */
  background: var(--surface); box-shadow: -12px 0 40px rgba(0,0,0,.18);
  transform: translateX(105%); transition: transform .25s ease; display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 14px; border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-family: var(--font-display); font-size: 22px; margin: 0; }
/* min-height: 0 обязателен: без него flex-элемент не сжимается меньше контента
   и при длинном списке выталкивает футер с кнопкой за пределы экрана */
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 24px; }
.drawer-foot {
  border-top: 1px solid var(--line);
  padding: 16px 24px calc(20px + env(safe-area-inset-bottom));
}
.close-x { border: none; background: none; font-size: 26px; color: var(--muted); line-height: 1; }
.close-x:hover { color: var(--ink); }

.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 64px; height: 64px; object-fit: contain; }
.cart-item .ci-name { font-size: 13px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci-price-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.ci-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.remove-btn { border: none; background: none; color: var(--muted); font-size: 12.5px; }
.remove-btn:hover { color: var(--sale); }
.summary-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.summary-row.total { font-size: 18px; font-weight: 800; padding-top: 10px; }
.summary-row .val-sale { color: var(--sale); font-weight: 700; }
.promo-row { display: flex; gap: 8px; margin: 12px 0; }
.promo-row input { flex: 1; padding: 10px 14px; border: 1.5px dashed var(--line); border-radius: 11px; outline: none; }
.promo-row input:focus { border-color: var(--accent); }
.empty-note { text-align: center; color: var(--muted); padding: 60px 20px; }
.empty-note .big { font-size: 44px; margin-bottom: 10px; }

.msg-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.msg-item h5 { margin: 0 0 4px; font-size: 14px; }
.msg-item.unread h5::before { content: "●"; color: var(--sale); margin-right: 6px; font-size: 10px; vertical-align: 2px; }
.msg-item p { margin: 0; font-size: 13px; color: var(--ink-soft); }
.msg-item time { font-size: 11.5px; color: var(--muted); }

/* ---------- Модалка ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(24,20,15,.5); }
.modal {
  position: relative; background: var(--surface); border-radius: 20px; padding: 30px;
  width: min(430px, 100%); box-shadow: var(--shadow-hover); display: grid; gap: 14px;
}
.modal h3 { font-family: var(--font-display); margin: 0; font-size: 24px; }
.otp-note { font-size: 13px; color: var(--muted); }

/* ---------- Checkout ---------- */
.checkout { display: grid; grid-template-columns: 1fr 380px; gap: 26px; align-items: start; }
.checkout-col { display: grid; gap: 18px; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 14px; font-size: 17px; }
.panel h3 .step { color: var(--accent); font-family: var(--font-display); margin-right: 8px; }
.option-row {
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; border: 1.5px solid var(--line);
  border-radius: 12px; cursor: pointer; margin-bottom: 8px; transition: border .15s;
}
.option-row:hover { border-color: var(--accent); }
.option-row.selected { border-color: var(--accent); background: var(--accent-soft); }
.option-row input { accent-color: var(--accent); margin-top: 3px; }
.option-row .opt-price { margin-left: auto; font-weight: 800; white-space: nowrap; }
.option-row small { display: block; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.delivery-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.delivery-tab {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px;
  background: var(--surface); text-align: left; transition: all .15s;
}
.delivery-tab:hover { border-color: var(--accent); }
.delivery-tab.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.delivery-tab b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.delivery-tab small { color: var(--muted); font-size: 12.5px; }

.store-pick-btn {
  width: 100%; padding: 15px; border: 1.5px dashed #cfc7ba; border-radius: 12px;
  background: none; font-weight: 700; font-size: 14px; color: var(--accent-dark); transition: border .15s;
}
.store-pick-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.selected-store {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  background: var(--bg); border-radius: 12px; padding: 14px 16px;
}
.store-list { display: grid; gap: 6px; max-height: 52vh; overflow-y: auto; }
.store-list button {
  text-align: left; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 11px 14px; background: none; transition: border .15s; font-size: 14px;
}
.store-list button:hover { border-color: var(--accent); }
.store-list button.active { border-color: var(--accent); background: var(--accent-soft); }
.summary-panel { position: sticky; top: 100px; }
.bonus-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 13.5px; }
.bonus-row input[type=number] { width: 90px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; }

.success-page { text-align: center; padding: 70px 20px; }
.success-page .big { font-size: 56px; }
.success-page h2 { font-family: var(--font-display); font-size: 32px; margin: 12px 0 8px; }

/* ---------- Профиль ---------- */
.profile { display: grid; grid-template-columns: 230px 1fr; gap: 26px; align-items: start; }
.profile-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 100px; }
.profile-nav button {
  text-align: left; padding: 11px 16px; border: none; background: none; border-radius: 11px;
  font-weight: 600; color: var(--ink-soft); font-size: 14px;
}
.profile-nav button:hover { background: var(--accent-soft); }
.profile-nav button.active { background: var(--ink); color: #fff; }
.bonus-card {
  background: linear-gradient(115deg, #211d18, #6b5233); color: #f4eee5;
  border-radius: 16px; padding: 22px 24px; margin-bottom: 18px;
}
.bonus-card .amount { font-size: 32px; font-weight: 800; }
.order-card { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.order-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.order-head b { font-size: 15.5px; }
.status-pill { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); }
.status-pill.canceled { background: #f7e3e6; color: var(--sale); }
.status-pill.done { background: #e2efe4; color: var(--ok); }
.order-items-mini { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.order-items-mini img { width: 48px; height: 48px; object-fit: contain; background: var(--bg); border-radius: 10px; padding: 4px; }
.order-detail { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; font-size: 13.5px; display: grid; gap: 4px; }
.timeline { display: grid; gap: 8px; margin: 10px 0; }
.timeline-item { display: flex; gap: 10px; align-items: baseline; font-size: 13px; }
.timeline-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.bonus-op { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.bonus-op .plus { color: var(--ok); font-weight: 800; }
.bonus-op .minus { color: var(--sale); font-weight: 800; }

/* ---------- Админка ---------- */
#profile-body > .panel { margin-bottom: 20px; }
.admin-table-wrap { overflow-x: auto; margin-top: 14px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.admin-table td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.param-row {
  display: flex; align-items: center; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line);
}
.param-row .param-name { flex: 1; font-weight: 600; font-size: 13.5px; }
.param-row .cnt { color: var(--muted); font-weight: 400; font-size: 12px; }
.param-arrows { display: inline-flex; gap: 2px; }
.param-arrows button {
  width: 26px; height: 26px; border: 1.5px solid var(--line); background: none;
  border-radius: 8px; color: var(--ink-soft); font-size: 13px; line-height: 1;
}
.param-arrows button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-dark); }
.param-arrows button:disabled { opacity: .3; cursor: default; }

/* ---------- Тосты ---------- */
#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; }
.toast {
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-hover);
  animation: toast-in .25s ease;
}
.toast.error { background: var(--sale); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

.skeleton { border-radius: var(--radius); background: linear-gradient(100deg, #ece8e2 40%, #f5f2ee 50%, #ece8e2 60%); background-size: 200% 100%; animation: shine 1.2s infinite; }
@keyframes shine { to { background-position: -200% 0; } }
.pager-note { text-align: center; color: var(--muted); margin-top: 14px; font-size: 13px; }

/* ---------- Адаптив ---------- */
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card { padding: 10px; border-radius: 12px; }
  .card-name { font-size: 12.5px; min-height: 35px; }
  .card-vendor { font-size: 10px; }
  .price { font-size: 15px; }
  .price-old { font-size: 11.5px; }
  .add-btn { width: 34px; height: 34px; border-radius: 10px; }
  .scroller { grid-auto-columns: 46vw; }
  /* тосты сверху — снизу они перекрывают кнопку оформления в корзине */
  #toasts { bottom: auto; top: 66px; }
  .catalog-head h2 { font-size: 22px; }
  .catalog-head select { flex-basis: 100%; margin-left: 0; }
  .buy-box .price { font-size: 22px; }
  .product-page { padding: 20px 14px; }
  .drawer { width: 100vw; }
}

@media (max-width: 1000px) {
  .header { padding: 12px 16px; gap: 14px; flex-wrap: wrap; }
  .search-wrap { order: 3; flex-basis: 100%; max-width: none; }
  #app { padding: 14px 16px 48px; }
  .catalog { grid-template-columns: 1fr; }
  /* на мобильном фильтры спрятаны за кнопку «Фильтры», иначе они занимают весь первый экран */
  .filters { display: none; }
  .filters.open { display: flex; position: static; flex-direction: column; }
  .catalog-head .filters-toggle { display: inline-flex; }
  .product-main { grid-template-columns: 1fr; }
  .product-gallery { position: static; }
  .checkout { grid-template-columns: 1fr; }
  .summary-panel { position: static; }
  .profile { grid-template-columns: 1fr; }
  .profile-nav { flex-direction: row; overflow-x: auto; position: static; }
}
