/* PlutusToys — спільні стилі (палітра з дизайну SMM, тепла як у рілсах) */
:root{
  --bg:#faf9f5; --surface:#fff; --text:#141413; --muted:rgba(20,20,19,.62);
  --accent:#d97757; --accent-hover:#c46a4d; --success:#558a42; --warn:#c0492b;
  --line:rgba(20,20,19,.10); --shadow:0 4px 20px rgba(20,20,19,.06);
  --radius:16px;
}
*{box-sizing:border-box}
html,body{margin:0}
body{background:var(--bg);color:var(--text);
  font:16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;-webkit-font-smoothing:antialiased}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
.wrap{width:100%;max-width:1200px;margin:0 auto;padding:0 0 24px;min-height:100vh}

/* ── Шапка (спільна): логотип → головна, пошук, кошик з лічильником ── */
header.top{display:flex;align-items:center;gap:8px;padding:12px 16px;position:sticky;top:0;background:var(--bg);z-index:20}
.logo{font-weight:800;font-size:18px;letter-spacing:-.02em;white-space:nowrap}
.logo span{color:var(--accent)}
.search{flex:1;display:flex;align-items:center;gap:8px;background:var(--surface);
  border:1px solid var(--line);border-radius:12px;padding:9px 12px;cursor:text}
.search svg{flex:none;opacity:.5}
.search input{border:0;outline:0;background:transparent;width:100%;font-size:14px;color:var(--text)}
.search input::placeholder{color:var(--muted)}
.cartbtn{position:relative;flex:none;width:40px;height:40px;display:flex;align-items:center;justify-content:center;
  background:var(--surface);border:1px solid var(--line);border-radius:12px}
.cartbtn .badge{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;padding:0 4px;
  background:var(--accent);color:#fff;font-size:11px;font-weight:700;border-radius:9px;
  display:none;align-items:center;justify-content:center;line-height:18px}
.cartbtn .badge.on{display:flex}

/* ── Чипси категорій ── */
.chips{display:flex;gap:8px;overflow-x:auto;padding:4px 16px 12px;-webkit-overflow-scrolling:touch}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;background:var(--surface);border:1px solid var(--line);border-radius:999px;
  padding:7px 14px;font-size:13px;color:var(--text);white-space:nowrap}
.chip.active{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600}

h1.page{font-size:18px;font-weight:700;margin:4px 16px 12px}

/* ── Сітка плиток ── */
/* Плинна сітка: колонки додаються/зникають самі; мінімум тайла масштабується під в'юпорт
   (2 колонки на телефонах 320–500, далі 3→5→6 на планшетах/моніторах) — без порогів. */
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(clamp(140px,42vw,210px),1fr));
  gap:clamp(10px,2vw,18px);padding:0 clamp(12px,3vw,24px)}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  overflow:hidden;display:flex;flex-direction:column;box-shadow:var(--shadow)}
.card .ph{aspect-ratio:1/1;background:var(--bg)}
.card .ph img{width:100%;height:100%;object-fit:contain;padding:10px}
.card .info{padding:10px 12px 12px;display:flex;flex-direction:column;gap:6px;flex:1}
.card .nm{font-size:13.5px;line-height:1.3;font-weight:600;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:35px}
.card .foot{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:6px}
.card .pr{font-size:16px;font-weight:800;white-space:nowrap}
.card .av{font-size:11px;color:var(--success);display:inline-flex;align-items:center;gap:4px}
.card .av::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--success)}
.card .oos{color:var(--muted)} .card .oos::before{background:var(--muted)}

/* ── Кнопки ── */
.btn{display:block;text-align:center;background:var(--accent);color:#fff;font-weight:700;font-size:16px;
  border:0;border-radius:14px;padding:14px 18px;cursor:pointer;width:100%}
.btn:hover{background:var(--accent-hover)}
.btn:disabled{background:var(--muted);cursor:not-allowed}
.btn.ghost{background:transparent;color:var(--accent);border:1px solid var(--accent)}

/* ── Головна ── */
.hero{margin:4px clamp(12px,3vw,24px) 16px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:clamp(20px,4vw,40px);box-shadow:var(--shadow)}
.hero h2{margin:0 0 6px;font-size:clamp(22px,4vw,30px);line-height:1.2}
.hero .btn{max-width:320px}
.hero p{margin:0 0 14px;color:var(--muted);font-size:14px}
.hero .fox{font-size:34px;margin-bottom:8px}
.sec-title{display:flex;align-items:baseline;justify-content:space-between;margin:18px 16px 10px}
.sec-title h2{font-size:17px;margin:0}
.sec-title a{font-size:13px;color:var(--accent);font-weight:600}
.catrow{display:flex;gap:10px;overflow-x:auto;padding:0 16px 6px}
.catrow::-webkit-scrollbar{display:none}
.cattile{flex:none;width:120px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:14px 12px;text-align:center;box-shadow:var(--shadow)}
.cattile .emo{font-size:26px} .cattile .t{font-size:12.5px;margin-top:6px;color:var(--text);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* ── Картка товару ── */
.photo{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.photo img{width:100%;aspect-ratio:1/1;object-fit:contain;padding:16px}
.photo .ph{width:100%;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:14px}
.body{padding:16px}
.cat{font-size:13px;color:var(--muted);margin-bottom:6px}
h1.prod{font-size:clamp(20px,4.5vw,26px);line-height:1.25;margin:0 0 12px;font-weight:700;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.price-row{display:flex;align-items:baseline;gap:10px;margin:4px 0 10px}
.price{font-size:clamp(26px,6vw,32px);font-weight:800}
.avail{display:inline-flex;align-items:center;gap:6px;font-size:14px;color:var(--success);font-weight:600}
.avail::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--success)}
.avail.oos{color:var(--muted)} .avail.oos::before{background:var(--muted)}
.delivery{display:flex;gap:10px;align-items:flex-start;background:var(--surface);border:1px solid var(--line);
  border-radius:var(--radius);padding:12px 14px;margin:14px 0;font-size:14px;color:var(--muted)}
.delivery b{color:var(--text)}
.fox{font-size:20px;line-height:1}
.desc{font-size:15px;color:rgba(20,20,19,.8);margin:16px 0}
.desc h2{font-size:15px;font-weight:700;color:var(--text);margin:0 0 6px}
.desc ul{margin:10px 0 0;padding-left:18px;color:var(--muted)}

/* закріплена нижня панель */
.buybar{position:fixed;left:0;right:0;bottom:0;background:var(--surface);border-top:1px solid var(--line);
  box-shadow:0 -4px 20px rgba(20,20,19,.06);padding:12px 16px;display:flex;gap:12px;align-items:center;z-index:20}
.buybar-inner{max-width:1200px;margin:0 auto;width:100%;padding:0 clamp(12px,3vw,24px);display:flex;gap:12px;align-items:center}
.buybar .p{font-size:20px;font-weight:800;white-space:nowrap}
.buybar .btn{flex:1}
/* Картка товару: фото + опис самі стають 1 колонкою (вузько) чи 2 (широко) — flex-wrap, без порогів */
.pad-bar{display:flex;flex-wrap:wrap;gap:clamp(16px,3vw,36px);align-items:flex-start;
  padding:8px clamp(12px,3vw,24px) 96px}
.pad-bar>.photo{flex:1 1 380px;max-width:520px;align-self:flex-start}
.pad-bar>.body{flex:1 1 320px;padding:0}

/* ── Кошик / checkout ── */
.cart-item{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.cart-item img{width:64px;height:64px;object-fit:contain;background:var(--bg);border-radius:12px;flex:none}
.cart-item .ci-nm{font-size:14px;font-weight:600;line-height:1.3;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cart-item .ci-pr{font-weight:800;margin-top:4px}
.qty{display:inline-flex;align-items:center;gap:10px;margin-top:6px}
.qty button{width:26px;height:26px;border:1px solid var(--line);background:var(--surface);border-radius:8px;font-size:16px;cursor:pointer}
.ci-rm{margin-left:auto;color:var(--muted);font-size:13px;background:none;border:0;cursor:pointer;align-self:flex-start}
.summary{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px;margin:14px 0}
.summary .row{display:flex;justify-content:space-between;font-size:14px;color:var(--muted);margin:6px 0}
.summary .row.total{font-size:18px;font-weight:800;color:var(--text);border-top:1px solid var(--line);padding-top:10px;margin-top:10px}
.field{margin:12px 0}
.field label{display:block;font-size:13px;color:var(--muted);margin-bottom:6px}
.field input{width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:12px;font-size:15px;background:var(--surface);color:var(--text)}
.field input:focus{outline:0;border-color:var(--accent)}
.field.err input{border-color:var(--warn)}
/* Автокомпліт НП (місто/відділення) */
.ac-wrap{position:relative}
.ac{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:30;background:var(--surface);
  border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);overflow:hidden;max-height:240px;overflow-y:auto}
.ac:empty{display:none}
.ac .opt{padding:10px 14px;font-size:14px;cursor:pointer;border-bottom:1px solid var(--line)}
.ac .opt:last-child{border-bottom:0}
.ac .opt:hover,.ac .opt.on{background:var(--bg)}
.ac .opt small{display:block;color:var(--muted);font-size:12px}
/* Повідомлення checkout + успіх */
#checkout-msg{min-height:1em}
#checkout-msg.err{color:var(--warn)}
.done{text-align:center;padding:48px 24px}
.done .fox{font-size:52px;margin-bottom:12px}
.done h2{margin:0 0 8px;font-size:22px}
.done p{color:var(--muted);margin:0 0 6px}
.done .oid{font-weight:800;color:var(--text)}
.empty{text-align:center;color:var(--muted);padding:60px 24px}
.empty .fox{font-size:44px;margin-bottom:12px}
.note{font-size:12px;color:var(--muted);margin-top:6px}
.free-ship{margin:10px 0}
.free-ship-track{height:6px;border-radius:3px;background:var(--line);overflow:hidden}
.free-ship-fill{height:100%;width:0;background:var(--accent);border-radius:3px;transition:width .25s ease}
.free-ship .note{margin-top:8px;font-weight:600;color:var(--text)}
.free-ship .note.free-ship-done{color:var(--success)}

/* ── Пошуковий оверлей ── */
.overlay{position:fixed;inset:0;background:var(--bg);z-index:50;display:none;flex-direction:column}
.overlay.on{display:flex}
.overlay .obar{display:flex;gap:8px;padding:12px 16px;align-items:center}
.overlay .obar input{flex:1;padding:11px 14px;border:1px solid var(--line);border-radius:12px;font-size:15px;background:var(--surface);color:var(--text)}
.overlay .obar .x{background:none;border:0;font-size:15px;color:var(--accent);font-weight:600;cursor:pointer}
.overlay .results{flex:1;overflow-y:auto;padding:0 16px 24px}
.sr{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.sr img{width:48px;height:48px;object-fit:contain;background:var(--bg);border-radius:10px;flex:none}
.sr .srn{font-size:14px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sr .srp{font-weight:800;font-size:14px;margin-top:2px}

footer.foot{text-align:center;color:var(--muted);font-size:12px;padding:24px 16px 32px}
footer.foot a{color:var(--accent)}

/* ══ Плинна (fluid/intrinsic) верстка — БЕЗ порогів-стрибків ══
   Контейнер, сітка, картка товару й шрифти течуть безперервно від 320px до 4K
   (див. .wrap max-width:1200, .grid auto-fit+clamp, .pad-bar flex-wrap, clamp-шрифти вище).
   Тут — лише читабельні обмеження ширини на дуже великих екранах, теж без @media. */

/* Кошик/оформлення не розтягуємо на всю ширину монітора */
#cart-body,#cart-summary,#checkout-form{max-width:640px}
/* Поле пошуку не робимо надмірно широким на великих екранах */
.search{max-width:640px}
/* Одне-єдине уточнення для дуже широких моніторів: трохи ширша колонка */
@media (min-width:1500px){ .wrap{max-width:1320px} }

/* ══ Пагінація каталогу/категорій ══ */
.pagenote{color:var(--muted);font-size:13px;padding:0 16px 8px}
.pager{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;align-items:center;padding:20px 16px 8px}
.pager .pg{display:inline-flex;align-items:center;justify-content:center;min-width:40px;height:40px;padding:0 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);font-size:14px;font-weight:600;text-decoration:none}
.pager a.pg:hover{border-color:var(--accent);color:var(--accent)}
.pager .pg.cur{background:var(--accent);border-color:var(--accent);color:#fff}
.pager .pg.nav{font-weight:700}
.pager .pg.gap{border:none;background:none;min-width:20px;padding:0;color:var(--muted);font-weight:400}

/* ══ Індекс усіх категорій (categories.html) ══ */
.catgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px;padding:8px 16px 24px}
.catgrid .cattile{width:auto;flex:initial;display:flex;flex-direction:column;align-items:center;justify-content:flex-start}
.cattile .cnt{font-size:11px;color:var(--muted);margin-top:4px}

/* ══ Футер із навігацією ══ */
.foot .fnav{display:flex;flex-wrap:wrap;gap:4px 10px;justify-content:center;margin-bottom:12px}
.foot .fnav a{color:var(--text);font-size:13px}
.foot .fnav a:hover{color:var(--accent)}
.foot .ftag{margin:0}

/* ══ Текстові сторінки довіри (Про нас/Доставка/…) ══ */
.doc{max-width:720px;margin:0 auto;padding:8px 16px 32px;line-height:1.6;color:var(--text)}
.doc h1{font-size:26px;margin:12px 0 16px}
.doc h2{font-size:18px;margin:24px 0 8px}
.doc p{margin:0 0 12px}
.doc ul{margin:0 0 12px;padding-left:20px}
.doc li{margin:0 0 6px}

/* ══ Мікро-довіра біля ціни на товарі + телефон у футері ══ */
.trust-badges{display:flex;flex-wrap:wrap;gap:6px 14px;margin:10px 0 4px}
.trust-badges .tb{font-size:12.5px;color:var(--success);text-decoration:none;font-weight:600}
.trust-badges a.tb:hover{text-decoration:underline}
.foot .fphone{margin:0 0 10px;font-size:13px}
.foot .fphone a{color:var(--accent);font-weight:700}

/* ══ Пояснення під CTA героя (тон Плутуса зверху, логістика — дрібним) ══ */
.hero-note{margin:12px 0 0;font-size:12.5px;color:var(--muted)}

/* ══ Каталог: панель сорт/фільтр ══ */
.cat-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:4px 16px 10px}
.cat-controls select,.cat-controls input[type=number]{height:38px;border:1px solid var(--line);border-radius:10px;padding:0 10px;background:var(--surface);color:var(--text);font-size:14px}
.cat-controls input[type=number]{width:104px}
.cat-controls .cf-price{display:inline-flex;gap:6px;align-items:center}
.cat-controls .cf-stock{display:inline-flex;gap:6px;align-items:center;font-size:14px;color:var(--text);cursor:pointer}
.cat-controls .cf-reset{height:38px;border:1px solid var(--line);border-radius:10px;background:none;color:var(--muted);font-size:13px;padding:0 12px;cursor:pointer}
.cat-controls .cf-reset:hover{color:var(--accent);border-color:var(--accent)}
.btn.ghost{background:var(--surface);color:var(--accent);border:1px solid var(--accent)}
#cat-more-wrap{display:flex;justify-content:center;padding:16px}

/* ══ Крос-сел «З цим купують» на товарі ══ */
.related{margin-top:24px}
.related>h2{font-size:18px;margin:0 16px 8px}

/* ══ Маскот Плутус (PNG замість емодзі 🦊) ══ */
/* Відступи дають обгортки .fox/.hero/.done — .mascot лише розмір, без свого margin-bottom
   (інакше подвійний нижній відступ). */
.mascot{display:inline-block;vertical-align:middle;height:auto;max-width:100%}
.logo .mascot{height:22px}
.hero .mascot{height:64px}
.delivery .mascot{height:28px}
.done .mascot{height:96px}
.empty .mascot{height:44px}
