:root{
  --ink:#1B1436; --ink-2:#2E2358; --gold:#C79A3C; --gold-soft:#F6EEDC;
  --paper:#F7F5F1; --line:#E6E2DA; --sale:#C0392B;
}
html{overflow-x:hidden}
/* Базовый размер. Админка (Оформление) подставляет свои значения прямо в шапке
   страницы и перекрывает эти строки. На телефоне размер не трогаем. */
html{font-size:16px}
@media (min-width:992px){html{font-size:15px}}

/* Шрифт со своего сервера. Файла нет — берётся системный, сайт не ломается.
   Так на страницах нет ни одного обращения к зарубежным серверам. */
@font-face{
  font-family:'Manrope';
  src:url('/fonts/manrope.woff2') format('woff2'),
      url('/fonts/manrope.ttf') format('truetype');
  font-weight:400 800;
  font-style:normal;
  font-display:swap;
}

body{background:var(--paper);color:var(--ink);
  font-family:'Manrope','Segoe UI',system-ui,-apple-system,'Roboto','Helvetica Neue',Arial,sans-serif;
  font-size:1rem;line-height:1.55;-webkit-text-size-adjust:100%;
  padding-bottom:80px;overflow-x:hidden;max-width:100%}
p{margin-bottom:.6rem}
@media (min-width:992px){body{padding-bottom:20px}}
.ic{width:1.15em;height:1.15em;vertical-align:-.15em;flex:none}

/* Шапка */
.topbar{background:var(--ink);color:#fff;position:sticky;top:0;z-index:1030;
  transition:transform .25s ease}
.topbar.hide{transform:translateY(-100%)}
.topbar.hide.keep{transform:none}
@media (prefers-reduced-motion:reduce){.topbar{transition:none}}
.logo img{height:34px;width:auto;display:block}
@media (min-width:992px){.logo img{height:44px}}
.search-input{border:0;border-radius:8px;padding:.6rem .9rem;font-size:.95rem}
.search-btn{background:var(--gold);border:0;color:#1B1436;font-weight:600;border-radius:8px}
.icon-link{color:#fff;text-decoration:none;font-size:.72rem;display:flex;flex-direction:column;align-items:center;gap:2px}
.icon-link .ic{width:1.35rem;height:1.35rem}
.icon-link:hover{color:var(--gold)}
.cart-badge{position:absolute;top:-5px;right:-9px;font-size:.62rem;background:var(--gold);color:#1B1436;
  border-radius:20px;padding:1px 5px;font-weight:700}

/* Разделы */
.cat-bar{background:var(--ink-2)}
/* Полоса разделов: слева «Все товары», справа значки соцсетей и магазинов */
.cat-bar-in{display:flex;align-items:center;justify-content:space-between;gap:.75rem}

.top-links{display:flex;align-items:center;gap:.4rem;flex:0 0 auto;padding:.25rem 0}
.top-link{--c:var(--gold);
  display:inline-flex;align-items:center;justify-content:center;
  height:34px;min-width:34px;padding:0 .3rem;border-radius:9px;
  text-decoration:none;transition:transform .15s,background .15s}
.top-link img{width:26px;height:26px;display:block;object-fit:contain}
.top-link .mark{color:var(--c);font-weight:800;font-size:.85rem;letter-spacing:.02em;
  line-height:1;white-space:nowrap;background:#fff;border-radius:7px;padding:.3rem .5rem}
.top-link:hover{transform:translateY(-1px);background:rgba(255,255,255,.1)}

/* На телефоне в полосе остаётся только Telegram — остальное не помещается */
@media (max-width:767px){
  .top-link{display:none}
  .top-link.tl-telegram{display:inline-flex}
  .top-links{gap:0}
}
/* На узких экранах компьютера значки чуть меньше, чтобы строка не переносилась */
@media (min-width:768px) and (max-width:1100px){
  .top-link{height:30px;min-width:30px}
  .top-link img{width:23px;height:23px}
  .top-link .mark{font-size:.78rem;padding:.25rem .4rem}
}
.cat-chip{color:var(--gold);font-weight:600;font-size:.87rem;padding:.6rem .85rem;background:none;
  border:0;border-bottom:2px solid var(--gold)}
@media (min-width:992px){.w-lg-auto{width:auto!important}}
.mega{background:#fff;border:0;border-radius:0 0 12px 12px;box-shadow:0 12px 28px rgba(27,20,54,.18);padding:.5rem}
.mega a{display:block;padding:.5rem .75rem;border-radius:8px;color:var(--ink);text-decoration:none;font-size:.9rem}
.mega a:hover{background:var(--gold-soft)}
.mega .count{color:#8C8697;font-size:.8rem}

/* Карточки товаров */
.card-product{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden;height:100%;
  display:flex;flex-direction:column;transition:box-shadow .18s,transform .18s}
.card-product:hover{box-shadow:0 8px 24px rgba(27,20,54,.12);transform:translateY(-2px)}
.card-product.hot{border-color:var(--gold);box-shadow:0 0 0 2px rgba(199,154,60,.28)}
.card-img-wrap{position:relative;aspect-ratio:3/4;background:linear-gradient(150deg,#2E2358,#1B1436 60%);
  display:flex;align-items:center;justify-content:center;overflow:hidden}
.card-img-wrap img{width:100%;height:100%;object-fit:cover}
.card-img-wrap .glyph{font-size:2.4rem;color:var(--gold);opacity:.85}
.badge-sale{display:inline-block;background:var(--sale);color:#fff;font-size:.72rem;
  font-weight:700;padding:3px 9px;border-radius:6px;line-height:1.3;white-space:nowrap}
.badge-hit{display:inline-block;background:var(--gold);color:#1B1436;font-size:.72rem;
  font-weight:700;padding:3px 9px;border-radius:6px;line-height:1.3;white-space:nowrap}
.timer{background:var(--sale);color:#fff;font-size:.7rem;font-weight:700;text-align:center;padding:3px}
.p-title{font-size:.95rem;font-weight:500;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;
  -webkit-box-orient:vertical;overflow:hidden;color:var(--ink);text-decoration:none;min-height:2.7em}
.p-title:hover{color:var(--ink);text-decoration:underline}
.p-pricerow{display:flex;align-items:center;flex-wrap:wrap;gap:.35rem .5rem}
.p-price{font-size:1.2rem;font-weight:800;letter-spacing:-.01em}
.p-old{font-size:.85rem;color:#8C8697;text-decoration:line-through}
.btn-cart{background:var(--gold);border:0;color:#1B1436;font-weight:700;font-size:.9rem;border-radius:9px;padding:.55rem}
.btn-cart:hover{background:#B4882F;color:#1B1436}
.btn-cart.added{background:var(--gold-soft);color:var(--ink);border:1px solid var(--gold)}
.btn-cart:disabled{background:#DDD9D0;color:#8C8697}

/* Карточка товара */
.gal-main{width:100%;border-radius:14px;background:#fff;border:1px solid var(--line);object-fit:contain;aspect-ratio:3/4}
.thumbs{display:flex;gap:.5rem;overflow-x:auto;padding-top:.6rem;scrollbar-width:none}
.thumbs::-webkit-scrollbar{display:none}
.thumbs img{width:62px;height:82px;object-fit:cover;border-radius:8px;border:2px solid transparent;cursor:pointer;background:#fff}
.thumbs img.on{border-color:var(--gold)}
.buy{background:#fff;border:1px solid var(--line);border-radius:14px;padding:1.1rem}
.price{font-size:1.9rem;font-weight:800;line-height:1}
.old{font-size:1rem;color:#8C8697;text-decoration:line-through}
.in-stock{color:#2E7D32;font-weight:600;font-size:.88rem}
.no-stock{color:var(--sale);font-weight:600;font-size:.88rem}
.note{background:var(--gold-soft);border:1px solid #EADFC4;border-radius:10px;padding:.7rem .85rem;font-size:.85rem}
.block{background:#fff;border:1px solid var(--line);border-radius:14px;padding:1.1rem;margin-bottom:1rem}
.block h2{font-size:1.05rem;font-weight:800;margin-bottom:.8rem}
.descr p{margin-bottom:.7rem;line-height:1.6}
.ritual{background:linear-gradient(150deg,#2E2358,#1B1436);color:#fff;border-radius:12px;padding:1rem;
  font-size:.92rem;line-height:1.6}
.ritual .t{color:var(--gold);font-weight:700;margin-bottom:.4rem}
table.attrs{width:100%}
table.attrs td{padding:.5rem .2rem;border-bottom:1px solid var(--line);font-size:.9rem;vertical-align:top}
table.attrs td:first-child{color:#6E6880;width:52%}
table.attrs tr:last-child td{border-bottom:0}
.crumbs{font-size:.82rem;color:#6E6880}
.crumbs a{color:#6E6880;text-decoration:none}
.crumbs a:hover{color:var(--gold)}
.sticky-buy{position:fixed;bottom:56px;left:0;right:0;background:#fff;border-top:1px solid var(--line);
  padding:.6rem 0;z-index:1035;box-shadow:0 -4px 14px rgba(27,20,54,.1)}
@media (min-width:992px){.sticky-buy{display:none}}

/* Корзина и оформление */
.box{background:#fff;border:1px solid var(--line);border-radius:12px}
.delivery-opt{border:1px solid var(--line);border-radius:10px;background:#fff;cursor:pointer}
.delivery-opt:has(input:checked){border-color:var(--gold);background:var(--gold-soft)}
.btn-pay{background:var(--ink);color:#fff;font-weight:700;border:0;border-radius:10px;padding:.7rem}
.btn-pay:disabled{background:#B8B3C4}
.step-num{width:24px;height:24px;border-radius:50%;background:var(--ink);color:var(--gold);font-size:.78rem;
  font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.progress{height:6px;background:var(--line)}
.progress-bar{background:var(--gold)}
.link-inline{background:none;border:0;padding:0;color:var(--ink);text-decoration:underline}
.link-inline:hover{color:var(--gold)}

/* Нижнее меню */
.tabbar{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid var(--line);z-index:1040;display:flex}
.tabbar a{flex:1;text-align:center;padding:.45rem 0 .35rem;font-size:.66rem;color:#6E6880;text-decoration:none}
.tabbar .ic{width:1.35rem;height:1.35rem;display:block;margin:0 auto 2px}
.tabbar a.active{color:var(--ink);font-weight:700}
.tabbar a.active .ic{color:var(--gold)}
@media (min-width:992px){.tabbar{display:none}}

/* Плашка условий */
.notice{position:fixed;left:0;right:0;bottom:56px;z-index:1035;background:var(--ink);color:#fff;
  padding:.7rem 0;box-shadow:0 -6px 18px rgba(27,20,54,.25);border-top:2px solid var(--gold)}
@media (min-width:992px){.notice{bottom:0}}
.btn-ok{background:var(--gold);border:0;color:#1B1436;font-weight:700;border-radius:8px;padding:.4rem 1.1rem;flex:none}
.btn-ok:hover{background:#B4882F}

/* Подвал */
footer{background:var(--ink);color:#CFC9E0;font-size:.85rem}
footer a,.link-btn{color:#CFC9E0;text-decoration:none;background:none;border:0;padding:0;text-align:left}
footer a:hover,.link-btn:hover{color:var(--gold)}
.footer-legal p{margin-bottom:.5rem;opacity:.85}
.doc-body{max-height:70vh;overflow-y:auto;font-size:.9rem;line-height:1.55}
.doc-body p{margin-bottom:.6rem}
.doc-body h6{font-size:.95rem}

a:focus-visible,button:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* ---------- Логотипы площадок в подвале ---------- */
.shops-row{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}
.shops-title{font-size:.85rem;opacity:.7}
.shops-logos{display:flex;flex-wrap:wrap;gap:.5rem}
.shop-logo{--c:var(--gold);
  display:inline-flex;align-items:center;justify-content:center;
  height:38px;min-width:76px;padding:0 .85rem;
  background:#fff;border:1px solid rgba(255,255,255,.25);border-radius:9px;
  text-decoration:none;transition:transform .15s,box-shadow .15s}
.shop-logo:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(0,0,0,.28)}
.shop-logo .mark{color:var(--c);font-weight:800;font-size:.95rem;letter-spacing:.02em;line-height:1;white-space:nowrap}
@media (max-width:575px){
  .shop-logo{height:34px;min-width:66px;padding:0 .7rem}
  .shop-logo .mark{font-size:.85rem}
}

/* ---------- Галерея товара ---------- */
.gal-layout{display:flex;flex-direction:column;gap:.6rem}
.gal-layout .gal-wrap{order:1}      /* на телефоне сначала фото */
.gal-layout .thumbs{order:2}        /* миниатюры под ним */
@media (min-width:992px){
  .gal-layout{flex-direction:row;align-items:flex-start}
  .gal-layout .thumbs{order:1;flex:0 0 80px;flex-direction:column;max-height:560px;
    overflow-y:auto;overflow-x:hidden}
  .gal-layout .thumb-item{width:72px;height:94px}
  .gal-layout .gal-wrap{order:2;flex:1;min-width:0}
}
.gal-wrap{position:relative;overflow:hidden;border-radius:14px;
  background:#fff;border:1px solid var(--line)}
/* Показывается ровно один кадр — смещение невозможно */
.gal{position:relative;width:100%;touch-action:pan-y}
.gal-slide{display:none;width:100%;aspect-ratio:3/4;
  align-items:center;justify-content:center;background:#fff;overflow:hidden}
.gal-slide.on{display:flex;animation:galIn .22s ease}
.gal-slide>*{margin:0 auto;max-width:100%}
@keyframes galIn{from{opacity:.25}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.gal-slide.on{animation:none}}
.gal-slide img{display:block;width:100%;height:100%;object-fit:contain;object-position:center;
  cursor:zoom-in;user-select:none;-webkit-user-drag:none}
.gal-slide video{display:block;width:100%;height:100%;object-fit:contain;
  object-position:center;background:#000}

.gal-prev,.gal-next{position:absolute;top:50%;transform:translateY(-50%);z-index:3;
  width:38px;height:38px;border:0;border-radius:50%;background:rgba(255,255,255,.9);
  color:var(--ink);font-size:1.3rem;line-height:1;display:flex;align-items:center;justify-content:center;
  box-shadow:0 2px 10px rgba(27,20,54,.22);cursor:pointer;transition:opacity .15s}
.gal-prev{left:10px}.gal-next{right:10px}
.gal-prev:hover,.gal-next:hover{background:var(--gold);color:#1B1436}
.gal-prev.off,.gal-next.off{opacity:.32;pointer-events:none}

.gal-dots{position:absolute;left:0;right:0;bottom:10px;display:flex;justify-content:center;gap:6px;z-index:3}
.gal-dot{width:7px;height:7px;border-radius:50%;background:rgba(27,20,54,.28);border:0;padding:0;cursor:pointer}
.gal-dot.on{background:var(--gold);width:18px;border-radius:4px}
.gal-hint{text-align:center;font-size:.75rem;color:#8C8697;margin-top:.4rem}

.thumbs{display:flex;gap:.45rem;overflow-x:auto;scrollbar-width:thin}
.thumbs::-webkit-scrollbar{width:4px;height:4px}
.thumbs::-webkit-scrollbar-thumb{background:var(--line);border-radius:4px}
.thumb-item{width:62px;height:80px;flex:none;padding:0;border:2px solid transparent;border-radius:8px;
  overflow:hidden;background:#fff;cursor:pointer}
.thumb-item img{width:100%;height:100%;object-fit:cover;display:block}
.thumb-item.on{border-color:var(--gold)}
.thumb-video{background:var(--ink);background-size:cover;background-position:center;
  display:flex;align-items:center;justify-content:center;position:relative}
.thumb-video .tv-play{width:26px;height:26px;border-radius:50%;background:rgba(27,20,54,.72);
  color:var(--gold);font-size:.8rem;display:flex;align-items:center;justify-content:center}

/* Увеличение фото */
.zoom-box{position:fixed;inset:0;z-index:2000;background:rgba(15,11,32,.95);
  display:none;align-items:center;justify-content:center;padding:1rem}
.zoom-box.on{display:flex}
.zoom-box img{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px}
.zoom-close{position:absolute;top:14px;right:16px;width:40px;height:40px;border:0;border-radius:50%;
  background:rgba(255,255,255,.16);color:#fff;font-size:1.1rem;cursor:pointer}
.zoom-close:hover{background:var(--gold);color:#1B1436}

/* Характеристики на всю ширину, когда описания нет */
.attrs-wide{column-count:2;column-gap:2rem}
@media (max-width:767px){.attrs-wide{column-count:1}}

/* ---------- Подписка на новости ---------- */
.news-block{background:rgba(199,154,60,.12);border:1px solid rgba(199,154,60,.4);
  border-radius:12px;padding:1rem}
.news-form{display:flex;gap:.5rem;flex-wrap:wrap}
.news-form .form-control{flex:1;min-width:180px;border:0;border-radius:8px;padding:.55rem .8rem}
.news-agree{display:flex;gap:.5rem;align-items:flex-start;margin-top:.6rem;font-size:.76rem;opacity:.8}
.news-agree input{margin-top:.2rem;flex:none}
.contact-link{color:inherit;text-decoration:none}
.contact-link:hover{color:var(--gold)}
.pmail,.pphone{cursor:default}

/* ---------- Листание фото в каталоге ---------- */
.card-img-wrap{position:relative;aspect-ratio:3/4;overflow:hidden}
.mini-gal{position:relative;height:100%;width:100%;overflow:hidden;touch-action:pan-y}
.mini-slide{display:none;width:100%;height:100%}
.mini-slide.on{display:block}
.mini-slide img{width:100%;height:100%;object-fit:contain;object-position:center;display:block;background:#fff}
.mini-prev,.mini-next{position:absolute;top:50%;transform:translateY(-50%);z-index:2;
  width:26px;height:26px;border:0;border-radius:50%;background:rgba(255,255,255,.9);
  color:var(--ink);font-size:1rem;line-height:1;display:flex;align-items:center;justify-content:center;
  cursor:pointer;opacity:0;transition:opacity .15s}
.mini-prev{left:5px}.mini-next{right:5px}
.card-product:hover .mini-prev,.card-product:hover .mini-next{opacity:1}
@media (hover:none){.mini-prev,.mini-next{display:none}}
.mini-dots{position:absolute;left:0;right:0;bottom:6px;display:flex;justify-content:center;gap:4px;z-index:2}
.mini-dot{width:5px;height:5px;border-radius:50%;background:rgba(255,255,255,.55)}
.mini-dot.on{background:var(--gold);width:14px;border-radius:3px}

/* Краткая сводка характеристик в блоке покупки */
.attrs-short td{padding:.35rem .2rem;font-size:.85rem;border-bottom:1px dashed var(--line)}
.attrs-short tr:last-child td{border-bottom:0}

/* ---------- Карточка товара: три колонки как на маркетплейсе ---------- */
/* Телефон: фото -> название -> цена и кнопка -> описание -> характеристики -> условия */
.pcard{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem;
  grid-template-areas:"gal" "head" "buy" "info"}
.pcard-gal{grid-area:gal}
.pcard-head{grid-area:head}
.pcard-buy{grid-area:buy}
.pcard-info{grid-area:info}
@media (min-width:992px){
  /* Компьютер: слева фото, в центре кратко о товаре, справа покупка.
     Полные характеристики и описание переезжают в выезжающую панель. */
  .pcard{grid-template-columns:minmax(0,360px) minmax(0,1fr) 290px;
    grid-template-rows:auto;gap:1.25rem;
    grid-template-areas:"gal head buy"}
  .page-tovar > .container{max-width:1560px}
}
@media (min-width:1200px){
  .pcard{grid-template-columns:minmax(0,420px) minmax(0,1fr) 300px;gap:1.5rem}
}
@media (min-width:1500px){
  .pcard{grid-template-columns:minmax(0,500px) minmax(0,1fr) 330px;gap:1.75rem}
}

.pname{font-size:1.35rem;font-weight:800;line-height:1.3;margin-bottom:.3rem}
@media (min-width:992px){.pname{font-size:1.6rem}}
.psku{color:#8C8697;font-size:.85rem;margin-bottom:.4rem}
.pshort{color:#4A4460;font-size:.98rem;line-height:1.55;margin-bottom:.2rem}
.pcard-head{margin-bottom:-.2rem}
.pmeta{display:flex;flex-wrap:wrap;gap:.4rem;font-size:.82rem;color:#8C8697;margin-bottom:1rem}
.pmeta a{color:#8C8697;text-decoration:none}
.pmeta a:hover{color:var(--gold)}

.psec{background:#fff;border:1px solid var(--line);border-radius:14px;padding:1.15rem;margin-bottom:.85rem}
@media (min-width:992px){.psec{padding:1.4rem}}
.psec h2{font-size:1.15rem;font-weight:800;margin-bottom:.9rem;padding-bottom:.6rem;
  border-bottom:1px solid var(--line)}
.psec-last{margin-bottom:0}
.descr{font-size:1rem}
.descr p{margin-bottom:.75rem;line-height:1.7}
.descr p:last-child{margin-bottom:0}

/* Характеристики: слева название серым, справа значение — читается сразу */
.specs{display:block}
.spec{display:grid;grid-template-columns:minmax(110px,45%) 1fr;gap:.5rem 1rem;
  padding:.6rem 0;border-bottom:1px dashed var(--line);align-items:baseline}
@media (min-width:768px){.spec{grid-template-columns:minmax(170px,36%) 1fr;gap:.5rem 1.5rem}}
.spec:last-child{border-bottom:0;padding-bottom:0}
.spec-k{color:#6E6880;font-size:.93rem;line-height:1.45}
.spec-v{font-size:.97rem;font-weight:500;line-height:1.5}

/* Правый блок покупки */
.buybox{background:#fff;border:1px solid var(--line);border-radius:14px;padding:1.15rem}
@media (min-width:992px){.pcard-buy .buybox{position:sticky;top:120px}}
.buyrow{display:flex;justify-content:space-between;gap:.75rem;font-size:.85rem;
  padding:.45rem 0;border-bottom:1px solid var(--line)}
.buyrow:last-of-type{border-bottom:0}
.buyrow span{color:#8C8697}
.buyrow b{text-align:right;font-weight:600}
.buynote{font-size:.78rem;color:#8C8697;margin:.7rem 0 0}
/* на телефоне: в блоке остаётся «Купить сейчас», обычная кнопка — в липкой панели снизу */
@media (max-width:991px){
  .buybox form:first-of-type{display:none}
  .buybox{padding:.85rem}
  .price{font-size:1.6rem}
}

/* Галерея внутри карточки */
.pcard-gal .gal-slide{aspect-ratio:3/4}
@media (min-width:1400px){.pcard-gal .gal-slide{aspect-ratio:5/6}}

/* На телефоне фото помещается целиком в видимую часть экрана */
@media (max-width:991px){
  /* высота в vh на телефоне меняется, когда прячется адресная строка,
     и кадр дёргается — поэтому берём устойчивую единицу svh */
  .pcard-gal .gal-slide{aspect-ratio:auto;height:62vh;height:62svh;min-height:300px;max-height:520px}
  .pcard-gal .gal-slide img,
  .pcard-gal .gal-slide video{height:100%;width:100%;object-fit:contain}
  .pcard-gal .thumb-item{width:56px;height:72px}
}

@media (min-width:992px){
  .pcard-gal .gal-layout .thumbs{max-height:460px}
}

/* Своя плашка на товаре: текст и цвет задаются в админке */
.badge-own{--b:#C79A3C;--bt:#fff;
  display:inline-block;background:var(--b);color:var(--bt);
  font-size:.72rem;font-weight:700;padding:3px 9px;border-radius:6px;
  letter-spacing:.01em;line-height:1.3;white-space:nowrap}
/* плашки стоят рядом с ценой и не закрывают надписи на обложке */
.badge-inline{position:static;display:inline-block;font-size:.72rem;
  padding:3px 9px;border-radius:6px;line-height:1.3;white-space:nowrap;margin:0}
.badge-sale.badge-inline{background:#FDECEA;color:var(--sale);font-weight:700}

/* ---------- Прочее ---------- */
.prate{display:flex;align-items:center;gap:.5rem;font-size:.86rem;margin-bottom:.75rem}
.prate .stars{color:var(--gold);letter-spacing:.05em}
.psec-toggle{background:none;border:1px solid var(--line);border-radius:9px;
  padding:.5rem .9rem;font-size:.88rem;font-weight:600;color:var(--ink);margin-bottom:1rem}
.psec-toggle:hover{border-color:var(--gold);background:var(--gold-soft)}

/* ---------- Блок покупки: цена, остаток, кнопки ---------- */
.pricerow{display:flex;align-items:center;gap:.5rem .6rem;flex-wrap:wrap;margin-bottom:.6rem}
.price{font-size:2rem;font-weight:800;line-height:1.1;letter-spacing:-.02em}
.old{font-size:1rem;color:#8C8697;text-decoration:line-through}
.disc{background:#FDECEA;color:var(--sale);font-size:.78rem;font-weight:700;
  padding:3px 8px;border-radius:6px}

.stock-line{margin-bottom:.85rem}
.stock-txt{display:block;font-size:.84rem;font-weight:600;color:#2E7D32;margin-bottom:.3rem}
.stock-bar{display:block;height:4px;background:var(--line);border-radius:4px;overflow:hidden}
.stock-bar i{display:block;height:100%;background:var(--gold);border-radius:4px}

.btn-buy{background:var(--ink);border:0;color:#fff;font-weight:700;border-radius:10px;font-size:.95rem}
.buybox .btn-cart{font-size:.95rem}
.btn-buy:hover{background:#2E2358;color:#fff}
.plink{background:none;border:0;padding:0;margin-right:1rem;margin-top:.6rem;color:var(--ink);text-decoration:underline;font-size:.88rem}
.plink:hover{color:var(--gold)}
.plist{margin:0;padding-left:1.1rem;font-size:.9rem;line-height:1.7}
.sale-until{color:var(--sale);font-weight:600;font-size:.85rem;margin-bottom:.6rem}


/* Каталог: карточки крупнее, фото видно целиком */
.card-img-wrap{background:#fff}
@media (min-width:1400px){
  .card-product{border-radius:14px}
}

/* ---------- Заглушка, когда фото у товара ещё нет ---------- */
.ph-none{background:#fff;color:#CFC9DE;display:flex;align-items:center;justify-content:center}
.ph-none svg{width:44%;max-width:96px;height:auto}
.pcard-gal .ph-none{border-radius:14px}

/* ---------- Читаемость на телефоне ---------- */
@media (max-width:991px){
  .pcard{gap:.85rem}
  .pcard-head{margin-bottom:0}
  .pname{font-size:1.2rem}
  .psec{padding:1rem}
  .psec h2{font-size:1.08rem}
  .buybox{padding:1rem}
  .price{font-size:1.75rem}
  .card-product .p-title{font-size:.9rem}
}

/* Ссылки «Подробно о доставке» и рядом — как отдельные кнопки, а не сплошная строка */
.plink{display:inline-block;margin:.5rem .9rem 0 0}

/* ---------- Оценка и вопросы ---------- */
.prate{display:flex;align-items:center;flex-wrap:wrap;gap:.4rem .85rem;margin:.1rem 0 .55rem}
.rate-val{display:inline-flex;align-items:center;gap:.25rem;font-size:.95rem}
.rate-val svg{width:1.05em;height:1.05em;color:#F5A623}
.rate-val b{font-weight:700}
.rate-cnt{color:#6E6880;font-size:.88rem}
.rate-q{display:inline-flex;align-items:center;gap:.3rem;background:none;border:0;padding:0;
  color:#6E6880;font-size:.88rem;text-decoration:underline;text-underline-offset:2px}
.rate-q svg{width:1.05em;height:1.05em}
.rate-q:hover{color:var(--gold)}

/* ---------- Кратко о товаре и кнопка «Характеристики и описание» ---------- */
.brief{margin-top:.9rem}
.brief .spec{padding:.5rem 0}
.brief-more{display:block;width:100%;text-align:left;margin-top:.6rem;
  background:#fff;border:1px solid var(--line);border-radius:10px;
  padding:.7rem .9rem;font-size:.93rem;font-weight:600;color:var(--ink);
  position:relative}
.brief-more:after{content:"›";position:absolute;right:.9rem;top:50%;transform:translateY(-52%);
  font-size:1.35rem;color:#8C8697;line-height:1}
.brief-more:hover{border-color:var(--gold);background:var(--gold-soft)}

/* На телефоне краткого списка нет — там все характеристики видны на странице,
   а повторять их дважды нельзя. */
@media (max-width:991px){
  .brief,.brief-more{display:none}
  .panel-head,.panel-foot,.panel-shade{display:none}
}
@media (min-width:992px){
  .psku-mob{display:none}
}

/* ---------- Выезжающая панель с характеристиками (только на компьютере) ---------- */
@media (min-width:992px){
  .pcard-info{position:fixed;top:0;right:0;bottom:0;width:min(620px,94vw);
    background:var(--paper);z-index:2060;display:flex;flex-direction:column;
    transform:translateX(100%);transition:transform .26s ease;
    box-shadow:-14px 0 40px rgba(27,20,54,.22);visibility:hidden}
  body.panel-open .pcard-info,
  .pcard-info:target{transform:none;visibility:visible}
  .panel-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;
    padding:1rem 1.25rem;background:#fff;border-bottom:1px solid var(--line);flex:none}
  .panel-title{font-size:1.15rem;font-weight:800}
  .panel-close{background:none;border:0;font-size:1.9rem;line-height:1;color:#8C8697;
    width:38px;height:38px;border-radius:50%;flex:none}
  .panel-close:hover{background:var(--line);color:var(--ink)}
  .panel-body{flex:1;overflow-y:auto;padding:1rem 1.25rem;overscroll-behavior:contain}
  .panel-foot{display:flex;align-items:center;gap:1rem;flex:none;
    padding:.85rem 1.25rem;background:#fff;border-top:1px solid var(--line)}
  .panel-price{font-size:1.35rem;font-weight:800;line-height:1.1}
  .panel-old{font-size:.85rem;color:#8C8697;text-decoration:line-through}
  .panel-shade{position:fixed;inset:0;background:rgba(15,11,32,.45);z-index:2055;
    opacity:0;visibility:hidden;transition:opacity .2s ease}
  body.panel-open .panel-shade{opacity:1;visibility:visible}
  body.panel-open{overflow:hidden}
  .pcard-info .psec{margin-bottom:.85rem}
  .pcard-info .psec-last{margin-bottom:0}
}
@media (prefers-reduced-motion:reduce){.pcard-info{transition:none}}

/* ---------- Вопросы и ответы ---------- */
.qmsg{border-radius:10px;padding:.75rem 1rem;margin-bottom:.9rem;font-size:.93rem}
.qmsg-ok{background:#E8F5E9;border:1px solid #B7DEBA;color:#1E5B22}
.qmsg-err{background:#FDECEA;border:1px solid #F3C4BE;color:#8E2A1E}

.qa-list{margin-bottom:1rem}
.qa{border-bottom:1px solid var(--line);padding-bottom:.9rem;margin-bottom:.9rem}
.qa:last-child{border-bottom:0;padding-bottom:0;margin-bottom:0}
.qa-who{font-weight:700;font-size:.92rem}
.qa-date{color:#8C8697;font-size:.82rem;margin-left:.5rem}
.qa-q p{margin:.25rem 0 0;font-size:.96rem;line-height:1.55}
.qa-a{margin-top:.6rem;padding:.7rem .85rem;background:var(--gold-soft);
  border-left:3px solid var(--gold);border-radius:0 10px 10px 0}
.qa-a .qa-who{color:#7A5B14}
.qa-a p{margin:.2rem 0 0;font-size:.95rem;line-height:1.55}

/* Кнопка «Задать вопрос» в модальном окне не должна прыгать по ширине */
#mQuestion .modal-footer{gap:.75rem}
#mQuestion .btn-cart{min-width:170px}


/* ---------- Окна поверх панели «Характеристики» ----------
   Панель товара лежит на слое 2060, поэтому окна Bootstrap (1055)
   открывались ЗА ней и выглядели пустыми. Поднимаем их выше. */
.modal-backdrop{z-index:2070}
.modal{z-index:2075}
/* окно не должно упираться в края телефона, кнопка «Отправить» всегда видна */
.modal-dialog{margin:.6rem}
@media (min-width:576px){.modal-dialog{margin:1.75rem auto}}
.modal-footer{position:sticky;bottom:0;background:#fff;z-index:2;gap:.5rem}
.modal-dialog-scrollable .modal-body{overscroll-behavior:contain}

/* Переход между «Доставка → Оплата → Возврат» */
.doc-steps{display:flex;gap:.35rem;flex-wrap:wrap;align-items:center;margin-right:auto}
.doc-step{width:9px;height:9px;border-radius:50%;background:var(--line,#ddd);display:inline-block}
.doc-step.done{background:var(--gold,#C79A3C)}
.doc-step.now{background:var(--ink,#1B1436)}

/* ================= Чат: плавающая кнопка и окно ================= */
.chat-fab{position:fixed;right:16px;bottom:16px;z-index:2090;display:flex;align-items:center;gap:.5rem;
  border:0;border-radius:30px;padding:.65rem 1rem;background:var(--ink,#1B1436);color:#fff;
  box-shadow:0 6px 22px rgba(27,20,54,.32);cursor:pointer;font-size:.88rem;font-weight:600;
  transition:transform .18s ease,opacity .18s ease}
.chat-fab svg{width:21px;height:21px;flex:none}
.chat-fab:hover{transform:translateY(-2px);background:#2E2358}
.chat-fab.hide{opacity:0;transform:translateY(20px);pointer-events:none}
body.chat-open .chat-fab{opacity:0;pointer-events:none}

.chat-shade{position:fixed;inset:0;background:rgba(15,11,32,.45);z-index:2092;
  opacity:0;visibility:hidden;transition:opacity .18s ease,visibility .18s}
body.chat-open .chat-shade{opacity:1;visibility:visible}

.chat-box{position:fixed;right:16px;bottom:16px;width:min(360px,calc(100vw - 32px));
  max-height:calc(100vh - 32px);background:var(--paper,#F7F5F1);border-radius:14px;z-index:2095;
  display:flex;flex-direction:column;box-shadow:0 18px 50px rgba(15,11,32,.35);overflow:hidden;
  opacity:0;visibility:hidden;transform:translateY(18px);
  transition:opacity .2s ease,transform .2s ease,visibility .2s}
body.chat-open .chat-box{opacity:1;visibility:visible;transform:none}

.chat-head{display:flex;align-items:flex-start;gap:.5rem;padding:.6rem .8rem;
  background:var(--ink,#1B1436);color:#fff;flex:none}
.chat-title{font-weight:700;font-size:.95rem;line-height:1.2}
.chat-sub{font-size:.74rem;opacity:.75;margin-top:.05rem}
.chat-x{margin-left:auto;background:none;border:0;color:#fff;font-size:1.4rem;line-height:1;
  width:28px;height:28px;border-radius:7px;cursor:pointer;flex:none}
.chat-x:hover{background:rgba(255,255,255,.16)}

.chat-body{padding:.7rem .8rem .85rem;overflow-y:auto;overscroll-behavior:contain;flex:1 1 auto;
  display:flex;flex-direction:column}
/* переписка прижата к низу окна, как в мессенджере */
.chat-box[data-rezhim="lenta"] .chat-lenta{margin-top:auto}
.chat-tovar{background:#fff;border:1px dashed var(--line,#E6E2DA);border-radius:8px;
  padding:.3rem .55rem;font-size:.78rem;margin-bottom:.5rem;color:#6b6480}
.chat-tovar[hidden]{display:none}
.chat-2{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}
.chat-2>*{min-width:0}
.chat-box .form-control,.chat-box textarea{max-width:100%}
.chat-lbl{display:block;font-size:.74rem;color:#6b6480;margin:.45rem 0 .15rem}
.chat-2 .chat-lbl{margin-top:0}
.chat-box .form-control{font-size:16px;padding:.35rem .6rem;border-radius:8px}
.chat-box textarea.form-control{padding:.4rem .6rem;line-height:1.35}
.chat-agree{display:flex;gap:.45rem;align-items:flex-start;font-size:.75rem;
  line-height:1.35;margin-top:.6rem;color:#6b6480}
.chat-agree input{margin-top:.1rem;flex:none;width:15px;height:15px}
.chat-err{background:#FDE7E7;border:1px solid #F3C2C2;color:#8B2020;border-radius:8px;
  padding:.4rem .6rem;font-size:.8rem;margin-bottom:.5rem}
.chat-trap{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.chat-done{text-align:center;padding:1rem .5rem}
.chat-ok{width:46px;height:46px;border-radius:50%;background:#D6F0DF;color:#14532d;
  display:flex;align-items:center;justify-content:center;font-size:1.4rem;margin:0 auto .6rem}

/* ---- переписка: сообщения ---- */
.chat-lenta{display:flex;flex-direction:column;gap:.45rem}
.chat-lenta[hidden]{display:none}
.msg{max-width:86%;border-radius:12px;padding:.45rem .65rem;font-size:.86rem;line-height:1.4}
.msg-t{white-space:pre-wrap;word-break:break-word}
.msg-d{font-size:.68rem;opacity:.65;margin-top:.2rem}
.msg-me{align-self:flex-end;background:var(--ink,#1B1436);color:#fff;border-bottom-right-radius:4px}
.msg-shop{align-self:flex-start;background:#fff;border:1px solid var(--line,#E6E2DA);
  color:#231b45;border-bottom-left-radius:4px}
.chat-note-ok{align-self:center;text-align:center;font-size:.74rem;color:#1E5B22;
  background:#E8F5E9;border-radius:8px;padding:.35rem .6rem;margin-top:.2rem}
.chat-zakryt{align-self:center;text-align:center;font-size:.74rem;color:#6b6480;
  background:#F1EFEA;border-radius:8px;padding:.35rem .6rem}

/* ---- строка ответа внизу окна ---- */
.chat-write{flex:none;border-top:1px solid var(--line,#E6E2DA);background:#fff;padding:.5rem .6rem}
.chat-write[hidden]{display:none}
.chat-write-row{display:flex;gap:.4rem;align-items:flex-end}
.chat-write textarea.form-control{font-size:16px;padding:.4rem .6rem;border-radius:10px;
  resize:none;min-height:38px;max-height:96px;overflow-y:auto}
.chat-go{flex:none;width:38px;height:38px;border:0;border-radius:10px;cursor:pointer;
  background:var(--gold,#C79A3C);color:#1B1436;display:flex;align-items:center;justify-content:center}
.chat-go:hover{filter:brightness(1.06)}
.chat-go:disabled{opacity:.5;cursor:default}
.chat-go svg{width:19px;height:19px}
.chat-write .chat-err{margin-bottom:.4rem}

/* красная точка на кнопке: магазин ответил */
.chat-dot{position:absolute;top:-3px;right:-3px;width:11px;height:11px;border-radius:50%;
  background:#D64545;border:2px solid #fff}
.chat-fab-new{animation:chatPulse 2.2s ease-in-out 3}
@keyframes chatPulse{0%,100%{transform:none}50%{transform:scale(1.06)}}

/* в режиме переписки окну нужен рост, иначе видно полтора сообщения */
.chat-box[data-rezhim="lenta"]{height:min(520px,calc(100vh - 32px))}

/* низкие экраны ноутбуков: окно не должно упираться в край */
@media (max-height:700px){
  .chat-box[data-rezhim="lenta"]{height:min(520px,calc(100vh - 20px))}
  .chat-box{bottom:10px;max-height:calc(100vh - 20px)}
  .chat-body{padding-top:.5rem}
  .chat-lbl{margin-top:.35rem}
}

@media (max-width:575px){
  .chat-fab{right:12px;bottom:74px;width:52px;height:52px;justify-content:center;padding:0;border-radius:50%}
  .chat-fab-txt{display:none}
  .chat-box{right:0;left:0;bottom:0;width:100%;max-height:90vh;border-radius:14px 14px 0 0}
  .chat-box[data-rezhim="lenta"]{height:82vh}
  body.chat-open{overflow:hidden}
}
@media (prefers-reduced-motion:reduce){
  .chat-fab,.chat-box,.chat-shade{transition:none}
}
