:root{
  --bg:#0b1220;
  --card:#101a2e;
  --text:#e5e7eb;
  --muted:#94a3b8;
  --line:rgba(148,163,184,.18);
  --blue:#00b4ff;
  --orange:#ff6b00;
  --green:#22c55e;
  --shadow:0 24px 70px rgba(0,0,0,.55);
  --radius:18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:
    radial-gradient(ellipse 70% 60% at 70% 0%, rgba(0,180,255,.18), transparent 55%),
    radial-gradient(ellipse 55% 45% at 10% 85%, rgba(255,107,0,.14), transparent 55%),
    linear-gradient(180deg, #0b1220 0%, #070b14 100%);
  color:var(--text);
}

a{color:inherit;text-decoration:none}
.container{max-width:1160px;margin:0 auto;padding:0 18px}
.muted{color:var(--muted)}
.h2{margin:0;font-size:20px;letter-spacing:.2px}

.topbar{
  position:sticky;top:0;z-index:10;
  background:rgba(7,11,20,.78);
  backdrop-filter: blur(14px);
  border-bottom:1px solid var(--line);
}
.topbar__inner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0}

.brand{display:flex;align-items:center;gap:12px;min-width:240px}
.brand__mark{
  width:44px;height:44px;border-radius:14px;
  display:grid;place-items:center;
  background:linear-gradient(135deg,var(--blue),var(--orange));
  color:#06101d;font-weight:900;font-size:13px;
  box-shadow:0 14px 40px rgba(0,180,255,.18);
}
.brand__title{font-weight:800;color:#fff;line-height:1.1}
.brand__subtitle{font-size:12px;color:var(--muted);letter-spacing:.4px;text-transform:uppercase}
.topbar__actions{display:flex;align-items:center;gap:10px}
.cartBadge{
  margin-left:8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  padding:0 6px;
  border-radius:999px;
  background:rgba(255,59,48,.95);
  color:#fff;
  font-weight:1000;
  font-size:12px;
}

.btn{
  border:1px solid var(--line);
  background:transparent;
  color:#fff;
  border-radius:14px;
  padding:10px 14px;
  font-weight:700;
  cursor:pointer;
}
.btn--ghost:hover{border-color:rgba(0,180,255,.5);color:var(--blue)}
.btn--primary{
  border:none;
  background:linear-gradient(135deg,var(--blue),#008dcf);
  color:#06101d;
  box-shadow:0 12px 40px rgba(0,180,255,.28);
}
.btn--primary:hover{filter:brightness(1.06);transform:translateY(-1px)}
.link{background:none;border:none;color:var(--blue);cursor:pointer;font-weight:700;padding:0}
.link:hover{text-decoration:underline}

.shopHero{padding:28px 0 10px}
.shopHero__head h1{margin:0 0 10px;font-size:40px;line-height:1.05;letter-spacing:-.6px}
@media (max-width: 520px){.shopHero__head h1{font-size:32px}}
.shopControls{margin-top:14px;display:flex;flex-direction:column;gap:10px}
.shopTabs{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.tab{
  border:1px solid var(--line);
  background:rgba(16,26,46,.55);
  color:#fff;
  border-radius:16px;
  padding:16px 24px;
  min-height:54px;
  font-size:17px;
  font-weight:900;
  line-height:1.2;
  cursor:pointer;
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.tab:hover{
  border-color:rgba(0,180,255,.4);
  background:rgba(16,26,46,.78);
}
.tab.active{
  border-color:rgba(0,180,255,.55);
  box-shadow:0 0 0 4px rgba(0,180,255,.12);
  background:rgba(16,26,46,.85);
}
@media (max-width: 520px){
  .tab{
    flex:1 1 calc(50% - 6px);
    min-width:140px;
    padding:14px 16px;
    font-size:15px;
    text-align:center;
  }
}
.shopSearch{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.shopSearch .input{flex:1;min-width:260px}
.pill{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 12px;border-radius:999px;
  background:rgba(16,26,46,.72);
  border:1px solid var(--line);
  font-weight:800;font-size:12px;
}

.field{display:flex;flex-direction:column;gap:6px}
.field__label{font-size:12px;color:var(--muted);font-weight:800;letter-spacing:.2px}
.input{
  border:1px solid var(--line);
  background:rgba(16,26,46,.72);
  border-radius:14px;
  padding:12px 12px;
  color:#fff;
  outline:none;
}
.input:focus{border-color:rgba(0,180,255,.55);box-shadow:0 0 0 4px rgba(0,180,255,.08)}
.input--sm{padding:10px 10px;border-radius:12px}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;line-height:1.45}

.card{
  background:linear-gradient(180deg, rgba(16,26,46,.85), rgba(16,26,46,.55));
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:var(--shadow);
}
.card__title{font-weight:900;color:#fff;margin-bottom:10px}
.steps{margin:0;padding-left:18px;color:var(--muted);line-height:1.55}
.card__note{margin-top:10px;font-size:12px}

.grid{padding:10px 0 24px}

.delivery{
  padding:8px 0 48px;
  scroll-margin-top:80px;
}
.delivery__title{
  margin:0 0 12px;
  font-size:28px;
  letter-spacing:-.3px;
  color:#fff;
}
.delivery__lead{
  margin:0 0 20px;
  max-width:720px;
  line-height:1.55;
  font-size:15px;
}
.delivery__grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:14px;
}
@media (max-width: 860px){
  .delivery__grid{grid-template-columns:1fr}
}
.delivery__card{
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:20px;
  background:linear-gradient(180deg, rgba(16,26,46,.85), rgba(16,26,46,.55));
  box-shadow:var(--shadow);
}
.delivery__cardTitle{
  margin:0 0 12px;
  font-size:18px;
  color:#fff;
}
.delivery__text{
  margin:0 0 12px;
  line-height:1.5;
  font-size:14px;
}
.delivery__list{
  margin:0 0 14px;
  padding-left:18px;
  color:var(--text);
  line-height:1.55;
  font-size:14px;
}
.delivery__list li{margin:6px 0}
.delivery__list--compact{margin-bottom:0}
.delivery__times{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid var(--line);
}
.delivery__timesTitle{
  font-weight:900;
  color:#fff;
  margin-bottom:8px;
  font-size:14px;
}
.delivery__contact{
  margin-top:8px;
  padding:16px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(7,11,20,.35);
}
.delivery__contactTitle{
  font-weight:900;
  color:#fff;
  margin-bottom:8px;
  font-size:14px;
}
.delivery__phone{
  display:inline-block;
  font-size:22px;
  font-weight:1000;
  color:var(--blue);
}
.delivery__phone:hover{text-decoration:underline}
.delivery__hours{
  margin:8px 0 0;
  font-size:13px;
}
.dialog__hint .link{
  color:var(--blue);
  font-weight:700;
  background:none;
  border:none;
  padding:0;
  cursor:pointer;
}
.dialog__hint .link:hover{text-decoration:underline}
.grid__head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0}
@media (max-width: 640px){.grid__head{flex-direction:column;align-items:flex-start}}
.grid__tools{display:flex;align-items:center;gap:10px}
.toggle{display:flex;align-items:center;gap:8px;color:var(--muted);font-weight:800;font-size:12px}
.toggle input{width:16px;height:16px}

.list{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
@media (max-width: 1020px){.list{grid-template-columns:repeat(2,1fr)}}
@media (max-width: 640px){.list{grid-template-columns:1fr}}

.item{
  border:1px solid var(--line);
  background:rgba(16,26,46,.62);
  border-radius:var(--radius);
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.item:hover{transform:translateY(-2px);border-color:rgba(0,180,255,.45);box-shadow:0 12px 32px rgba(0,180,255,.1)}
.item__row{
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(0,3fr);
  gap:12px;
  align-items:start;
  min-width:0;
}
.item__thumbWrap{
  grid-column:1;
  grid-row:1;
  min-width:0;
  max-width:100%;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(7,11,20,.35);
  overflow:hidden;
  aspect-ratio:4 / 3;
}
.item img.thumb{
  display:block;
  width:100% !important;
  height:100% !important;
  object-fit:cover;
}
.item .thumb.thumb--placeholder{
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
  color:var(--muted);
  font-weight:900;
  font-size:12px;
}
.item__main{
  grid-column:2;
  grid-row:1;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.item__top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;min-width:0}
.item__name{
  font-weight:900;
  color:#fff;
  line-height:1.25;
  font-size:14px;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.item__meta{display:flex;flex-wrap:wrap;gap:8px}
.tag{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 10px;border-radius:999px;
  border:1px solid var(--line);
  background:rgba(7,11,20,.35);
  color:var(--muted);
  font-weight:900;
  font-size:11px;
}
.tag--ok{color:#0b1220;background:rgba(34,197,94,.95);border-color:rgba(34,197,94,.7)}
.tag--warn{color:#0b1220;background:rgba(255,107,0,.92);border-color:rgba(255,107,0,.65)}
.item__desc{
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.item__bottom{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
  min-width:0;
}
.item__price{font-weight:1000;color:#fff;flex-shrink:0}
.item__actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.item--pick-active{
  border-color:rgba(0,180,255,.55);
  box-shadow:0 0 0 3px rgba(0,180,255,.12);
}
.btn--cart{
  padding:12px 16px;
  border-radius:14px;
  font-weight:900;
  font-size:14px;
  min-height:46px;
}
.qtyBtn{
  width:34px;height:34px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(7,11,20,.35);
  color:#fff;
  font-weight:1000;
  cursor:pointer;
}
.qtyBtn--lg{
  width:46px;
  height:46px;
  border-radius:14px;
  font-size:22px;
  line-height:1;
}
.qtyBtn:disabled{opacity:.45;cursor:default}
.qtyVal{min-width:22px;text-align:center;font-weight:1000}
.qtyVal--lg{min-width:32px;font-size:18px}
.qty{display:flex;align-items:center;gap:8px}
.qty input{width:80px}
.choose{display:flex;align-items:center;gap:10px}

/* Узкая карточка в сетке 2–3 колонки: фото сверху, текст снизу */
@container (max-width: 380px){
  .item__row{grid-template-columns:1fr}
  .item__thumbWrap{grid-column:1;grid-row:1;max-width:100%}
  .item__main{grid-column:1;grid-row:2}
}
.item{container-type:inline-size}
@media (max-width: 640px){
  .item__row{grid-template-columns:1fr}
  .item__thumbWrap{grid-column:1;grid-row:1}
  .item__main{grid-column:1;grid-row:2}
}

.footer{border-top:1px solid var(--line);padding:18px 0 24px;background:rgba(7,11,20,.65)}
.footer__inner{display:flex;align-items:center;justify-content:space-between;gap:12px}
@media (max-width: 640px){.footer__inner{flex-direction:column;align-items:flex-start}}
.footer__right{display:flex;align-items:center;gap:12px}

.dialog{border:none;padding:0;background:transparent}
.dialog::backdrop{background:rgba(0,0,0,.55)}
.dialog__card{
  width:min(820px, calc(100vw - 24px));
  border-radius:22px;
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(16,26,46,.96), rgba(16,26,46,.78));
  box-shadow:var(--shadow);
  margin:18vh auto 0;
  overflow:hidden;
}
.dialog__head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 16px 12px;border-bottom:1px solid var(--line)}
.dialog__title{font-weight:1000;color:#fff;font-size:16px}
.dialog__subtitle{font-size:12px;margin-top:2px}
.iconbtn{border:1px solid var(--line);background:transparent;color:#fff;border-radius:12px;padding:8px 10px;cursor:pointer}
.iconbtn:hover{border-color:rgba(0,180,255,.45);color:var(--blue)}
.dialog__body{padding:14px 16px 14px;display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width: 760px){.dialog__body{grid-template-columns:1fr}}
.dialog__body--cart{grid-template-columns:1.2fr .8fr;align-items:start}
@media (max-width: 940px){.dialog__body--cart{grid-template-columns:1fr}}
.cartItems{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:min(52vh, 520px);
  overflow:auto;
  padding-right:6px;
  color:#fff;
}
.cartItem{
  display:grid;
  grid-template-columns:1fr auto;
  grid-template-rows:auto auto;
  gap:8px 12px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(7,11,20,.25);
  color:#fff;
  align-items:center;
}
.cartItem__info{grid-column:1;grid-row:1;min-width:0}
.cartItem__name{font-weight:900;line-height:1.2;color:#fff}
.cartItem__meta{font-size:12px;color:rgba(255,255,255,.72);margin-top:4px}
.cartItem__controls{
  grid-column:2;
  grid-row:1;
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}
.cartItem__sum{
  grid-column:1 / -1;
  grid-row:2;
  font-weight:1000;
  color:#fff;
  text-align:right;
  padding-top:4px;
  border-top:1px solid var(--line);
}
.cartItem__remove--lg{
  width:46px;
  height:46px;
  font-size:18px;
}
.cartItem__remove{
  width:34px;
  height:34px;
  border-radius:12px;
  border:1px solid rgba(255,59,48,.45);
  background:rgba(255,59,48,.12);
  color:#ff6b6b;
  font-weight:1000;
  cursor:pointer;
}
.cartItem__remove:hover{border-color:rgba(255,59,48,.8);background:rgba(255,59,48,.22)}
.cartSummary{
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px;
  background:rgba(7,11,20,.25);
  height:fit-content;
  position:sticky;
  top:16px;
  color:#fff;
}
.cartSummary .muted{color:rgba(255,255,255,.75)}
.cartSummary strong{color:#fff}
.cartRow{display:flex;align-items:center;justify-content:space-between;padding:6px 0;color:#fff}
.dialog__body--cart .dialog__hint{color:rgba(255,255,255,.7)}
.dialog__card .dialog__subtitle.muted{color:rgba(255,255,255,.75)}
.cartActions{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}
.cartActions .btn{flex:1;min-width:180px}
@media (max-width: 640px){.cartActions .btn{min-width:unset;flex:1 1 100%}}
.dialog__actions{display:flex;justify-content:flex-end;gap:10px;padding:12px 16px 16px;border-top:1px solid var(--line)}
.dialog__hint{font-size:12px;margin-top:6px}

