/* ===== Живые элементы сайта: слайдер, корзина, модалки, тосты, ховеры ===== */
:root { --green: #007146; --green-2: #00a651; --ink: #101010; }
body.lock { overflow: hidden; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--green-2); outline-offset: 2px; }

/* ---------- слайдер главного баннера ---------- */
.hs-slide { position: absolute; inset: 0; display: block; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s; }
.hs-slide.on { opacity: 1; visibility: visible; transition: opacity .6s ease; z-index: 1; }
.hs-slide .hs-more, .hs-slide .bn-btn, .hs-slide .mbn-btn { transition: background .2s, color .2s; }
.hs-slide:hover .hs-more, .hs-slide:hover .bn-btn { background: rgba(255,255,255,.14); }
.hs .sliderbtn { z-index: 3; transition: background .2s; }
.hs .sliderbtn:hover { background: rgba(0,0,0,.65); }

/* баннеры 1000×500 из Figma, в слоте 900×450 */
.bn { position: absolute; left: 0; top: 0; width: 1000px; height: 500px; transform: scale(.9); transform-origin: 0 0; overflow: hidden; background: #000; }
.bn-sub { font: 600 23.128px/23.128px Montserrat; letter-spacing: -.4626px; color: #fff; }
.bn-ttl { font: 600 37.757px/37.757px Montserrat; letter-spacing: -.7551px; color: #fff; }
.bn-btn { width: 125px; height: 40px; border: 1px solid rgba(255,255,255,.45); border-radius: 5px; font: 700 13px Montserrat; letter-spacing: .65px; color: #fff; }
.bn-glass { background: rgba(0,0,0,.25); -webkit-backdrop-filter: blur(2.9px); backdrop-filter: blur(2.9px); border-radius: 4px; }
.bn-old { font: 600 19.327px/19.327px Montserrat; letter-spacing: -.3865px; color: #fff; }
.bn-new { font: 600 23.299px/23.299px Montserrat; letter-spacing: -.466px; color: #fff; }
.bn-frame { border: .861px solid #fff; border-radius: 3.443px; }

/* мобильные баннеры 600×400 → по высоте слота 253.27 (×0.6332), центрированы */
.mbn { position: absolute; left: -43.13px; top: 0; width: 600px; height: 400px; transform: scale(.63318); transform-origin: 0 0; overflow: hidden; background: #000; }
.mbn-sub { font: 600 16.782px/16.782px Montserrat; letter-spacing: -.3356px; color: #fff; }
.mbn-ttl { font: 600 27.397px/27.397px Montserrat; letter-spacing: -.5479px; color: #fff; }
.mbn-btn { width: 90.7px; height: 29.03px; border: .726px solid rgba(255,255,255,.45); border-radius: 3.628px; font: 700 9.433px Montserrat; letter-spacing: .4717px; color: #fff; }
.mbn-glass { background: rgba(0,0,0,.25); -webkit-backdrop-filter: blur(1.78px); backdrop-filter: blur(1.78px); border-radius: 2.45px; }

/* индикаторы слайдов */
.hs-dots { position: absolute; z-index: 3; display: flex; align-items: center; gap: 8.27px; left: 49.58px; bottom: 20.67px; height: 4.13px; }
.hs-dots button { width: 28.92px; height: 4.13px; padding: 0; border: 0; background: rgba(255,255,255,.3); cursor: pointer; transition: width .3s, background .3s; }
.hs-dots button.on { width: 41.32px; background: #00a651; }
.hs-dots::before { content: ""; position: absolute; inset: -10px -4px; }
.hs-m .hs-dots { left: auto; right: 13.12px; bottom: 30.4px; height: 2.46px; gap: 4.1px; }
.hs-m .hs-dots button { width: 13.12px; height: 2.46px; border-radius: 1.64px; background: rgba(255,255,255,.35); }
.hs-m .hs-dots button.on { width: 18.04px; background: #fff; }

/* ---------- карточки товаров ---------- */
.pc, .mc { cursor: pointer; transition: box-shadow .2s, transform .2s, left .45s ease; }
.pc:hover { box-shadow: 0 8px 24px rgba(0,0,0,.10); z-index: 2; }
.pc .btn.added, .mc .mbtn.added { background: #00a651; }
.mbtn { transition: background .15s; }
.mbtn:active { background: #005a38; }
.hrt, .mhrt { transition: transform .15s; }
.hrt:hover, .mhrt:hover { transform: scale(1.12); }
.pc.flash { animation: flash .45s ease; }
@keyframes flash { from { opacity: .35; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tab-d { cursor: pointer; transition: background .2s, color .2s; }
.tab-d:not(.on):hover { background: #e2e4e2; }
.nextbtn { cursor: pointer; transition: transform .2s; }
.nextbtn:hover { transform: translateX(3px); }
.col, .blog, .vid, .brand { transition: box-shadow .2s, transform .2s; }
.col:hover, .blog:hover, .brand:hover { box-shadow: 0 10px 26px rgba(0,0,0,.10); }
.more:hover { opacity: .75; }
.dbadge, .mbadge { pointer-events: none; }
[hidden] { display: none !important; }

/* ---------- тосты ---------- */
.toasts { position: fixed; z-index: 1000; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { padding: 12px 18px; border-radius: 10px; background: #111; color: #fff; font: 600 14px/1.35 Montserrat, sans-serif; box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s; text-align: center; }
.toast.in { opacity: 1; transform: none; }
.toast.ok { background: var(--green); }
.toast.err { background: #c62828; }

/* ---------- выезжающая корзина ---------- */
.drawer { position: fixed; inset: 0; z-index: 900; visibility: hidden; }
.drawer.open { visibility: visible; }
.drawer-bg { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .25s; }
.drawer.open .drawer-bg { opacity: 1; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s ease; font-family: Montserrat, sans-serif; }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid #e3e3e3; font-size: 20px; }
.x { width: 36px; height: 36px; border-radius: 18px; background: #f5f5f5; font-size: 24px; line-height: 1; color: #111; }
.x:hover { background: #e9e9e9; }
.drawer-list { flex: 1; overflow: auto; padding: 8px 22px; }
.drawer-empty { margin: 40px 0; text-align: center; color: #6b6b6b; font-size: 14px; line-height: 1.6; }
.ci { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed #e3e3e3; }
.ci img, .ci-ph { width: 76px; height: 76px; object-fit: contain; background: #f5f5f5; border-radius: 10px; flex: none; mix-blend-mode: multiply; }
.ci-b { flex: 1; min-width: 0; }
.ci-n { font-size: 13.5px; font-weight: 600; line-height: 1.35; color: #111; }
.ci-p { margin-top: 4px; font-size: 16px; font-weight: 800; color: #111; }
.ci-q { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; font-weight: 700; }
.ci-q button { width: 28px; height: 28px; border-radius: 8px; background: #f5f5f5; font-weight: 700; font-size: 16px; }
.ci-q span { min-width: 20px; text-align: center; }
.ci-q .q-del { width: auto; padding: 0 10px; margin-left: auto; font-size: 12px; font-weight: 600; color: #8b8b8b; background: none; }
.ci-q .q-del:hover { color: #c62828; }
.drawer-foot { padding: 18px 22px 22px; border-top: 1px solid #e3e3e3; }
.drawer-sum { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.drawer-sum b { font-size: 24px; font-weight: 900; }
.drawer-go { display: flex; align-items: center; justify-content: center; height: 52px; border-radius: 10px; background: var(--green); color: #fff; font: 700 15px Montserrat, sans-serif; }
.drawer-go:hover { background: #005a38; }
.drawer-go.off { pointer-events: none; opacity: .4; }
.drawer-clear { display: block; margin: 12px auto 0; font: 600 12.5px Montserrat, sans-serif; color: #8b8b8b; }

/* ---------- модальные окна ---------- */
.modal { position: fixed; inset: 0; z-index: 950; display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .2s; }
.modal.open { opacity: 1; }
.modal-bg { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.modal-box { position: relative; width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 22px; padding: 30px 28px 26px; font-family: Montserrat, sans-serif; transform: translateY(12px); transition: transform .25s; }
.modal.open .modal-box { transform: none; }
.modal-box > .x { position: absolute; top: 14px; right: 14px; }
.modal-box h3 { margin: 0 40px 8px 0; font-size: 22px; font-weight: 800; letter-spacing: -.22px; }
.modal-box p { margin: 0 0 16px; font-size: 13.5px; line-height: 1.55; color: #6b6b6b; }
.modal-box label { display: block; margin: 12px 0 6px; font-size: 12.5px; font-weight: 700; color: #4a4a4a; }
.modal-box input, .modal-box textarea, .modal-box select { width: 100%; border: 1px solid #e3e3e3; border-radius: 10px; padding: 12px 14px; font: 500 14px Montserrat, sans-serif; color: #111; background: #fff; }
.modal-box textarea { min-height: 96px; resize: vertical; }
.modal-box input:focus, .modal-box textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,113,70,.12); }
.modal-box .row2 { display: flex; gap: 8px; flex-wrap: wrap; }
.m-btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 50px; margin-top: 18px; border-radius: 10px; background: var(--green); color: #fff; font: 700 15px Montserrat, sans-serif; }
.m-btn:hover { background: #005a38; }
.m-btn.ghost { background: #f5f5f5; color: #111; margin-top: 10px; }
.stars-in { display: flex; gap: 6px; }
.stars-in button { font-size: 28px; line-height: 1; color: #d9d9d9; }
.stars-in button.on { color: #f5a623; }
.m-note { margin-top: 12px; font-size: 11.5px; color: #8b8b8b; line-height: 1.5; }
.lightbox .modal-box { width: min(900px, 100%); padding: 18px; }
.lightbox img { width: 100%; height: auto; max-height: 80vh; object-fit: contain; display: block; }

/* ---------- мобильная нижняя навигация ---------- */
.tabbar { display: none; }
@media (max-width: 767.98px) {
  body.has-tabbar { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tabbar { position: fixed; z-index: 800; left: 0; right: 0; bottom: 0; display: flex; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #e6e8ea; box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
  .tb-i { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 2px 0; color: #111; font: 700 11px/1.2 Montserrat, sans-serif; -webkit-tap-highlight-color: transparent; }
  .tb-i svg { width: 26px; height: 26px; }
  .tb-i.on { color: #306f4a; }
  .tb-badge { position: absolute; top: -4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #306f4a; color: #fff; font: 700 10.5px/18px Montserrat, sans-serif; text-align: center; box-shadow: 0 0 0 2px #fff; }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
.tb-links { display: flex; flex-direction: column; padding: 8px 22px; }
.tb-links a { padding: 16px 0; border-bottom: 1px solid #eee; font: 700 16px Montserrat, sans-serif; color: #111; }
.tb-links a:active { color: #306f4a; }
