/* ============================================================================
   v3 · Корзина+: пилюля корзины над меню, строка «доставка · привезём к» над «Оформить»,
   полка «Добейте до бесплатной доставки». Разметка — components/cart-pill.js и views/cart.js.
   ========================================================================== */

/* ── Пилюля корзины (главная, каталог, магазины) ───────────────────────── */
html.dv3 .v3-cpill{
  position:fixed; z-index:49; /* над экраном, под меню (50) и поиском (99) */
  left:12px; right:12px; bottom:calc(var(--v3-nav-h) + 8px); max-width:456px; margin:0 auto;
  display:flex; align-items:center; gap:10px; min-height:56px; padding:6px 8px 6px 6px;
  border:0; border-radius:99px; cursor:pointer; font:inherit; text-align:left; color:#fff;
  background:linear-gradient(135deg, oklch(.6 .16 150), var(--green));
  box-shadow:0 10px 26px rgba(0,60,30,.28), 0 2px 6px rgba(0,60,30,.18);
  -webkit-tap-highlight-color:transparent; animation:v3cpIn .32s cubic-bezier(.34,1.4,.64,1) both;
  transition:transform .25s cubic-bezier(.34,1.56,.64,1);
}
html.dv3 .v3-cpill[hidden]{ display:none; }
html.dv3 .v3-cpill:active{ transform:scale(.97); transition-duration:.06s; }
html.dv3 .v3-cpill:focus-visible{ outline:3px solid var(--ink); outline-offset:2px; }
@keyframes v3cpIn{ from{ transform:translateY(24px); opacity:0; } to{ transform:none; opacity:1; } }

/* Фото последних трёх — внахлёст, в белой обводке */
html.dv3 .v3-cpill-ph{ position:relative; display:flex; flex:none; padding-left:2px; }
/* Сколько штук — бейджем на фото, как на иконке меню */
html.dv3 .v3-cpill-ph > .v3-cpill-n{
  position:absolute; z-index:4; right:-6px; top:-4px; width:auto; height:20px; min-width:20px; margin:0; padding:0 6px;
  border:2px solid var(--green); border-radius:99px; background:#fff; color:var(--green);
  font-style:normal; font-size:11.5px; font-weight:800; line-height:16px; text-align:center; font-variant-numeric:tabular-nums;
}
html.dv3 .v3-cpill-ph > *{
  display:grid; place-items:center; width:44px; height:44px; margin-left:-14px; flex:none;
  border-radius:50%; border:2px solid #fff; background:var(--v3-photo, #f3f1ec); object-fit:cover;
  font-style:normal; font-weight:700; font-size:16px; color:var(--green);
}
html.dv3 .v3-cpill-ph > :first-child{ margin-left:0; position:relative; z-index:3; }
html.dv3 .v3-cpill-ph > :nth-child(2){ position:relative; z-index:2; }
html.dv3 .v3-cpill-t{ flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.15; }
html.dv3 .v3-cpill-t b{ font-size:17px; font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap; }
html.dv3 .v3-cpill-t small{ font-size:12.5px; opacity:.9; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
html.dv3 .v3-cpill-go{
  display:inline-flex; align-items:center; gap:2px; flex:none; height:44px; padding:0 10px 0 16px;
  border-radius:99px; background:rgba(255,255,255,.18); font-size:15px; font-weight:700;
}
html.dv3 .v3-cpill-go .v3-i{ width:18px; height:18px; stroke-width:2.5; }
/* Пилюля не закрывает последний ряд экрана */
@media (max-width:1023px){ html.dv3.cpill-on #app{ padding-bottom:72px; } }
@media (min-width:1024px){ html.dv3 .v3-cpill{ display:none; } }
@media (prefers-reduced-motion:reduce){ html.dv3 .v3-cpill{ animation:none; transition:none; } }

/* ── Над «Оформить»: доставка и ближайшее окно ────────────────────────── */
html.dv3 .v3c-dl{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin:0 2px 8px; font-size:13px; line-height:1.3; color:var(--ink); font-variant-numeric:tabular-nums;
}
html.dv3 .v3c-dl:not(.has-eta):has(.v3c-dl-p:empty){ display:none; }
html.dv3 .v3c-dl > span{ display:inline-flex; align-items:center; gap:6px; min-width:0; white-space:nowrap; }
html.dv3 .v3c-dl b{ font-weight:700; }
html.dv3 .v3c-dl .v3-i{ width:16px; height:16px; flex:none; color:var(--green); }
html.dv3 .v3c-dl-eta{ margin-left:auto; padding:3px 10px; border-radius:99px; background:var(--green-soft); color:var(--green); font-weight:700; }
html.dv3 .v3c-dl-eta:empty{ display:none; }
@media (max-width:1023px){
  html.dv3 [data-view="cart"] .js-body:has(.v3c-bar .v3c-dl){ padding-bottom:calc(var(--v3-nav-h) + 40px - var(--safe-bottom, 0px)); }
  html.dv3 [data-view="cart"] .js-body:has(.v3c-bar .v3c-dl):has(.v3c-bar .dl-goal){ padding-bottom:calc(var(--v3-nav-h) + 88px - var(--safe-bottom, 0px)); }
}

/* ── «Добейте до бесплатной доставки» ─────────────────────────────────── */
html.dv3 .v3c-fill[hidden]{ display:none; }
html.dv3 .v3c-fill-in{
  margin:10px 16px 0; padding:16px 0 14px; border-radius:var(--v3-r-card);
  background:linear-gradient(160deg, color-mix(in srgb, var(--dl-lime) 26%, var(--paper)), var(--paper) 70%);
  box-shadow:inset 0 0 0 1.5px color-mix(in srgb, var(--dl-green) 30%, transparent);
}
html.dv3 .v3c-fill-h{ padding:0 16px 12px; }
html.dv3 .v3c-fill-h b{ display:block; font-size:17px; font-weight:800; color:var(--ink); }
html.dv3 .v3c-fill-h span{ display:block; margin-top:2px; font-size:13px; color:var(--green); font-weight:600; font-variant-numeric:tabular-nums; }
html.dv3 .v3c-fill-row{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px; padding:0 16px; }
html.dv3 .v3c-fill .v3c-up{ width:auto; }
/* «+» здесь — главная кнопка полки: зелёный круг 40 (зона 44), а не белый на фото */
html.dv3 .v3c-fill .v3c-up .v3-plus{ width:40px; height:40px; background:var(--green); color:#fff; box-shadow:0 4px 10px rgba(0,80,40,.25); }
html.dv3 .v3c-fill .v3c-up .v3-plus::after{ inset:-2px; }

/* ── 03.10 · Честный срок базы: плашка у группы и строка под доставкой ─── */
html.dv3 .v3c-slow-pill{ flex:none; align-self:flex-start; background:#fff1c9; color:#7a5200; font-weight:600; }
html.dv3 .v3c-slow-pill .v3-i{ width:12px; height:12px; }
html.dv3 .v3c-slow{ margin:-2px 2px 8px; font-size:12.5px; line-height:1.3; color:var(--muted); }
html.dv3 .v3c-slow[hidden]{ display:none; }
@media (max-width:1023px){
  html.dv3 [data-view="cart"] .js-body:has(.v3c-bar .v3c-slow:not([hidden])){ padding-bottom:calc(var(--v3-nav-h) + 64px - var(--safe-bottom, 0px)); }
  html.dv3 [data-view="cart"] .js-body:has(.v3c-bar .v3c-slow:not([hidden])):has(.v3c-bar .dl-goal){ padding-bottom:calc(var(--v3-nav-h) + 112px - var(--safe-bottom, 0px)); }
}
html.dv3 .v3co-slow{ display:block; margin-top:3px; color:#7a5200; }
html.dv3 .v3co-slow[hidden]{ display:none; }
html.dv3 .v3c-slow-row{ display:flex; align-items:center; gap:8px; margin:8px 0 2px; font-size:12.5px; color:var(--muted); }
