﻿/* Магазин BLÓM — светлая спокойная тема: много воздуха, нежно-розовые акценты, сильно скруглённые карточки. */
:root {
  --bg: #fdf3f5;
  --card: #ffffff;
  --text: #2b2024;
  --muted: #7d6b72;
  --faint: #a8939b;
  --line: rgba(190, 90, 120, .12);
  --fill: #f9e3e9;
  --accent: #d9608a;
  --accent-press: #c24d78;
  --good: #248a3d;
  --good-soft: #e3f3e7;
  --warn: #b25000;
  --warn-soft: #fbefdf;
  --bad: #d70015;
  --bad-soft: #fdeaec;
  --radius: 28px;
  --top-h: 48px;
  --tabs-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-size: 16px; line-height: 1.42; -webkit-font-smoothing: antialiased; letter-spacing: -.011em; }
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 32px; line-height: 1.1; font-weight: 700; letter-spacing: -.025em; }
h2 { font-size: 22px; line-height: 1.18; font-weight: 700; letter-spacing: -.02em; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.38; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* ---------- каркас ---------- */
.top {
  position: sticky; top: 0; z-index: 20; height: var(--top-h);
  display: flex; align-items: center; padding: 0 10px;
  background: rgba(253, 243, 245, .82); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.top-side { flex: 1; display: flex; }
.top-side.right { justify-content: flex-end; }
.wordmark { font-size: 17px; font-weight: 600; letter-spacing: .22em; padding-left: .22em; }
.icon-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.icon-btn:active { background: var(--fill); }
/* «Написать менеджеру» — всегда на виду в левом углу шапки, на любом экране */
.mgr-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px 0 10px; border-radius: 980px;
  background: rgba(217, 96, 138, .12); color: var(--accent); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.mgr-pill svg { width: 19px; height: 19px; stroke-width: 1.7; }
.mgr-pill:active { background: rgba(217, 96, 138, .22); }
@media (max-width: 340px) { .mgr-pill { padding: 0 10px; } .mgr-pill span { display: none; } }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.badge {
  position: absolute; top: 3px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; line-height: 17px; text-align: center;
}

.view { padding: 22px 16px calc(var(--tabs-h) + var(--safe-b) + 28px); max-width: 640px; margin: 0 auto; min-height: calc(100vh - var(--top-h)); }
.view.has-bar { padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 108px); }
.fade { animation: fade .28s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(255, 252, 253, .88); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
}
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--faint); font-size: 10.5px; font-weight: 500; }
.tabs button.active { color: var(--accent); }
.tabs svg { width: 23px; height: 23px; }

.loader { display: flex; justify-content: center; gap: 6px; padding: 80px 0; }
.loader span { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: blink 1s infinite ease-in-out; }
.loader span:nth-child(2) { animation-delay: .15s; }
.loader span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.toast {
  position: fixed; left: 0; right: 0; margin: 0 auto; width: fit-content; bottom: calc(var(--tabs-h) + var(--safe-b) + 18px); z-index: 50;
  max-width: calc(100% - 40px); padding: 11px 18px; border-radius: 22px;
  background: rgba(60, 33, 44, .92); color: #fff; font-size: 14px; text-align: center;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.toast.err { background: rgba(215, 0, 21, .94); }
body.with-bar .toast { bottom: calc(var(--tabs-h) + var(--safe-b) + 84px); }      /* выше нижней панели с кнопкой */

/* ---------- кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 26px; border-radius: 980px;
  background: var(--accent); color: #fff; font-size: 17px; font-weight: 500; transition: background .15s, transform .1s;
}
.btn:active { background: var(--accent-press); transform: scale(.985); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 16px; font-size: 14px; }
.btn.gray { background: var(--fill); color: var(--text); }
.btn.gray:active { background: #f3d0da; }
.btn.quiet { background: none; color: var(--accent); padding: 0 8px; }
.btn.danger { background: none; color: var(--bad); padding: 0 8px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.link { color: var(--accent); font-weight: 400; }

.group { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.group > * + * { border-top: 1px solid var(--line); }
.field { display: block; padding: 10px 16px 11px; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 1px; }
.field input, .field textarea { width: 100%; border: 0; outline: 0; background: none; padding: 0; font-size: 17px; resize: none; }
.field input::placeholder, .field textarea::placeholder { color: #cdb5bd; }

.section-title { font-size: 13px; color: var(--muted); margin: 26px 16px 8px; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- каталог ---------- */
.hero { padding: 6px 4px 20px; }
.hero p { margin-top: 10px; font-size: 17px; color: var(--muted); line-height: 1.36; }
.hero .btn { margin-top: 18px; min-height: 46px; padding: 0 22px; font-size: 16px; }
.hero .btn svg { width: 21px; height: 21px; stroke-width: 1.7; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 4px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 16px; border-radius: 980px; background: var(--card); font-size: 14px; font-weight: 500; color: var(--text); }
.chip.on { background: var(--accent); color: #fff; }
.cat-note { margin: 14px 4px 0; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.tile { background: var(--card); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-align: left; }
.tile:active { transform: scale(.985); transition: transform .1s; }
.tile .pic { aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 10px; }
.tile .pic img { width: 100%; height: 100%; object-fit: contain; }
.tile .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.tile .eyebrow { font-size: 11px; font-weight: 600; color: var(--warn); letter-spacing: .02em; }
.tile .name { font-size: 15px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.tile .short { font-size: 13px; color: var(--muted); line-height: 1.3; flex: 1; }
.tile .buy { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: 10px; }
.price { font-size: 15px; font-weight: 600; white-space: nowrap; }
.old { font-size: 12px; color: var(--faint); text-decoration: line-through; white-space: nowrap; }
.add {
  flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.add svg { width: 18px; height: 18px; stroke-width: 2; }
.add.in { background: var(--fill); color: var(--text); }
.add:active { transform: scale(.92); }

/* ---------- страница товара ---------- */
.gallery { margin: -22px -16px 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery .slide { flex: none; width: 100%; aspect-ratio: 1 / .92; scroll-snap-align: center; display: grid; place-items: center; padding: 22px 34px; }
.gallery img { width: 100%; height: 100%; object-fit: contain; }
.dots { display: flex; justify-content: center; gap: 7px; margin: -22px 0 0; position: relative; height: 22px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(217, 96, 138, .25); transition: background .2s; }
.dots i.on { background: var(--accent); }
.p-head { padding: 22px 4px 0; }
.p-head .eyebrow { font-size: 13px; font-weight: 600; color: var(--warn); margin-bottom: 6px; }
.p-head h1 { font-size: 30px; }
.p-head .sub { font-size: 19px; color: var(--muted); margin-top: 6px; line-height: 1.26; }
.p-price { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; }
.p-price .price { font-size: 22px; }
.p-price .old { font-size: 15px; }
.p-about { margin: 18px 4px 0; font-size: 17px; line-height: 1.47; }
.card { background: var(--card); border-radius: var(--radius); padding: 18px 18px; }
.checks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; font-size: 15px; line-height: 1.36; }
.checks svg { flex: none; width: 20px; height: 20px; color: var(--good); stroke-width: 2; margin-top: 1px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pill { padding: 7px 14px; border-radius: 980px; background: var(--fill); font-size: 14px; }
.specs > div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 18px; font-size: 15px; }
.specs > div span:first-child { color: var(--muted); flex: none; }
.specs > div span:last-child { text-align: right; }
.specs .wide { display: block; }
.specs .wide span:last-child { display: block; text-align: left; margin-top: 4px; font-size: 14px; line-height: 1.4; }

.bar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabs-h) + var(--safe-b)); z-index: 15;
  background: rgba(255, 255, 255, .9); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
}
.bar-in { max-width: 640px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
.bar-in .sum { flex: none; }
.bar-in .sum .price { font-size: 19px; display: block; line-height: 1.15; }
.bar-in .btn { flex: 1; }

.stepper { display: inline-flex; align-items: center; background: var(--fill); border-radius: 980px; height: 34px; }
.stepper button { width: 36px; height: 34px; font-size: 20px; line-height: 1; color: var(--text); border-radius: 980px; }
.stepper button:active { background: #f3d0da; }
.stepper b { min-width: 22px; text-align: center; font-size: 15px; font-weight: 600; }
.stepper.lg { height: 50px; flex: 1; justify-content: space-between; }
.stepper.lg button { width: 56px; height: 50px; font-size: 24px; }
.stepper.lg b { font-size: 17px; }

/* ---------- корзина и оформление ---------- */
.line { display: flex; gap: 14px; padding: 14px 16px; align-items: center; }
.line .thumb { flex: none; width: 68px; height: 68px; border-radius: 20px; background: var(--bg); display: grid; place-items: center; padding: 5px; }
.line .thumb img { width: 100%; height: 100%; object-fit: contain; }
.line .info { flex: 1; min-width: 0; }
.line .name { font-size: 15px; font-weight: 600; line-height: 1.22; }
.line .row2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.totals > div { display: flex; justify-content: space-between; padding: 12px 16px; font-size: 15px; }
.totals .grand { font-size: 17px; font-weight: 600; }

.option { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; width: 100%; text-align: left; }
.option .radio { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #e3c3cd; margin-top: 1px; display: grid; place-items: center; }
.option.on .radio { border-color: var(--accent); background: var(--accent); }
.option.on .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.option .t { flex: 1; }
.option .t b { display: block; font-size: 16px; font-weight: 500; }
.option .cost { flex: none; font-size: 15px; white-space: nowrap; }
.option[disabled] { opacity: .4; }

.empty { text-align: center; padding: 64px 20px 20px; }
.empty .ico { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: var(--card); display: grid; place-items: center; color: var(--faint); }
.empty .ico svg { width: 30px; height: 30px; }
.empty h2 { margin-bottom: 6px; }
.empty .btn { margin-top: 22px; }

.done-ico { width: 72px; height: 72px; margin: 36px auto 20px; border-radius: 50%; background: var(--good-soft); color: var(--good); display: grid; place-items: center; }
.done-ico svg { width: 36px; height: 36px; stroke-width: 2; }
.done-ico.wait { background: var(--warn-soft); color: var(--warn); }

/* ---------- заказы ---------- */
.order { padding: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.status { padding: 4px 10px; border-radius: 980px; font-size: 12px; font-weight: 600; background: var(--fill); color: var(--muted); white-space: nowrap; }
.status.paid, .status.done { background: var(--good-soft); color: var(--good); }
.status.awaiting_payment, .status.new { background: var(--warn-soft); color: var(--warn); }
.status.processing, .status.shipped { background: #fdeaf0; color: #b0355f; }
.status.cancelled { background: var(--bad-soft); color: var(--bad); }
.order-items { margin: 12px 0 0; display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.order-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.stack > * + * { margin-top: 12px; }

/* ---------- инфо ---------- */
details.acc { padding: 0 18px; }
details.acc summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 16px 0; font-size: 17px; font-weight: 500; cursor: pointer; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary svg { width: 18px; height: 18px; color: var(--faint); transition: transform .2s; }
details.acc[open] summary svg { transform: rotate(180deg); }
details.acc .acc-body { padding: 0 0 18px; display: grid; gap: 12px; font-size: 15px; line-height: 1.46; color: #5a474e; white-space: pre-line; }
details.acc .acc-body b { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.contact { display: flex; justify-content: space-between; gap: 16px; padding: 13px 18px; font-size: 15px; }
.contact span:first-child { color: var(--muted); flex: none; }
.contact a, .contact span:last-child { text-align: right; color: var(--text); text-decoration: none; }
.contact a { color: var(--accent); }
.foot { margin: 22px 8px 0; text-align: center; }

/* ---------- нежность: тени и дополнительное скругление ---------- */
.tile, .card, .group { box-shadow: 0 6px 22px rgba(217, 96, 138, .08); }
.tile .pic { background: linear-gradient(180deg, #fff 0%, #fff4f7 100%); }
.tile .pic img { border-radius: 18px; }
.btn { box-shadow: 0 6px 16px rgba(217, 96, 138, .28); }
.btn.gray, .btn.quiet, .btn.danger, .btn.sm.gray { box-shadow: none; }
.tabs { border-radius: 26px 26px 0 0; box-shadow: 0 -6px 24px rgba(217, 96, 138, .1); border-top: 0; }
.bar { border-radius: 26px 26px 0 0; box-shadow: 0 -6px 24px rgba(217, 96, 138, .1); border-top: 0; }
.top { border-radius: 0 0 24px 24px; box-shadow: 0 4px 18px rgba(217, 96, 138, .07); border-bottom: 0; }
.gallery .slide { background: linear-gradient(180deg, #fff 0%, #fff4f7 100%); }
.gallery { border-radius: 0 0 32px 32px; }
.field { border-radius: var(--radius); }
.done-ico.wait { background: var(--warn-soft); }
.status { padding: 5px 12px; }
.wordmark { color: #b8446f; }

