/* БЛИК — общий серый стиль (бетон + хром) */
:root{
  --ink:#212225; --coal:#141517; --paper:#f2f2f1; --fog:#e6e6e4;
  --steel:#9a9ea4; --line:#d8d8d5;
  --chrome:linear-gradient(115deg,#c8cacc 0%,#f5f6f7 22%,#8f9296 45%,#e9eaeb 62%,#a7aaae 82%,#d8d9db 100%);
  --radius:16px;
}
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Manrope',system-ui,sans-serif;color:var(--ink);background:var(--paper);-webkit-font-smoothing:antialiased;min-height:100vh}
body::before{content:'';position:fixed;inset:0;z-index:98;pointer-events:none;opacity:.5;mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.55 0 0 0 0 0.55 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E")}
a{color:inherit;text-decoration:none}
button{font-family:inherit;cursor:pointer;border:none;background:none}
input,textarea,select{font-family:inherit;font-size:14px}

.chrome-text{background:var(--chrome);-webkit-background-clip:text;background-clip:text;color:transparent}

/* header */
header{position:fixed;top:0;left:0;right:0;z-index:50;background:rgba(242,242,241,.9);backdrop-filter:blur(16px);border-bottom:1px solid var(--line)}
.bar{max-width:1200px;margin:0 auto;display:flex;align-items:center;gap:20px;padding:15px 28px}
.logo{font-family:'Unbounded',sans-serif;font-weight:700;font-size:12.5px;letter-spacing:.1em;display:flex;align-items:center;gap:8px;white-space:nowrap}
.logo i{width:13px;height:13px;border-radius:50%;display:inline-block;background:var(--chrome);
  box-shadow:inset 0 0 0 2px rgba(20,21,23,.7),0 1px 3px rgba(0,0,0,.25)}
.bar nav{margin-left:auto;display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.bar nav a,.bar nav button{font-size:13.5px;font-weight:600;padding:7px 14px;border-radius:100px;transition:background .18s}
.bar nav a:hover,.bar nav button:hover{background:var(--fog)}
.bar nav .hot{background:var(--chrome);color:var(--coal);box-shadow:inset 0 1px 2px rgba(255,255,255,.8),inset 0 -2px 3px rgba(20,21,23,.25)}
.bar nav .hot:hover{background:var(--coal);color:#ececea}

/* layout */
.wrap{max-width:1200px;margin:0 auto;padding:32px 28px 80px}
h1.page{font-family:'Unbounded';font-weight:500;font-size:clamp(22px,3vw,32px);margin-bottom:8px}
.sub{color:var(--steel);font-size:14px;margin-bottom:28px}
h2.sec{font-family:'Unbounded';font-weight:500;font-size:19px;margin:36px 0 16px}

/* controls */
.field{margin-bottom:14px}
.field label{display:block;font-size:11px;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:var(--steel);margin-bottom:6px}
.field input,.field textarea,.field select{
  width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fbfbfa;color:var(--ink);
  outline:none;transition:border-color .15s, box-shadow .15s}
.field input:focus,.field textarea:focus{border-color:var(--steel);box-shadow:0 0 0 3px rgba(154,158,164,.18)}
.field textarea{resize:vertical;min-height:80px}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;
  background:var(--chrome);color:var(--coal);font-weight:700;font-size:12.5px;letter-spacing:.16em;text-transform:uppercase;
  padding:14px 24px;border-radius:100px;transition:transform .18s,background .18s,color .18s;
  box-shadow:inset 0 1px 2px rgba(255,255,255,.8),inset 0 -2px 4px rgba(20,21,23,.25)}
.btn:hover{background:var(--coal);color:#ececea;transform:translateY(-2px);box-shadow:none}
.btn.ghost{background:transparent;color:var(--ink);border:1px solid var(--line)}
.btn.ghost:hover{background:var(--fog);transform:none}
.btn.sm{padding:9px 16px;font-size:11px}
.btn.danger:hover{background:#3a1d1d;color:#f2c9c9}

/* cards */
.panel{background:#fbfbfa;border:1px solid var(--line);border-radius:var(--radius);padding:24px}
.msg{padding:12px 16px;border-radius:12px;font-size:13.5px;font-weight:600;margin-bottom:14px;display:none}
.msg.err{background:#f6e7e7;color:#7a2e2e;border:1px solid #e5c9c9}
.msg.ok{background:#e9efe7;color:#33512c;border:1px solid #cfdcca}

/* product grid (buyer) */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:14px}
.card{border:1px solid var(--line);border-radius:var(--radius);padding:16px;position:relative;background:#fff;
  transition:box-shadow .2s,transform .2s;display:flex;flex-direction:column}
.card:hover{box-shadow:0 20px 46px rgba(20,21,23,.12);transform:translateY(-4px)}
.card__img{height:140px;border-radius:11px;background:#fff;display:grid;place-items:center;font-size:44px;margin-bottom:11px;overflow:hidden}
.card__img img{max-width:85%;max-height:85%;width:auto;height:auto;object-fit:contain}
.badge{position:absolute;top:26px;left:26px;background:var(--chrome);color:var(--coal);
  font-size:10.5px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;padding:4px 10px;border-radius:100px}
.card__shop{font-size:10.5px;font-weight:800;letter-spacing:.18em;text-transform:uppercase;color:var(--steel)}
.card__name{font-size:14.5px;font-weight:600;margin:5px 0 10px;line-height:1.35;flex:1}
.card__row{display:flex;align-items:center;justify-content:space-between;margin-top:auto}
.price{font-family:'Unbounded';font-weight:500;font-size:15.5px}
.price s{font-family:'Manrope';font-size:12px;color:var(--steel);font-weight:500;margin-left:6px}
.add{width:38px;height:38px;border-radius:50%;background:var(--chrome);color:var(--coal);display:grid;place-items:center;
  font-size:19px;line-height:1;transition:background .18s,transform .18s,color .18s;
  box-shadow:inset 0 1px 2px rgba(255,255,255,.8),inset 0 -2px 3px rgba(20,21,23,.3)}
.add:hover{background:var(--coal);color:#ececea;transform:rotate(90deg);box-shadow:none}

/* seller table */
table{width:100%;border-collapse:collapse;font-size:13.5px}
th{font-size:10.5px;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:var(--steel);text-align:left;padding:10px 12px;border-bottom:1px solid var(--line)}
td{padding:12px;border-bottom:1px solid var(--fog);vertical-align:middle}
tr:hover td{background:#f7f7f5}
.pic{width:44px;height:44px;border-radius:10px;background:var(--fog);display:grid;place-items:center;font-size:22px;overflow:hidden}
.pic img{width:100%;height:100%;object-fit:cover}
.pill{display:inline-block;font-size:10.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;padding:3px 10px;border-radius:100px;background:var(--fog)}
.pill.off{background:#eee;color:var(--steel)}

/* cart drawer */
.drawer{position:fixed;top:0;right:-420px;width:400px;max-width:92vw;height:100vh;background:#fbfbfa;z-index:120;
  border-left:1px solid var(--line);box-shadow:-30px 0 70px rgba(20,21,23,.18);transition:right .25s ease;display:flex;flex-direction:column}
.drawer.open{right:0}
.drawer__head{display:flex;justify-content:space-between;align-items:center;padding:20px 22px;border-bottom:1px solid var(--line)}
.drawer__head b{font-family:'Unbounded';font-weight:500;font-size:16px}
.drawer__body{flex:1;overflow-y:auto;padding:16px 22px}
.citem{display:flex;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--fog)}
.citem .pic{flex-shrink:0}
.citem__name{font-size:13px;font-weight:600;line-height:1.3}
.citem__price{font-size:12.5px;color:var(--steel)}
.qty{display:flex;align-items:center;gap:8px;margin-left:auto}
.qty button{width:26px;height:26px;border-radius:50%;background:var(--fog);font-size:15px;font-weight:700}
.qty button:hover{background:var(--line)}
.drawer__foot{padding:18px 22px;border-top:1px solid var(--line)}
.total{display:flex;justify-content:space-between;font-family:'Unbounded';font-weight:500;font-size:16px;margin-bottom:14px}
.overlay{position:fixed;inset:0;background:rgba(20,21,23,.35);z-index:110;opacity:0;pointer-events:none;transition:opacity .25s}
.overlay.on{opacity:1;pointer-events:auto}
.cartbtn{position:relative}
.cartbtn em{position:absolute;top:-6px;right:-8px;font-style:normal;font-size:10px;font-weight:700;color:#ececea;background:var(--coal);border-radius:20px;padding:1px 6px}

@media (max-width:1000px){.grid{grid-template-columns:repeat(3,1fr)}}
@media (max-width:720px){
  .grid{grid-template-columns:repeat(2,1fr)}
  .row2{grid-template-columns:1fr}
  .wrap{padding:24px 16px 60px}
  .bar{padding:12px 16px}
  table{font-size:12.5px}
  th:nth-child(5),td:nth-child(5){display:none}
}

/* ---------- v2: модалка товара, звёзды, чипы категорий ---------- */
.chips{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:22px}
.chip{font-size:13px;font-weight:700;padding:8px 16px;border-radius:100px;background:var(--fog);transition:.18s;cursor:pointer;border:none}
.chip:hover{background:var(--line)}
.chip.on{background:var(--coal);color:#e8e8e6}
.stars{color:#d9d9d6;letter-spacing:2px;font-size:13px}
.stars b{color:#f5b301}
.rcount{font-size:12px;color:var(--steel)}
.modal-ov{position:fixed;inset:0;background:rgba(20,21,23,.45);z-index:130;display:none;align-items:flex-start;justify-content:center;overflow-y:auto;padding:40px 16px}
.modal-ov.on{display:flex}
.modal{background:#fbfbfa;border-radius:22px;max-width:760px;width:100%;padding:28px;position:relative;
  box-shadow:0 40px 100px rgba(20,21,23,.35)}
.modal__close{position:absolute;top:16px;right:16px}
.modal__grid{display:grid;grid-template-columns:280px 1fr;gap:24px}
.modal__img{height:280px;border-radius:14px;background:var(--fog);display:grid;place-items:center;font-size:90px;overflow:hidden}
.modal__img img{width:100%;height:100%;object-fit:contain}
.modal h2{font-family:'Unbounded';font-weight:500;font-size:20px;line-height:1.25;margin:4px 0 10px}
.modal .desc{font-size:14px;line-height:1.55;color:#44464a;margin:14px 0;white-space:pre-line}
.shopbox{background:var(--fog);border-radius:12px;padding:14px 16px;margin:16px 0;font-size:13.5px}
.shopbox b{font-size:11px;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:var(--steel);display:block;margin-bottom:5px}
.review{border-top:1px solid var(--fog);padding:12px 0;font-size:13.5px}
.review .who{font-size:12px;color:var(--steel);margin-bottom:3px;display:flex;justify-content:space-between;gap:10px}
.ratepick{display:flex;gap:4px;font-size:24px;cursor:pointer;user-select:none;margin-bottom:10px}
.ratepick span{color:#d9d9d6;transition:.12s}
.ratepick span.on{color:#f5b301}
.cashnote{background:var(--fog);border-radius:12px;padding:12px 14px;font-size:12.5px;font-weight:600;margin-bottom:14px}
@media(max-width:640px){.modal__grid{grid-template-columns:1fr}.modal__img{height:220px}}

/* ---------- v3: статус отправки, загрузка фото, уведомления ---------- */
.pill.new{background:var(--coal);color:#e8e8e6;animation:pulse 2s infinite}
@keyframes pulse{50%{opacity:.65}}
.shipped{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:800;letter-spacing:.06em;
  text-transform:uppercase;color:#2e6b34;border:1.5px solid #57a05e;background:#eef6ee;
  padding:3px 10px;border-radius:100px}
.eta{font-size:12px;color:#2e6b34;font-weight:600}
.notif{background:var(--coal);color:#ececea;border-radius:var(--radius);padding:14px 18px;margin-bottom:18px;
  display:flex;align-items:center;gap:12px;font-size:14px;font-weight:600}
.notif b{background:var(--chrome);color:var(--coal);border-radius:100px;padding:2px 11px;font-family:'Unbounded';font-size:13px}
.upload-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.upload-row input[type=file]{display:none}
.upload-preview{width:52px;height:52px;border-radius:10px;background:var(--fog);display:grid;place-items:center;
  font-size:26px;overflow:hidden;flex-shrink:0}
.upload-preview img{width:100%;height:100%;object-fit:cover}
.success-check{width:64px;height:64px;border-radius:50%;background:#eef6ee;border:2px solid #57a05e;
  display:grid;place-items:center;font-size:30px;color:#2e6b34;margin:0 auto 14px}

/* ---------- v4: мобильная корзина, чат ---------- */
@media (max-width:480px){
  .drawer{width:100vw;max-width:100vw;right:-100vw}
  .drawer__foot{padding:14px 16px calc(14px + env(safe-area-inset-bottom))}
  .drawer__body{padding:12px 16px}
  .drawer__foot .btn{font-size:11px;padding:13px 12px;letter-spacing:.08em;white-space:normal;line-height:1.35}
}
.drawer__foot .btn{white-space:normal;line-height:1.35}

/* чат */
.chatwrap{display:grid;grid-template-columns:300px 1fr;gap:0;border:1px solid var(--line);border-radius:var(--radius);
  overflow:hidden;background:#fbfbfa;height:calc(100vh - 210px);min-height:420px}
.dlist{border-right:1px solid var(--line);overflow-y:auto}
.ditem{padding:14px 16px;border-bottom:1px solid var(--fog);cursor:pointer;transition:background .15s}
.ditem:hover{background:var(--fog)}
.ditem.on{background:var(--coal);color:#ececea}
.ditem b{font-size:13.5px;display:block;margin-bottom:2px}
.ditem span{font-size:12px;color:var(--steel);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ditem.on span{color:#9a9ca0}
.ditem .unread{float:right;background:var(--chrome);color:var(--coal);border-radius:100px;font-size:10.5px;font-weight:800;padding:2px 8px}
.thread{display:flex;flex-direction:column}
.thread__head{padding:14px 18px;border-bottom:1px solid var(--line);font-weight:700;font-size:14px}
.thread__body{flex:1;overflow-y:auto;padding:16px 18px;display:flex;flex-direction:column;gap:8px}
.bubble{max-width:75%;padding:10px 14px;border-radius:16px;font-size:13.5px;line-height:1.45;word-break:break-word}
.bubble.me{align-self:flex-end;background:var(--coal);color:#ececea;border-bottom-right-radius:4px}
.bubble.them{align-self:flex-start;background:var(--fog);border-bottom-left-radius:4px}
.bubble time{display:block;font-size:10px;opacity:.55;margin-top:3px}
.thread__foot{display:flex;gap:10px;padding:12px 14px;border-top:1px solid var(--line)}
.thread__foot input{flex:1;padding:12px 14px;border:1px solid var(--line);border-radius:100px;background:#fff;outline:none}
.thread__foot button{width:44px;height:44px;border-radius:50%;background:var(--chrome);color:var(--coal);font-size:18px;flex-shrink:0}
.thread__foot button:hover{background:var(--coal);color:#ececea}
.chat-empty{display:grid;place-items:center;color:var(--steel);font-size:13.5px;height:100%}
@media (max-width:720px){
  .chatwrap{grid-template-columns:1fr;height:calc(100vh - 170px)}
  .dlist{display:block}
  .chatwrap.inthread .dlist{display:none}
  .thread{display:none}
  .chatwrap.inthread .thread{display:flex}
  .backbtn{display:inline-flex!important}
}
.backbtn{display:none;margin-right:10px}

/* ---------- v6: аватар магазина, мобильные карточки ---------- */
.shopava{width:38px;height:38px;border-radius:50%;object-fit:cover;background:var(--fog);flex-shrink:0;
  border:2px solid #fff;box-shadow:0 2px 8px rgba(20,21,23,.15)}
.shopava--ph{display:grid;place-items:center;font-size:17px}
.shopbox{display:flex;gap:12px;align-items:flex-start}
.shopbox>div{flex:1}
.ava-row{display:flex;gap:12px;align-items:center;margin-bottom:14px}
.ava-row .shopava{width:56px;height:56px}
.ava-row input[type=file]{display:none}
@media (max-width:480px){
  .grid{grid-template-columns:repeat(2,1fr);gap:10px}
  .card{padding:10px}
  .card__img{height:120px;font-size:38px;margin-bottom:9px}
  .card__name{font-size:12.5px;min-height:0;margin:4px 0 8px}
  .card__shop{font-size:9.5px;letter-spacing:.12em}
  .price{font-size:13.5px}
  .price s{font-size:11px;margin-left:4px}
  .add{width:32px;height:32px;font-size:16px}
  .badge{top:18px;left:18px;font-size:9.5px;padding:3px 8px}
  .stars{font-size:11px;letter-spacing:1px}
  .rcount{font-size:10.5px}
}

/* ---------- v8: карусель баннера, согласие ---------- */
.hero__slides{position:absolute;inset:0;display:flex;width:300%;transition:transform .55s ease}
.hero__slide{flex:0 0 33.3333%;position:relative;background:#1a1b1d}
.hero__slide img{width:100%;height:100%;object-fit:cover;display:block}
.agree{display:flex;gap:10px;align-items:flex-start;font-size:12.5px;color:#5a5c60;margin:2px 0 16px;line-height:1.45}
.agree input{width:17px;height:17px;margin-top:1px;accent-color:#141517;flex-shrink:0;cursor:pointer}
.agree a{text-decoration:underline}

/* v9: логотип-картинка */
.logo__img{width:64px;height:64px;border-radius:6px;object-fit:contain;flex-shrink:0}

/* v11: галерея товара, доп.фото, инфо магазина */
.gal-thumbs{display:flex;gap:8px;margin-top:10px}
.gal-thumb{width:56px;height:56px;border-radius:10px;background:#fff;border:2px solid var(--line);
  display:grid;place-items:center;font-size:24px;overflow:hidden;cursor:pointer;transition:border-color .15s}
.gal-thumb img{width:100%;height:100%;object-fit:contain}
.gal-thumb.on{border-color:var(--coal)}
.modal__img{background:#fff}
.shopmeta{font-size:11.5px;color:var(--steel);margin-top:6px;line-height:1.5}
.photos-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.photo-slot{position:relative;width:64px;height:64px;border-radius:10px;background:#fff;border:1px solid var(--line);
  display:grid;place-items:center;overflow:hidden}
.photo-slot img{width:100%;height:100%;object-fit:cover}
.photo-slot .rm{position:absolute;top:2px;right:2px;width:18px;height:18px;border-radius:50%;
  background:rgba(20,21,23,.75);color:#fff;font-size:11px;line-height:1;display:grid;place-items:center;cursor:pointer}
