:root{
  --accent:#4A6FA5;
  --accent-dark:#31537f;
  --text:#101010;
  --muted:rgba(16,16,16,.66);
  --bg:#E6E6E6;
  --glass:rgba(255,255,255,.58);
  --line:rgba(255,255,255,.76);
  --shadow:0 22px 70px rgba(45,73,114,.15);
  --shadow-soft:0 12px 34px rgba(45,73,114,.10);
  --radius:28px;
  --max:1180px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  min-height:100vh;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at 9% 8%, rgba(170,204,238,.7), transparent 27%),
    radial-gradient(circle at 88% 10%, rgba(255,255,255,.92), transparent 25%),
    radial-gradient(circle at 52% 66%, rgba(74,111,165,.14), transparent 31%),
    linear-gradient(135deg,#f2f5fa 0%,var(--bg) 46%,#edf5ff 100%);
  overflow-x:hidden;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
button,input,textarea,select{font:inherit}
button{border:0}
.page-shell{position:relative;min-height:100vh}
.container{width:min(var(--max),calc(100% - 40px));margin:0 auto}
.liquid-bg{position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none;perspective:1200px}
.liquid-line{
  position:absolute;width:64vw;height:16vw;border:2px solid rgba(255,255,255,.48);
  border-radius:50%;opacity:.45;filter:blur(2px);animation:lineDrift 18s ease-in-out infinite alternate
}
.liquid-line.one{left:-18vw;top:11vh;transform:rotate(-14deg)}
.liquid-line.two{right:-20vw;top:58vh;transform:rotate(18deg);animation-duration:22s}
.liquid-line.three{left:34vw;top:36vh;transform:rotate(-22deg);animation-duration:25s}
.drop{
  position:absolute;border-radius:999px;filter:blur(4px);opacity:.7;
  background:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,.96), rgba(255,255,255,.20) 34%, rgba(74,111,165,.16) 76%),
    linear-gradient(135deg,rgba(255,255,255,.78),rgba(74,111,165,.13));
  box-shadow:inset 8px 10px 28px rgba(255,255,255,.72),inset -12px -16px 32px rgba(74,111,165,.18),0 18px 38px rgba(74,111,165,.12);
  animation:float3d 10s ease-in-out infinite alternate
}
.d1{width:92px;height:42px;top:100px;left:7%;--r:-26deg;animation-delay:.1s}
.d2{width:118px;height:52px;top:170px;right:8%;--r:-33deg;animation-delay:1.3s}
.d3{width:54px;height:54px;top:58%;left:10%;animation-delay:2s}
.d4{width:92px;height:44px;bottom:12%;right:16%;--r:25deg;animation-delay:2.5s}
.d5{width:42px;height:42px;top:34%;left:43%;animation-delay:1.8s}
.d6{width:70px;height:34px;top:72%;left:55%;--r:18deg;animation-delay:3s}
.d7{width:46px;height:46px;top:24%;left:72%;animation-delay:.7s}
.d8{width:140px;height:58px;bottom:4%;left:6%;--r:-18deg;animation-delay:1.1s}
.d9{width:64px;height:30px;top:45%;right:3%;--r:33deg;animation-delay:4s}
.d10{width:38px;height:38px;bottom:25%;left:26%;animation-delay:2.8s}
.d11{width:78px;height:34px;top:7%;left:55%;--r:10deg;animation-delay:3.7s}
.d12{width:56px;height:56px;bottom:35%;right:30%;animation-delay:4.5s}
.glass,.glass-soft{
  position:relative;overflow:hidden;border:1px solid rgba(255,255,255,.75);
  background:linear-gradient(145deg,rgba(255,255,255,.72),rgba(255,255,255,.38));
  backdrop-filter:blur(24px) saturate(150%);
  -webkit-backdrop-filter:blur(24px) saturate(150%);
}
.glass{box-shadow:var(--shadow)}
.glass-soft{box-shadow:var(--shadow-soft)}
.glass:before,.glass-soft:before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(120deg,rgba(255,255,255,.82),transparent 28%,transparent 66%,rgba(255,255,255,.32));
  opacity:.55
}
.glass>*,.glass-soft>*{position:relative;z-index:1}
.site-header{position:sticky;top:10px;z-index:50;margin-top:10px}
.header-inner{
  min-height:68px;display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:10px 12px 10px 20px;border-radius:999px
}
.logo-link{display:flex;align-items:center;min-width:112px}
.logo-link img{width:108px}
.nav{display:flex;align-items:center;justify-content:center;gap:2px;flex:1}
.nav a,.account-btn,.ghost-btn{
  min-height:42px;display:inline-flex;align-items:center;justify-content:center;padding:0 14px;border-radius:999px;
  font-size:14px;color:rgba(16,16,16,.70);white-space:nowrap;transition:.25s ease
}
.nav a:hover,.nav a.active,.account-btn:hover,.ghost-btn:hover{
  color:var(--text);background:rgba(255,255,255,.64);box-shadow:inset 0 0 0 1px rgba(74,111,165,.08)
}
.header-actions{display:flex;align-items:center;gap:10px}
.telegram-btn,.primary-btn,.secondary-btn,.small-btn,.filter-btn{
  display:inline-flex;align-items:center;justify-content:center;border-radius:999px;cursor:pointer;transition:.25s ease
}
.telegram-btn,.primary-btn,.small-btn{
  color:white;background:linear-gradient(135deg,var(--accent),var(--accent-dark));box-shadow:0 12px 28px rgba(74,111,165,.24)
}
.telegram-btn{min-height:44px;padding:0 20px;font-weight:750;font-size:14px}
.primary-btn{min-height:50px;padding:0 24px;font-weight:750}
.small-btn{min-height:40px;padding:0 16px;font-size:14px;font-weight:750}
.secondary-btn,.ghost-btn,.account-btn,.filter-btn{
  background:rgba(255,255,255,.64);border:1px solid rgba(255,255,255,.74);color:var(--text)
}
.secondary-btn{min-height:50px;padding:0 22px}
.account-btn{font-weight:700}
.telegram-btn:hover,.primary-btn:hover,.secondary-btn:hover,.small-btn:hover,.filter-btn:hover{transform:translateY(-2px)}
.burger{display:none;width:44px;height:44px;border-radius:999px;background:rgba(255,255,255,.58);border:1px solid rgba(255,255,255,.76);cursor:pointer}
.burger span{display:block;width:18px;height:2px;background:var(--text);border-radius:99px;margin:5px auto}
main{padding-top:34px}
.hero{padding:44px 0 34px}
.hero-small{padding:36px 0 24px}
.section{padding:36px 0}
.compact{padding-top:18px;padding-bottom:26px}
.hero-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,.78fr);gap:26px;align-items:center}
.hero-center{text-align:center;max-width:900px}
.hero-copy{max-width:720px}
.eyebrow{
  display:inline-flex;align-items:center;margin:0 0 14px;padding:8px 14px;border-radius:999px;
  background:rgba(255,255,255,.62);border:1px solid rgba(255,255,255,.74);color:var(--accent-dark);
  font-size:13px;font-weight:800;box-shadow:0 8px 22px rgba(74,111,165,.10)
}
h1,h2,h3,p{margin-top:0}
h1{margin-bottom:14px;font-size:clamp(34px,4.4vw,58px);line-height:.96;letter-spacing:-.055em;text-transform:uppercase}
h2{margin-bottom:12px;font-size:clamp(27px,3.2vw,40px);line-height:1;letter-spacing:-.045em;text-transform:uppercase}
h3{margin-bottom:8px;font-size:22px;line-height:1.12;letter-spacing:-.03em}
.lead{max-width:680px;margin-bottom:22px;color:var(--muted);font-size:clamp(16px,1.6vw,19px);line-height:1.52}
.hero-center .lead{margin-left:auto;margin-right:auto}
.actions,.center-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}
.center-actions{justify-content:center}
.hero-card,.big-panel,.cta-panel,.card,.mini-card,.product-card,.empty-state,.auth-box{border-radius:var(--radius)}
.hero-card{padding:24px;min-height:330px}
.hero-mini-grid{display:grid;gap:14px}
.mini-card{padding:20px;min-height:0}
.card{padding:22px;min-height:150px;animation:fadeUp .65s ease both;transition:.25s ease}
.card:hover,.product-card:hover,.mini-card:hover{transform:translateY(-4px)}
.card p,.mini-card p,.product-card p,.muted,.form-note,.footer-inner p,.faq-answer,.empty-state p{color:var(--muted);line-height:1.55}
.grid-2,.grid-3,.grid-4,.split-panel,.products-grid,.faq-grid{display:grid;gap:18px}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.split-panel{grid-template-columns:1fr 1fr;align-items:start}
.faq-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
.icon{width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;margin-bottom:16px;border-radius:14px;background:rgba(74,111,165,.12);color:var(--accent-dark);font-weight:800}
.cta-panel{display:grid;grid-template-columns:1fr auto;gap:18px;align-items:center;padding:28px}
.cta-panel p{margin-bottom:0}
.filter-row{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin-top:22px}
.filter-btn{min-height:40px;padding:0 16px;font-weight:750}
.filter-btn.active{color:white;background:linear-gradient(135deg,var(--accent),var(--accent-dark));box-shadow:0 12px 26px rgba(74,111,165,.22)}
.products-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.product-card{padding:18px;min-height:260px;animation:fadeUp .65s ease both;transition:.25s ease}
.product-media{
  min-height:110px;border-radius:22px;margin-bottom:16px;background:
  radial-gradient(circle at 70% 20%,rgba(255,255,255,.92),transparent 26%),
  linear-gradient(135deg,rgba(74,111,165,.16),rgba(255,255,255,.52));
  border:1px solid rgba(255,255,255,.7)
}
.product-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:8px}
.product-brand{font-size:13px;color:var(--accent-dark);font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.product-status{padding:7px 10px;border-radius:999px;background:rgba(255,255,255,.65);font-size:12px;font-weight:800;color:var(--accent-dark)}
.product-title{font-size:23px;margin-bottom:10px}
.product-meta{display:flex;justify-content:space-between;gap:12px;margin:14px 0 16px;color:var(--muted)}
.product-price{font-weight:900;color:var(--text)}
.product-actions{display:flex;gap:10px;flex-wrap:wrap}
.empty-state{padding:34px;text-align:center}
.steps-mini{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}
.steps-mini div{padding:16px;border-radius:20px;background:rgba(255,255,255,.56);border:1px solid rgba(255,255,255,.70);text-align:center}
.steps-mini strong{display:block;font-size:28px;color:var(--accent-dark)}
.steps-mini span{font-weight:750}
.tag-cloud{display:flex;flex-wrap:wrap;gap:10px}
.tag-cloud span{padding:10px 14px;border-radius:999px;background:rgba(255,255,255,.62);border:1px solid rgba(255,255,255,.74);font-weight:750;color:var(--accent-dark)}
.form{display:grid;gap:14px}
.input,.textarea{
  width:100%;border:1px solid rgba(255,255,255,.82);border-radius:16px;background:rgba(255,255,255,.58);
  color:var(--text);outline:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.72),0 8px 20px rgba(74,111,165,.08)
}
.input{min-height:50px;padding:0 16px}
.textarea{min-height:112px;padding:16px;resize:vertical}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.form-grid-4{display:grid;grid-template-columns:1fr 1.3fr .9fr .8fr;gap:14px}
.faq-item{border-radius:24px;animation:fadeUp .65s ease both}
.faq-question{
  width:100%;min-height:68px;padding:20px 22px;background:transparent;color:var(--text);cursor:pointer;
  display:flex;align-items:center;justify-content:space-between;gap:16px;text-align:left;font-weight:800;font-size:18px
}
.faq-question span:last-child{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:var(--accent);color:white;flex:0 0 auto;transition:.32s ease}
.faq-answer-wrap{max-height:0;overflow:hidden;opacity:0;transition:max-height .48s ease,opacity .32s ease}
.faq-answer{padding:0 22px 22px;margin:0}
.faq-item.open .faq-answer-wrap{opacity:1}
.faq-item.open .faq-question span:last-child{transform:rotate(45deg)}
.auth-tabs{display:flex;gap:10px;margin-bottom:14px}
.auth-tab{min-height:42px;padding:0 16px;border-radius:999px;background:rgba(255,255,255,.64);color:var(--text);cursor:pointer;transition:.22s ease}
.auth-tab.active{background:linear-gradient(135deg,var(--accent),var(--accent-dark));color:white;box-shadow:0 12px 22px rgba(74,111,165,.20)}
.auth-form{display:none}
.auth-form.active{display:grid}
.dashboard-head{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:18px}
.admin-products{display:grid;gap:12px;margin-top:20px}
.admin-row{display:grid;grid-template-columns:1fr 1fr .8fr .7fr auto;gap:12px;align-items:center;padding:14px;border-radius:18px;background:rgba(255,255,255,.54);border:1px solid rgba(255,255,255,.70)}
.admin-row strong{display:block}
.admin-row span{color:var(--muted);font-size:14px}
.remove-btn{min-height:38px;padding:0 14px;border-radius:999px;background:rgba(16,16,16,.08);cursor:pointer;font-weight:750;transition:.22s ease}
.remove-btn:hover{background:rgba(16,16,16,.14);transform:translateY(-2px)}
.contact-handle{font-size:28px;font-weight:900;letter-spacing:-.04em}
.section-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;margin-bottom:18px}
.section-head p{max-width:520px;margin-bottom:0;color:var(--muted);line-height:1.55}
.site-footer{margin:50px 0 24px}
.footer-inner{display:grid;grid-template-columns:1.2fr .8fr .8fr 1fr;gap:22px;padding:28px;border-radius:30px}
.footer-brand img{width:110px;margin-bottom:14px}
.footer-inner h4{margin:0 0 12px;font-size:14px;text-transform:uppercase;letter-spacing:.08em}
.footer-inner ul{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.footer-inner a,.footer-inner li{color:rgba(16,16,16,.66);font-size:14px}
.footer-inner a:hover{color:var(--accent-dark)}
.footer-bottom{display:flex;justify-content:space-between;gap:14px;margin-top:14px;color:rgba(16,16,16,.48);font-size:13px}
.reveal{animation:fadeUp .72s ease both}
@keyframes fadeUp{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}
@keyframes float3d{
  0%{transform:translate3d(0,0,0) rotate(var(--r,0deg)) scale(1)}
  50%{transform:translate3d(13px,-14px,18px) rotate(calc(var(--r,0deg) + 4deg)) scale(1.05)}
  100%{transform:translate3d(-8px,10px,-12px) rotate(calc(var(--r,0deg) - 4deg)) scale(.98)}
}
@keyframes lineDrift{from{transform:translate3d(0,0,0) rotate(-14deg)}to{transform:translate3d(20px,-12px,0) rotate(-19deg)}}
@media (max-width:1100px){
  .nav{position:fixed;left:18px;right:18px;top:86px;display:none;flex-direction:column;align-items:stretch;padding:16px;border-radius:28px;background:rgba(255,255,255,.84);backdrop-filter:blur(26px);box-shadow:var(--shadow)}
  .nav.open{display:flex}
  .nav a{justify-content:flex-start;padding-left:18px}
  .burger{display:block}
  .header-actions .telegram-btn{display:none}
}
@media (max-width:920px){
  .container{width:min(100% - 28px,var(--max))}
  .hero-grid,.grid-2,.grid-3,.grid-4,.split-panel,.products-grid,.faq-grid,.footer-inner,.cta-panel,.form-grid,.form-grid-4,.admin-row{grid-template-columns:1fr}
  .hero-card{min-height:0}
  .section-head,.dashboard-head{display:block}
  .cta-panel{align-items:start}
  .footer-bottom{flex-direction:column}
}
@media (max-width:580px){
  .site-header{top:8px;margin-top:8px}
  .header-inner{min-height:62px;padding:9px 10px 9px 14px}
  .logo-link{min-width:auto}
  .logo-link img{width:92px}
  main{padding-top:24px}
  h1{font-size:clamp(32px,11vw,44px)}
  h2{font-size:clamp(25px,8.5vw,34px)}
  .hero{padding-top:26px}
  .actions,.product-actions{display:grid}
  .primary-btn,.secondary-btn,.small-btn{width:100%}
  .card,.mini-card,.big-panel,.hero-card,.cta-panel,.product-card,.empty-state{border-radius:22px}
  .steps-mini{grid-template-columns:1fr 1fr}
}

/* v4 polish */
:root{
  --space:24px;
  --space-lg:32px;
  --radius:26px;
  --radius-sm:18px;
  --card-min:168px;
  --glass-bg:linear-gradient(145deg,rgba(255,255,255,.75),rgba(255,255,255,.42));
}
body, body *{transition:background-color .35s ease,color .35s ease,border-color .35s ease,box-shadow .35s ease,filter .35s ease}
body[data-theme="dark"]{
  --text:#E6E6E6;
  --muted:rgba(230,230,230,.66);
  --bg:#101010;
  --glass-bg:linear-gradient(145deg,rgba(28,28,28,.76),rgba(16,16,16,.46));
  background:
    radial-gradient(circle at 9% 8%,rgba(74,111,165,.42),transparent 27%),
    radial-gradient(circle at 88% 10%,rgba(230,230,230,.12),transparent 25%),
    radial-gradient(circle at 52% 66%,rgba(74,111,165,.18),transparent 31%),
    linear-gradient(135deg,#101010 0%,#181818 48%,#101010 100%);
}
body[data-theme="dark"] .logo-link img,
body[data-theme="dark"] .footer-brand img{filter:invert(1) brightness(1.06)}
body[data-theme="dark"] .glass,
body[data-theme="dark"] .glass-soft{background:var(--glass-bg);border-color:rgba(230,230,230,.18)}
body[data-theme="dark"] .glass:before,
body[data-theme="dark"] .glass-soft:before{opacity:.18}
body[data-theme="dark"] .nav a,
body[data-theme="dark"] .account-btn,
body[data-theme="dark"] .ghost-btn{color:rgba(230,230,230,.78)}
body[data-theme="dark"] .nav a:hover,
body[data-theme="dark"] .nav a.active,
body[data-theme="dark"] .account-btn:hover,
body[data-theme="dark"] .ghost-btn:hover{background:rgba(230,230,230,.10);color:var(--text)}
body[data-theme="dark"] .input,
body[data-theme="dark"] .textarea{background:rgba(230,230,230,.08);border-color:rgba(230,230,230,.16);color:var(--text)}
body[data-theme="dark"] .input::placeholder,
body[data-theme="dark"] .textarea::placeholder{color:rgba(230,230,230,.48)}
body[data-theme="dark"] .secondary-btn,
body[data-theme="dark"] .ghost-btn,
body[data-theme="dark"] .account-btn,
body[data-theme="dark"] .filter-btn,
body[data-theme="dark"] .theme-toggle{background:rgba(230,230,230,.08);border-color:rgba(230,230,230,.16);color:var(--text)}
body[data-theme="dark"] .product-media{background:linear-gradient(135deg,rgba(74,111,165,.22),rgba(230,230,230,.06));border-color:rgba(230,230,230,.14)}
body[data-theme="dark"] .footer-inner a,
body[data-theme="dark"] .footer-inner li{color:rgba(230,230,230,.68)}
body[data-theme="dark"] .drop{opacity:.52;filter:blur(7px)}
body[data-theme="dark"] .liquid-line{opacity:.22}

.theme-toggle{
  width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;
  background:rgba(255,255,255,.64);border:1px solid rgba(255,255,255,.74);color:var(--text);cursor:pointer;font-size:18px;line-height:1;
}
.theme-toggle:hover{transform:translateY(-2px);box-shadow:var(--shadow-soft)}

/* more blurred floating figures */
.d13{width:104px;height:48px;top:82%;right:6%;--r:-10deg;animation-delay:2.2s}
.d14{width:58px;height:58px;top:15%;left:24%;animation-delay:3.1s}
.d15{width:126px;height:54px;top:49%;left:-2%;--r:24deg;animation-delay:1.4s}
.d16{width:72px;height:72px;bottom:18%;right:4%;animation-delay:4.8s}
.d17{width:84px;height:38px;top:32%;right:20%;--r:-20deg;animation-delay:3.9s}
.d18{width:52px;height:52px;bottom:8%;left:42%;animation-delay:5.2s}
.drop{filter:blur(6px);opacity:.62}

.glass,.glass-soft,.hero-card,.big-panel,.cta-panel,.card,.mini-card,.product-card,.empty-state,.auth-box{border-radius:var(--radius)}
.card,.mini-card,.big-panel,.hero-card,.cta-panel,.product-card,.empty-state,.auth-box,.footer-inner{padding:var(--space-lg)}
.footer-inner{border-radius:var(--radius)}
.card,.mini-card,.big-panel,.hero-card,.cta-panel,.product-card,.empty-state,.footer-inner,.faq-item,.contact-block{cursor:default;user-select:none}
.card *, .mini-card *, .big-panel *, .hero-card *, .cta-panel *, .product-card *, .empty-state *, .footer-inner *, .contact-block *{cursor:default}
a,button,.theme-toggle,.faq-question,.auth-tab,.filter-btn,.remove-btn,[data-add-cart],[data-heart],[data-cabinet-tab]{cursor:pointer!important;user-select:none}
input,textarea,select{cursor:text!important;user-select:text!important}
select{cursor:pointer!important}

.auth-box{padding:30px!important;overflow:hidden;min-height:auto;align-self:center}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:6px;margin:0 0 16px;border-radius:999px;background:rgba(255,255,255,.34);border:1px solid rgba(255,255,255,.5)}
.auth-tab{width:100%;min-height:44px;border-radius:999px;font-weight:750}
.auth-form{gap:14px}
.full-btn{width:100%}
.form-note{margin:2px 0 0;font-size:15px}
.cabinet-login-grid{align-items:center}
.cabinet-dashboard[hidden], [data-guest-only][hidden], [data-admin-panel][hidden]{display:none!important}
.cabinet-nav{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 22px;padding:12px;border-radius:999px}
.cabinet-nav-btn{min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 18px;border-radius:999px;background:rgba(255,255,255,.62);font-weight:800;color:var(--text)}
.cabinet-nav-btn.admin{color:#fff;background:linear-gradient(135deg,var(--accent),var(--accent-dark));box-shadow:0 12px 28px rgba(74,111,165,.22)}
.cabinet-cards .card{min-height:190px}

.products-grid{align-items:stretch}
.product-card{min-height:370px;display:flex;flex-direction:column;padding:22px!important}
.product-media{min-height:116px;border-radius:22px;margin-bottom:18px;flex:0 0 auto}
.product-title{font-size:24px;line-height:1.05;margin-bottom:14px;text-transform:uppercase}
.product-meta{display:block;margin:4px 0 22px;color:var(--muted)}
.product-price{display:block;font-size:clamp(30px,3.1vw,42px);line-height:1;font-weight:950;color:var(--text);letter-spacing:-.055em;margin-bottom:12px}
.product-stock{display:block;font-size:16px;color:var(--muted)}
.product-actions{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:nowrap}
.cart-btn{min-height:48px;padding:0 18px;display:inline-flex;align-items:center;gap:9px;border-radius:999px;background:linear-gradient(135deg,var(--accent),var(--accent-dark));color:#fff;font-weight:800;box-shadow:0 12px 28px rgba(74,111,165,.22)}
.cart-btn svg{width:18px;height:18px;display:block;stroke:currentColor;stroke-width:2;fill:none}
.heart-btn{width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:rgba(255,255,255,.66);border:1px solid rgba(255,255,255,.76);color:var(--accent-dark);font-size:21px;font-weight:900}
.heart-btn.active{background:var(--accent);color:#fff}
.product-status{white-space:nowrap}
.product-brand{max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.contacts-panel{align-items:stretch}
.contact-block{padding:var(--space-lg)!important;min-height:250px;display:flex;flex-direction:column;justify-content:center}
.contact-block .form{width:100%}
.contact-handle{margin:6px 0 20px}

/* page transitions and hover polish */
.reveal,.card,.product-card,.faq-item,.big-panel,.cta-panel{animation:fadeUp .68s ease both}
.nav a,.account-btn,.telegram-btn,.theme-toggle,.primary-btn,.secondary-btn,.small-btn,.cart-btn,.heart-btn,.cabinet-nav-btn{transition:transform .25s ease,box-shadow .25s ease,background .35s ease,color .35s ease,border-color .35s ease}
.cabinet-nav-btn:hover,.cart-btn:hover,.heart-btn:hover{transform:translateY(-2px);box-shadow:var(--shadow-soft)}

@media (max-width:920px){
  .card,.mini-card,.big-panel,.hero-card,.cta-panel,.product-card,.empty-state,.auth-box,.footer-inner{padding:24px!important}
  .cabinet-nav{border-radius:24px;display:grid;grid-template-columns:1fr 1fr}
  .product-card{min-height:330px}
}
@media (max-width:580px){
  .theme-toggle{width:42px;height:42px}
  .header-actions{gap:6px}
  .account-btn{padding:0 12px}
  .card,.mini-card,.big-panel,.hero-card,.cta-panel,.product-card,.empty-state,.auth-box,.footer-inner{padding:20px!important;border-radius:22px}
  .cabinet-nav{grid-template-columns:1fr;border-radius:22px}
  .product-actions{display:flex!important}
  .cart-btn{font-size:14px;padding:0 14px}
  .heart-btn{width:46px;height:46px}
}


/* v5 dark theme fix: no white flash + dark pills/buttons */
html { background:#E6E6E6; }
html[data-theme="dark"] { background:#101010; color-scheme:dark; }
html[data-theme="dark"] body {
  --text:#E6E6E6;
  --muted:rgba(230,230,230,.68);
  --bg:#101010;
  --glass-bg:linear-gradient(145deg,rgba(28,28,28,.78),rgba(16,16,16,.54));
  color:#E6E6E6;
  background:
    radial-gradient(circle at 9% 8%,rgba(74,111,165,.42),transparent 27%),
    radial-gradient(circle at 88% 10%,rgba(230,230,230,.12),transparent 25%),
    radial-gradient(circle at 52% 66%,rgba(74,111,165,.18),transparent 31%),
    linear-gradient(135deg,#101010 0%,#181818 48%,#101010 100%);
}

/* keep old body selector too, but html selector wins before JS touches body */
html[data-theme="dark"] .logo-link img,
html[data-theme="dark"] .footer-brand img,
body[data-theme="dark"] .logo-link img,
body[data-theme="dark"] .footer-brand img{filter:invert(1) brightness(1.06)}

html[data-theme="dark"] .glass,
html[data-theme="dark"] .glass-soft,
body[data-theme="dark"] .glass,
body[data-theme="dark"] .glass-soft{background:var(--glass-bg);border-color:rgba(230,230,230,.18)}

html[data-theme="dark"] .glass:before,
html[data-theme="dark"] .glass-soft:before,
body[data-theme="dark"] .glass:before,
body[data-theme="dark"] .glass-soft:before{opacity:.18}

html[data-theme="dark"] .drop{opacity:.52;filter:blur(7px)}
html[data-theme="dark"] .liquid-line{opacity:.22}

/* all dark-theme pills and secondary controls */
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .nav a.active,
html[data-theme="dark"] .nav a:hover,
html[data-theme="dark"] .account-btn,
html[data-theme="dark"] .ghost-btn,
html[data-theme="dark"] .secondary-btn,
html[data-theme="dark"] .filter-btn,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .auth-tab,
html[data-theme="dark"] .cabinet-nav-btn,
html[data-theme="dark"] .product-status,
html[data-theme="dark"] .tag-cloud span,
html[data-theme="dark"] .steps-mini div,
html[data-theme="dark"] .heart-btn,
html[data-theme="dark"] .remove-btn,
html[data-theme="dark"] .admin-row,
html[data-theme="dark"] .badge,
body[data-theme="dark"] .eyebrow,
body[data-theme="dark"] .nav a.active,
body[data-theme="dark"] .nav a:hover,
body[data-theme="dark"] .account-btn,
body[data-theme="dark"] .ghost-btn,
body[data-theme="dark"] .secondary-btn,
body[data-theme="dark"] .filter-btn,
body[data-theme="dark"] .theme-toggle,
body[data-theme="dark"] .auth-tab,
body[data-theme="dark"] .cabinet-nav-btn,
body[data-theme="dark"] .product-status,
body[data-theme="dark"] .tag-cloud span,
body[data-theme="dark"] .steps-mini div,
body[data-theme="dark"] .heart-btn,
body[data-theme="dark"] .remove-btn,
body[data-theme="dark"] .admin-row,
body[data-theme="dark"] .badge{
  background:linear-gradient(145deg,rgba(47,47,47,.92),rgba(28,28,28,.82))!important;
  border-color:rgba(230,230,230,.18)!important;
  color:#E6E6E6!important;
}

html[data-theme="dark"] .telegram-btn,
html[data-theme="dark"] .primary-btn,
html[data-theme="dark"] .small-btn,
html[data-theme="dark"] .cart-btn,
html[data-theme="dark"] .filter-btn.active,
html[data-theme="dark"] .auth-tab.active,
html[data-theme="dark"] .cabinet-nav-btn.admin,
html[data-theme="dark"] .heart-btn.active,
body[data-theme="dark"] .telegram-btn,
body[data-theme="dark"] .primary-btn,
body[data-theme="dark"] .small-btn,
body[data-theme="dark"] .cart-btn,
body[data-theme="dark"] .filter-btn.active,
body[data-theme="dark"] .auth-tab.active,
body[data-theme="dark"] .cabinet-nav-btn.admin,
body[data-theme="dark"] .heart-btn.active{
  background:linear-gradient(145deg,#2f2f2f,#151515)!important;
  border:1px solid rgba(230,230,230,.18)!important;
  color:#fff!important;
  box-shadow:0 14px 30px rgba(0,0,0,.24)!important;
}

html[data-theme="dark"] .nav a,
body[data-theme="dark"] .nav a{color:rgba(230,230,230,.72)!important}

html[data-theme="dark"] .input,
html[data-theme="dark"] .textarea,
html[data-theme="dark"] select.input,
body[data-theme="dark"] .input,
body[data-theme="dark"] .textarea,
body[data-theme="dark"] select.input{
  background:rgba(28,28,28,.84)!important;
  border-color:rgba(230,230,230,.18)!important;
  color:#E6E6E6!important;
}
html[data-theme="dark"] .input::placeholder,
html[data-theme="dark"] .textarea::placeholder{color:rgba(230,230,230,.5)!important}

html[data-theme="dark"] .admin-row span,
body[data-theme="dark"] .admin-row span{color:rgba(230,230,230,.64)!important}

/* footer button must not inherit muted footer link color */
.footer-inner .small-btn,
.footer-inner .primary-btn,
.footer-inner .telegram-btn,
.footer-inner .cart-btn{color:#fff!important}
html[data-theme="dark"] .footer-inner .small-btn,
html[data-theme="dark"] .footer-inner .primary-btn,
body[data-theme="dark"] .footer-inner .small-btn,
body[data-theme="dark"] .footer-inner .primary-btn{color:#fff!important}

/* smoother hover on informational cards */
.card,.mini-card,.product-card,.hero-mini-grid .mini-card{
  transition:transform .38s cubic-bezier(.2,.8,.2,1), box-shadow .38s cubic-bezier(.2,.8,.2,1), background .35s ease, border-color .35s ease, color .35s ease;
  will-change:transform;
}
.card:hover,.product-card:hover,.mini-card:hover{
  transform:translateY(-5px) scale(1.008);
  box-shadow:0 24px 72px rgba(45,73,114,.16);
}
html[data-theme="dark"] .card:hover,
html[data-theme="dark"] .product-card:hover,
html[data-theme="dark"] .mini-card:hover,
body[data-theme="dark"] .card:hover,
body[data-theme="dark"] .product-card:hover,
body[data-theme="dark"] .mini-card:hover{
  box-shadow:0 24px 72px rgba(0,0,0,.26);
}

/* make labels in dark theme readable, not blue */
html[data-theme="dark"] .product-brand,
html[data-theme="dark"] .steps-mini strong,
html[data-theme="dark"] .contact-handle,
body[data-theme="dark"] .product-brand,
body[data-theme="dark"] .steps-mini strong,
body[data-theme="dark"] .contact-handle{color:#E6E6E6!important}


/* v6: photos, gallery, cart stepper, validation, request form */
.file-drop{
  display:grid;
  gap:6px;
  padding:20px;
  border-radius:var(--radius);
  border:1px dashed rgba(74,111,165,.34);
  background:rgba(255,255,255,.48);
  cursor:pointer!important;
}
.file-drop *{cursor:pointer!important}
.file-drop-title{font-weight:900;color:var(--text)}
.file-drop-text{color:var(--muted);line-height:1.45}
.file-input{position:absolute;inline-size:1px;block-size:1px;opacity:0;pointer-events:none}
.photo-preview{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:12px;
  border-radius:calc(var(--radius) - 8px);
  background:rgba(255,255,255,.38);
  border:1px solid rgba(255,255,255,.58);
}
.photo-preview span,.photo-preview strong{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(255,255,255,.62);
  color:var(--text);
  font-size:13px;
  font-weight:800;
}
.form-error{
  padding:12px 14px;
  border-radius:18px;
  background:rgba(255,92,92,.12);
  border:1px solid rgba(255,92,92,.24);
  color:#b23434;
  font-weight:800;
  line-height:1.45;
}
.site-select{
  appearance:none;
  -webkit-appearance:none;
  background-image:linear-gradient(45deg,transparent 50%,var(--accent) 50%),linear-gradient(135deg,var(--accent) 50%,transparent 50%);
  background-position:calc(100% - 22px) 21px,calc(100% - 16px) 21px;
  background-size:6px 6px,6px 6px;
  background-repeat:no-repeat;
  cursor:pointer!important;
}
.dynamic-contact{
  display:grid;
  gap:8px;
  overflow:hidden;
  max-height:120px;
  opacity:1;
  transform:translateY(0);
  transition:max-height .36s ease,opacity .28s ease,transform .28s ease;
}
.dynamic-contact[hidden]{
  display:grid!important;
  max-height:0;
  opacity:0;
  transform:translateY(-8px);
  pointer-events:none;
}
.product-media{
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}
.product-media img{
  width:100%;
  height:100%;
  min-height:116px;
  object-fit:cover;
  border-radius:inherit;
  user-select:none;
  pointer-events:none;
}
.product-media-empty span{
  width:58px;
  height:58px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:rgba(74,111,165,.12);
  color:var(--accent-dark);
  font-weight:950;
  font-size:24px;
  text-transform:uppercase;
}
.gallery-arrow{
  position:absolute;
  top:0;
  bottom:0;
  width:34%;
  z-index:3;
  background:transparent;
  color:#fff;
  font-size:0;
  cursor:pointer!important;
  opacity:0;
  transition:opacity .25s ease,background .25s ease;
}
.gallery-arrow.left{left:0}
.gallery-arrow.right{right:0}
.gallery-arrow:after{
  content:attr(aria-label);
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:34px;
  height:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:rgba(16,16,16,.42);
  backdrop-filter:blur(12px);
  font-size:0;
}
.gallery-arrow.left:after{content:'‹';left:12px;font-size:26px}
.gallery-arrow.right:after{content:'›';right:12px;font-size:26px}
.has-images:hover .gallery-arrow{opacity:1;background:linear-gradient(90deg,rgba(0,0,0,.22),transparent)}
.has-images:hover .gallery-arrow.right{background:linear-gradient(-90deg,rgba(0,0,0,.22),transparent)}
.gallery-hint{
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(90deg,rgba(255,255,255,.14),transparent 22%,transparent 78%,rgba(255,255,255,.14));
  opacity:.55;
}
.gallery-dots{
  position:absolute;
  left:50%;
  bottom:10px;
  transform:translateX(-50%);
  display:flex;
  gap:7px;
  z-index:4;
  padding:6px 8px;
  border-radius:999px;
  background:rgba(16,16,16,.24);
  backdrop-filter:blur(12px);
}
.gallery-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  padding:0;
  background:rgba(205,205,205,.82);
  cursor:pointer!important;
  transition:transform .22s ease,background .22s ease,width .22s ease;
}
.gallery-dot.active{background:#fff;width:18px;border-radius:999px}
.cart-btn,.cart-btn *, .heart-btn, .heart-btn *, .cart-stepper, .cart-stepper *{cursor:pointer!important;user-select:none!important}
.cart-btn{position:relative;z-index:3;pointer-events:auto!important}
.cart-btn span{pointer-events:none}
.cart-stepper{
  min-height:48px;
  display:inline-flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 10px;
  min-width:148px;
  border-radius:999px;
  background:linear-gradient(135deg,var(--accent),var(--accent-dark));
  color:#fff;
  box-shadow:0 12px 28px rgba(74,111,165,.22);
}
.cart-stepper button{
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:rgba(255,255,255,.18);
  color:#fff;
  font-weight:950;
  font-size:20px;
}
.cart-stepper span{min-width:22px;text-align:center;font-weight:950;font-size:16px}
.admin-row{grid-template-columns:1fr 1fr .8fr .7fr .6fr auto}
html[data-theme="dark"] .file-drop,
body[data-theme="dark"] .file-drop,
html[data-theme="dark"] .photo-preview,
body[data-theme="dark"] .photo-preview{
  background:linear-gradient(145deg,rgba(47,47,47,.92),rgba(28,28,28,.82))!important;
  border-color:rgba(230,230,230,.18)!important;
  color:#fff!important;
}
html[data-theme="dark"] .photo-preview span,
html[data-theme="dark"] .photo-preview strong,
body[data-theme="dark"] .photo-preview span,
body[data-theme="dark"] .photo-preview strong{
  background:rgba(230,230,230,.10)!important;
  color:#fff!important;
}
html[data-theme="dark"] .form-error,
body[data-theme="dark"] .form-error{color:#ffb8b8;background:rgba(255,92,92,.12);border-color:rgba(255,92,92,.28)}
html[data-theme="dark"] .site-select,
body[data-theme="dark"] .site-select{background-color:rgba(28,28,28,.84)!important}
html[data-theme="dark"] .cart-stepper,
body[data-theme="dark"] .cart-stepper{
  background:linear-gradient(145deg,#2f2f2f,#151515)!important;
  border:1px solid rgba(230,230,230,.18)!important;
  color:#fff!important;
}
@media (max-width:920px){.admin-row{grid-template-columns:1fr}.product-media img{min-height:104px}}


/* v7 fixes */
.account-btn{
  max-width:150px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  flex:0 1 auto;
}
.telegram-btn{gap:8px;white-space:nowrap;flex:0 0 auto}
.tg-icon{font-size:16px;line-height:1}

/* square product images */
.product-media{
  width:100%;
  aspect-ratio:1 / 1;
  min-height:0!important;
  height:auto!important;
  max-height:none;
  border-radius:22px;
}
.product-media img{
  width:100%;
  height:100%!important;
  min-height:0!important;
  object-fit:cover;
  object-position:center;
}
.product-media-empty{aspect-ratio:1 / 1;min-height:0!important}

/* photo preview with accumulated images */
.photo-preview .photo-chip{
  gap:8px;
  padding:6px 8px 6px 6px;
}
.photo-chip img{
  width:34px;
  height:34px;
  border-radius:10px;
  object-fit:cover;
}
.photo-chip button{
  width:24px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:rgba(16,16,16,.14);
  color:inherit;
  cursor:pointer!important;
  font-weight:900;
}

.cart-primary-zone{display:flex;align-items:center;min-width:0}
.product-actions{align-items:flex-end!important}

/* remove animation replay on quantity updates */
.cart-primary-zone .cart-btn,
.cart-primary-zone .cart-stepper{
  animation:none!important;
}

/* dark theme footer help button keeps same primary style */
.footer-inner .small-btn{background:linear-gradient(135deg,var(--accent),var(--accent-dark));color:#fff!important}
html[data-theme="dark"] .footer-inner .small-btn,
body[data-theme="dark"] .footer-inner .small-btn{background:linear-gradient(145deg,#2f2f2f,#151515)!important;color:#fff!important}

@media (max-width:1100px){
  .account-btn{max-width:120px}
}
@media (max-width:580px){
  .account-btn{max-width:84px}
  .telegram-btn span:last-child{display:none}
}

/* v8 emergency fixes: working contrast and catalog scale */
.footer-inner h4,
.footer-inner p,
.footer-inner li,
.footer-inner a,
.footer-bottom{
  color:rgba(16,16,16,.72)!important;
}
html[data-theme="dark"] .footer-inner h4,
html[data-theme="dark"] .footer-inner p,
html[data-theme="dark"] .footer-inner li,
html[data-theme="dark"] .footer-inner a,
html[data-theme="dark"] .footer-bottom,
body[data-theme="dark"] .footer-inner h4,
body[data-theme="dark"] .footer-inner p,
body[data-theme="dark"] .footer-inner li,
body[data-theme="dark"] .footer-inner a,
body[data-theme="dark"] .footer-bottom{
  color:rgba(230,230,230,.82)!important;
}
html[data-theme="dark"] .footer-inner h4,
body[data-theme="dark"] .footer-inner h4{
  color:#fff!important;
}
.footer-inner .small-btn,
.footer-inner .small-btn:hover,
html[data-theme="dark"] .footer-inner .small-btn,
body[data-theme="dark"] .footer-inner .small-btn{
  color:#fff!important;
  background:linear-gradient(135deg,var(--accent),var(--accent-dark))!important;
  border-color:transparent!important;
}
html[data-theme="dark"] .footer-inner .small-btn,
body[data-theme="dark"] .footer-inner .small-btn{
  background:linear-gradient(145deg,#3a3a3a,#202020)!important;
  border:1px solid rgba(230,230,230,.22)!important;
}

/* keep every control visually clickable after the JS hotfix */
button,
a,
.cart-btn,
.cart-stepper button,
.heart-btn,
.filter-btn,
.theme-toggle,
.account-btn,
.telegram-btn,
.auth-tab,
.remove-btn,
.gallery-arrow,
.gallery-dot{
  pointer-events:auto!important;
  cursor:pointer!important;
}

/* catalog should match the visual scale of other pages */
.hero-small{
  padding-top:44px!important;
  padding-bottom:34px!important;
}
.hero-small h1{
  font-size:clamp(42px,5.4vw,74px)!important;
}
.hero-small .lead{
  font-size:clamp(17px,1.8vw,21px)!important;
}
.filter-row{gap:12px!important;margin-top:26px!important}
.filter-btn{
  min-height:46px!important;
  padding:0 20px!important;
  font-size:15px!important;
}
.products-grid{
  gap:24px!important;
}
.product-card{
  min-height:420px!important;
  padding:26px!important;
}
.product-media{
  border-radius:24px!important;
  margin-bottom:22px!important;
}
.product-media-empty span{
  width:72px!important;
  height:72px!important;
  font-size:30px!important;
}
.product-brand{
  font-size:14px!important;
}
.product-status{
  font-size:13px!important;
  padding:8px 12px!important;
}
.product-title{
  font-size:28px!important;
  line-height:1.04!important;
}
.product-stock{
  font-size:17px!important;
}
.cart-btn{
  min-height:50px!important;
  padding:0 18px!important;
  gap:9px!important;
}
.cart-btn svg{
  width:18px!important;
  height:18px!important;
}
.heart-btn{
  width:50px!important;
  height:50px!important;
  flex:0 0 50px!important;
}
.cart-stepper{
  min-height:50px!important;
  min-width:160px!important;
}
@media (max-width:920px){
  .hero-small h1{font-size:clamp(38px,10vw,56px)!important}
  .product-card{min-height:360px!important;padding:22px!important}
}


/* v9 fixes */
html, body { border-top: 0 !important; }
body::before { display: none !important; }
.site-header { top: 0 !important; margin-top: 0 !important; padding-top: 8px; }
.cabinet-login-grid { align-items: start !important; }
.cabinet-login-copy { padding-top: 30px; min-height: 420px; }
.auth-box { min-height: 430px !important; align-self: start !important; }
.auth-form { min-height: 180px; }
.form-error { padding: 12px 14px; border-radius: 16px; background: rgba(255, 92, 92, .12); border: 1px solid rgba(255, 92, 92, .22); color: #b30000; font-weight: 750; }
.size-select-wrap { display: grid; gap: 8px; margin: 10px 0 18px; }
.size-select-wrap span { color: var(--muted); font-weight: 800; font-size: 14px; }
.product-size-select { min-height: 44px !important; cursor: pointer !important; }
.product-price { font-size: 34px !important; line-height: 1 !important; }
.cart-btn.is-disabled { opacity: .55; cursor: not-allowed !important; }
.cart-stepper button:disabled { opacity: .35; cursor: not-allowed !important; }
.form-grid-4 { grid-template-columns: 1fr 1.2fr .85fr .75fr !important; }
.admin-row { grid-template-columns: 1fr 1fr .75fr .65fr 1fr .55fr auto !important; }
.cart-layout { min-height: 360px; }
.cart-market-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.cart-lines { display: grid; gap: 14px; }
.cart-line { display: grid; grid-template-columns: 110px 1fr auto; gap: 18px; align-items: center; padding: 16px; border-radius: var(--radius-sm); }
.cart-line-img { width: 110px; aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.48); font-size: 32px; font-weight: 900; color: var(--accent-dark); }
.cart-line-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-info { display: grid; gap: 7px; }
.cart-line-info strong { font-size: 22px; line-height: 1.1; }
.cart-line-info span { color: var(--muted); }
.cart-line-info b { font-size: 22px; }
.cart-line-actions { display: grid; justify-items: end; gap: 10px; }
.cart-summary { position: sticky; top: 108px; padding: 28px; border-radius: var(--radius); }
.cart-summary p { color: var(--muted); line-height: 1.55; }
.cart-total { display: flex; justify-content: space-between; gap: 16px; margin: 22px 0; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.18); border-bottom: 1px solid rgba(255,255,255,.18); }
.cart-total span { color: var(--muted); }
.cart-total strong { font-size: 24px; }
.cart-empty { max-width: 720px; margin: 0 auto; text-align: center; }
html[data-theme="dark"] .form-error, body[data-theme="dark"] .form-error { color: #ffcdcd !important; background: rgba(255,92,92,.12) !important; border-color: rgba(255,92,92,.28) !important; }
html[data-theme="dark"] .cart-line-img, body[data-theme="dark"] .cart-line-img { background: rgba(230,230,230,.08); color: #fff; }
html[data-theme="dark"] .site-select, html[data-theme="dark"] .product-size-select, body[data-theme="dark"] .site-select, body[data-theme="dark"] .product-size-select { background: linear-gradient(145deg,#2f2f2f,#151515) !important; color: #fff !important; border-color: rgba(230,230,230,.26) !important; }
html[data-theme="dark"] .site-select option, body[data-theme="dark"] .site-select option { background: #151515; color: #fff; }
@media (max-width: 920px) {
  .cabinet-login-copy { min-height: auto; padding-top: 0; }
  .auth-box { min-height: auto !important; }
  .form-grid-4, .admin-row, .cart-market-layout, .cart-line { grid-template-columns: 1fr !important; }
  .cart-line-actions { justify-items: stretch; }
  .cart-summary { position: static; }
}


/* v10 fixes */
.size-select-wrap{
  position:relative;
  display:grid;
  gap:9px;
  margin:12px 0 18px;
  overflow:visible!important;
  z-index:8;
}
.product-card:has(.custom-size-select.open){z-index:40;overflow:visible!important}
.custom-size-select{position:relative;z-index:10;overflow:visible!important}
.custom-size-button{
  width:100%;
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:0 15px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.34);
  background:linear-gradient(145deg,rgba(255,255,255,.72),rgba(255,255,255,.44));
  color:var(--text);
  font-weight:850;
  cursor:pointer!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7),0 12px 24px rgba(45,73,114,.08);
  transition:transform .24s ease,background .28s ease,border-color .28s ease,box-shadow .28s ease;
}
.custom-size-button:hover{transform:translateY(-1px);box-shadow:inset 0 1px 0 rgba(255,255,255,.7),0 16px 30px rgba(45,73,114,.14)}
.custom-size-button i{font-style:normal;transition:transform .28s ease;opacity:.82}
.custom-size-select.open .custom-size-button i{transform:rotate(180deg)}
.custom-size-menu{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 8px);
  display:grid;
  gap:6px;
  max-height:190px;
  overflow:auto;
  padding:8px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.34);
  background:linear-gradient(145deg,rgba(255,255,255,.92),rgba(235,241,248,.86));
  box-shadow:0 22px 50px rgba(0,0,0,.18);
  backdrop-filter:blur(22px) saturate(150%);
  -webkit-backdrop-filter:blur(22px) saturate(150%);
  opacity:0;
  transform:translateY(-8px) scale(.98);
  pointer-events:none;
  transition:opacity .24s ease,transform .24s ease;
  z-index:80;
}
.custom-size-select.open .custom-size-menu{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}
.custom-size-option{
  min-height:38px;
  display:flex;
  align-items:center;
  padding:0 12px;
  border-radius:12px;
  color:var(--text);
  background:transparent;
  font-weight:850;
  cursor:pointer!important;
  transition:background .2s ease,color .2s ease,transform .2s ease;
}
.custom-size-option:hover,.custom-size-option.active{background:linear-gradient(135deg,var(--accent),var(--accent-dark));color:#fff;transform:translateX(2px)}
html[data-theme="dark"] .custom-size-button,body[data-theme="dark"] .custom-size-button{
  background:linear-gradient(145deg,#2f2f2f,#151515)!important;
  color:#fff!important;
  border-color:rgba(230,230,230,.28)!important;
}
html[data-theme="dark"] .custom-size-menu,body[data-theme="dark"] .custom-size-menu{
  background:linear-gradient(145deg,rgba(42,42,42,.96),rgba(18,18,18,.94))!important;
  border-color:rgba(230,230,230,.22)!important;
}
html[data-theme="dark"] .custom-size-option,body[data-theme="dark"] .custom-size-option{color:#fff!important}
html[data-theme="dark"] .custom-size-option:hover,html[data-theme="dark"] .custom-size-option.active,body[data-theme="dark"] .custom-size-option:hover,body[data-theme="dark"] .custom-size-option.active{background:linear-gradient(145deg,#3a3a3a,#222)!important;color:#fff!important}

@media (max-width:1100px){
  .nav.open{display:flex!important;z-index:9999!important}
  .nav{z-index:9999!important}
  html[data-theme="dark"] .nav,body[data-theme="dark"] .nav{background:rgba(22,22,22,.94)!important;border:1px solid rgba(230,230,230,.16)}
  .burger.active span:first-child{transform:translateY(7px) rotate(45deg)}
  .burger.active span:last-child{transform:translateY(-7px) rotate(-45deg)}
}
@media (max-width:580px){
  .custom-size-menu{max-height:160px}
}


/* v12 cabinet and checkout */
.cabinet-nav .admin-toggle-btn{border:0}
.cabinet-nav .admin-toggle-btn.active{color:#fff;background:linear-gradient(135deg,var(--accent),var(--accent-dark));box-shadow:0 12px 28px rgba(74,111,165,.22)}
.orders-list{display:grid;gap:12px;margin-top:10px}
.order-line{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:center;padding:14px;border-radius:18px}
.order-line strong,.order-line b{display:block;color:var(--text)}
.order-line span{display:block;color:var(--muted);font-size:14px;margin-top:4px}
.admin-orders-wrap{margin-top:32px}
.admin-orders{display:grid;gap:12px;margin-top:14px}
.admin-order{display:grid;grid-template-columns:1fr 1.5fr .8fr auto;gap:14px;align-items:center;padding:16px;border-radius:18px}
.admin-order span{display:block;color:var(--muted);font-size:14px;margin-top:4px}
.admin-order-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}
.mini-head{align-items:flex-start!important}
.checkout-modal{position:fixed;inset:0;z-index:99999;display:grid;place-items:center;padding:20px;opacity:0;pointer-events:none;transition:opacity .28s ease}
.checkout-modal.open{opacity:1;pointer-events:auto}
.checkout-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.48);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.checkout-dialog{position:relative;width:min(720px,calc(100vw - 28px));max-height:min(86vh,820px);overflow:auto;padding:32px;border-radius:var(--radius);transform:translateY(16px) scale(.98);transition:transform .28s ease}
.checkout-modal.open .checkout-dialog{transform:translateY(0) scale(1)}
.checkout-close{position:absolute;right:18px;top:18px;width:42px;height:42px;border-radius:999px;background:rgba(255,255,255,.12);color:var(--text);font-size:28px;line-height:1;cursor:pointer!important}
.checkout-step{display:grid;gap:16px}
.delivery-options{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.delivery-option{min-height:96px;border-radius:20px;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.12);color:var(--text);display:grid;align-content:center;gap:6px;padding:16px;text-align:left;cursor:pointer!important;transition:transform .25s ease,background .25s ease,border-color .25s ease}
.delivery-option:hover{transform:translateY(-2px)}
.delivery-option.active{background:linear-gradient(135deg,var(--accent),var(--accent-dark));color:#fff;border-color:transparent;box-shadow:0 14px 30px rgba(74,111,165,.26)}
.delivery-option span{color:inherit;opacity:.82}
.field-label{font-weight:850;color:var(--text)}
.checkout-total-row{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:16px;border-radius:18px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18)}
.checkout-total-row.final strong{font-size:28px}
.checkout-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.receipt-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.receipt-list li{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid rgba(255,255,255,.14)}
.requisites{padding:18px!important;border-radius:20px}
.requisites p{margin:4px 0;color:var(--muted)}
.paid-confirm{position:absolute;inset:auto 24px 24px 24px;padding:24px;border-radius:24px;opacity:0;transform:translateY(16px);pointer-events:none;transition:opacity .24s ease,transform .24s ease;box-shadow:0 24px 80px rgba(0,0,0,.24)}
.paid-confirm.open{opacity:1;transform:translateY(0);pointer-events:auto}
.input-error{border-color:rgba(255,92,92,.7)!important;box-shadow:0 0 0 4px rgba(255,92,92,.14)!important}
.full-btn{width:100%}
html[data-theme="dark"] .checkout-close,body[data-theme="dark"] .checkout-close,html[data-theme="dark"] .delivery-option,body[data-theme="dark"] .delivery-option{color:#fff}
html[data-theme="dark"] .order-line strong,html[data-theme="dark"] .order-line b,html[data-theme="dark"] .field-label,body[data-theme="dark"] .order-line strong,body[data-theme="dark"] .order-line b,body[data-theme="dark"] .field-label{color:#fff!important}
@media (max-width:920px){.admin-order,.order-line,.delivery-options{grid-template-columns:1fr}.checkout-dialog{padding:24px}.paid-confirm{left:16px;right:16px;bottom:16px}}


/* v13 fixes: cart reliability and edit product modal */
.product-actions,
.product-actions * { pointer-events: auto !important; }
.cart-primary-zone { position: relative; z-index: 6; }
.cart-btn,
.cart-btn *,
.cart-stepper,
.cart-stepper *,
.edit-btn,
.edit-btn *,
.remove-btn,
.remove-btn * { cursor: pointer !important; }
.cart-btn { min-width: 0; user-select: none !important; touch-action: manipulation; }
.cart-btn span { pointer-events: none !important; }
.cart-btn svg { pointer-events: none !important; }
.cart-btn-tap { transform: translateY(-1px) scale(.98) !important; }
.cart-pulse { animation: cartPulse .42s ease both !important; }
.stock-shake { animation: stockShake .34s ease both !important; }
@keyframes cartPulse { 0%{box-shadow:0 0 0 rgba(74,111,165,0)} 50%{box-shadow:0 0 0 7px rgba(74,111,165,.18)} 100%{box-shadow:0 0 0 rgba(74,111,165,0)} }
@keyframes stockShake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 50%{transform:translateX(4px)} 75%{transform:translateX(-2px)} }

.admin-row-v13 { grid-template-columns: 1fr 1.1fr .75fr .65fr 1fr .55fr auto !important; }
.admin-row-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.edit-btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.26);
  background: linear-gradient(135deg,var(--accent),var(--accent-dark));
  color: #fff;
  font-weight: 850;
  box-shadow: 0 10px 22px rgba(74,111,165,.18);
  transition: transform .25s ease, box-shadow .25s ease, background .3s ease;
}
.edit-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(74,111,165,.24); }
html[data-theme="dark"] .edit-btn, body[data-theme="dark"] .edit-btn { color: #fff !important; background: linear-gradient(145deg,#3a3a3a,#202020) !important; border-color: rgba(230,230,230,.18) !important; }

.edit-product-modal { z-index: 100000; }
.edit-product-dialog { width: min(820px, calc(100vw - 28px)); }
.edit-product-form h2 { margin-bottom: 10px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.edit-photo-preview { display: flex; gap: 10px; flex-wrap: wrap; }
.edit-photo-chip { position: relative; width: 82px; height: 82px; border-radius: 18px; overflow: hidden; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); display: block; }
.edit-photo-chip img { width: 100%; height: 100%; object-fit: cover; }
.edit-photo-chip b { position: absolute; left: 7px; top: 7px; min-width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; background: rgba(0,0,0,.52); color: #fff; font-size: 12px; }
.edit-photo-chip button { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 999px; background: rgba(0,0,0,.62); color: #fff; font-size: 18px; line-height: 1; cursor: pointer !important; }
html[data-theme="dark"] .edit-product-dialog .input,
html[data-theme="dark"] .edit-product-dialog .site-select,
body[data-theme="dark"] .edit-product-dialog .input,
body[data-theme="dark"] .edit-product-dialog .site-select { background: linear-gradient(145deg,#242424,#151515) !important; color:#fff !important; border-color: rgba(230,230,230,.24) !important; }
html[data-theme="dark"] .edit-product-dialog .file-drop,
body[data-theme="dark"] .edit-product-dialog .file-drop { background: rgba(230,230,230,.06) !important; border-color: rgba(230,230,230,.18) !important; }
@media (max-width: 920px) { .admin-row-v13 { grid-template-columns: 1fr !important; } .admin-row-actions { justify-content: stretch; } .admin-row-actions .edit-btn, .admin-row-actions .remove-btn { width: 100%; } .modal-actions .primary-btn, .modal-actions .secondary-btn { width: 100%; } }


/* v14 header cart and footer social */
.header-cart-btn{
  width:44px;height:44px;flex:0 0 44px;border-radius:999px;
  display:inline-flex;align-items:center;justify-content:center;position:relative;
  border:1px solid rgba(255,255,255,.74);background:rgba(255,255,255,.64);
  color:var(--text);transition:.25s ease;box-shadow:var(--shadow-soft)
}
.header-cart-btn svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.header-cart-btn span{position:absolute;right:-4px;top:-5px;min-width:20px;height:20px;padding:0 6px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:var(--accent);color:#fff;font-size:11px;font-weight:900;box-shadow:0 8px 18px rgba(74,111,165,.28)}
.header-cart-btn:hover{transform:translateY(-2px);background:rgba(255,255,255,.78)}
.footer-socials{display:flex;justify-content:center;align-items:center;margin:22px 0 8px}
.footer-social-link{display:inline-flex!important;align-items:center;gap:8px;color:var(--text)!important;font-weight:800;font-size:14px!important;transition:.25s ease}
.footer-social-link svg{width:26px;height:26px;filter:drop-shadow(0 8px 16px rgba(74,111,165,.16))}
.footer-social-link:hover{transform:translateY(-2px);color:var(--accent-dark)!important}
.profile-card{min-height:0!important}
.profile-fields{display:grid;gap:12px;margin-top:16px}
.profile-field{display:grid;grid-template-columns:130px 1fr auto;gap:12px;align-items:center;padding:14px;border-radius:18px;background:rgba(255,255,255,.52);border:1px solid rgba(255,255,255,.70)}
.profile-field span{color:var(--muted);font-size:14px;font-weight:700}
.profile-field strong{color:var(--text);font-size:16px;line-height:1.25;word-break:break-word}
.profile-edit-btn{width:38px;height:38px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;background:rgba(16,16,16,.08);color:var(--text);transition:.22s ease;font-weight:900}
.profile-edit-btn:hover{transform:translateY(-2px);background:rgba(16,16,16,.12)}
.profile-edit-btn:disabled,.profile-edit-btn.locked{opacity:.45;cursor:not-allowed;transform:none!important}
.profile-dialog{max-width:620px!important}
.profile-modal .input{font-size:18px}
.modal-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap}
html[data-theme="dark"] .header-cart-btn,body[data-theme="dark"] .header-cart-btn{background:linear-gradient(145deg,#2f2f2f,#151515)!important;border-color:rgba(230,230,230,.2)!important;color:#fff!important}
html[data-theme="dark"] .footer-social-link,body[data-theme="dark"] .footer-social-link{color:#fff!important}
html[data-theme="dark"] .footer-social-link:hover,body[data-theme="dark"] .footer-social-link:hover{color:#fff!important;opacity:.78}
html[data-theme="dark"] .profile-field,body[data-theme="dark"] .profile-field{background:rgba(230,230,230,.06);border-color:rgba(230,230,230,.14)}
html[data-theme="dark"] .profile-field strong,body[data-theme="dark"] .profile-field strong{color:#fff!important}
html[data-theme="dark"] .profile-edit-btn,body[data-theme="dark"] .profile-edit-btn{background:rgba(230,230,230,.09);color:#fff!important;border:1px solid rgba(230,230,230,.12)}
@media (max-width:1100px){.header-actions .header-cart-btn{display:inline-flex}.header-cart-btn{width:42px;height:42px;flex-basis:42px}}
@media (max-width:580px){.profile-field{grid-template-columns:1fr auto}.profile-field strong{grid-column:1 / -1;grid-row:2}.header-cart-btn{width:40px;height:40px;flex-basis:40px}.header-cart-btn span{right:-2px;top:-4px}}


/* v15: modal close fix, footer social inside footer card, stable cart count */
.checkout-dialog,
.profile-dialog,
.edit-product-dialog{
  overflow: visible !important;
  padding: 56px 34px 34px !important;
  border-radius: var(--radius) !important;
}
.checkout-dialog > form,
.profile-dialog > form,
.edit-product-dialog > form,
.checkout-dialog [data-checkout-content]{
  position: relative;
  z-index: 2;
}
.checkout-close{
  position: absolute !important;
  top: 18px !important;
  right: 18px !important;
  z-index: 20 !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 1 !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  background: rgba(255,255,255,.62) !important;
  border: 1px solid rgba(255,255,255,.72) !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.12) !important;
  cursor: pointer !important;
  transition: transform .22s ease, background .22s ease, color .22s ease, border-color .22s ease !important;
}
.checkout-close:hover{transform: translateY(-2px) scale(1.02) !important;}
.checkout-dialog .eyebrow,
.profile-dialog .eyebrow,
.edit-product-dialog .eyebrow{
  margin-right: 58px !important;
  max-width: calc(100% - 58px);
}
html[data-theme="dark"] .checkout-close,
body[data-theme="dark"] .checkout-close{
  color: #fff !important;
  background: linear-gradient(145deg,#2f2f2f,#151515) !important;
  border-color: rgba(230,230,230,.2) !important;
}
.profile-modal .profile-dialog h2,
.edit-product-dialog h2,
.checkout-dialog h2{
  overflow-wrap: anywhere;
}
.footer-inner .footer-socials{
  grid-column: 1 / -1;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 8px 0 0 !important;
  padding-top: 18px !important;
  border-top: 1px solid rgba(255,255,255,.24);
}
.footer-inner .footer-social-link{
  color: var(--text) !important;
  font-weight: 850 !important;
  font-size: 14px !important;
  cursor: pointer !important;
}
.footer-inner .footer-social-link *{cursor:pointer!important}
html[data-theme="dark"] .footer-inner .footer-socials,
body[data-theme="dark"] .footer-inner .footer-socials{border-top-color:rgba(230,230,230,.14)}
html[data-theme="dark"] .footer-inner .footer-social-link,
body[data-theme="dark"] .footer-inner .footer-social-link{color:#fff!important}
.header-cart-btn [data-cart-count]{
  transition: opacity .2s ease, transform .2s ease;
}
.header-cart-btn [data-cart-count].is-empty{
  opacity: 0;
  transform: scale(.6);
  pointer-events: none;
}
@media (max-width:580px){
  .checkout-dialog,.profile-dialog,.edit-product-dialog{padding:54px 20px 22px!important;}
  .checkout-close{top:14px!important;right:14px!important;width:38px!important;height:38px!important;font-size:22px!important;}
  .checkout-dialog .eyebrow,.profile-dialog .eyebrow,.edit-product-dialog .eyebrow{margin-right:50px!important;max-width:calc(100% - 50px)}
}


/* v16 polish: clean modals, accent actions, stable cart badge and admin form cleanup */
.checkout-dialog,
.profile-dialog,
.edit-product-dialog{
  overflow: hidden !important;
  border-radius: 34px !important;
  clip-path: inset(0 round 34px);
}
.checkout-dialog::before,
.profile-dialog::before,
.edit-product-dialog::before{
  border-radius: inherit !important;
  clip-path: inset(0 round 34px);
}
.checkout-close{border-radius:999px!important;}

.account-btn{
  max-width: 142px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  justify-content: center !important;
}

.header-cart-btn [data-cart-count]{
  opacity:0;
  transform:scale(.6);
  pointer-events:none;
}
.header-cart-btn [data-cart-count].is-nonempty{
  opacity:1;
  transform:scale(1);
}
.header-cart-btn [data-cart-count].is-empty{opacity:0!important;transform:scale(.6)!important;}

.primary-btn,
.small-btn,
.telegram-btn,
.cart-btn,
.filter-btn.active,
.auth-tab.active,
.cabinet-nav-btn.active,
.admin-order-actions .small-btn,
.footer-inner .small-btn,
.checkout-actions .primary-btn,
.modal-actions .primary-btn{
  background:linear-gradient(135deg,var(--accent),var(--accent-dark))!important;
  border:1px solid rgba(74,111,165,.44)!important;
  color:#fff!important;
  box-shadow:0 14px 30px rgba(74,111,165,.24)!important;
}
.primary-btn *,
.small-btn *,
.telegram-btn *,
.cart-btn *,
.filter-btn.active *,
.auth-tab.active *,
.cabinet-nav-btn.active *,
.footer-inner .small-btn *{color:#fff!important;}

html[data-theme="dark"] .primary-btn,
html[data-theme="dark"] .small-btn,
html[data-theme="dark"] .telegram-btn,
html[data-theme="dark"] .cart-btn,
html[data-theme="dark"] .filter-btn.active,
html[data-theme="dark"] .auth-tab.active,
html[data-theme="dark"] .cabinet-nav-btn.active,
html[data-theme="dark"] .admin-order-actions .small-btn,
html[data-theme="dark"] .footer-inner .small-btn,
html[data-theme="dark"] .checkout-actions .primary-btn,
html[data-theme="dark"] .modal-actions .primary-btn,
body[data-theme="dark"] .primary-btn,
body[data-theme="dark"] .small-btn,
body[data-theme="dark"] .telegram-btn,
body[data-theme="dark"] .cart-btn,
body[data-theme="dark"] .filter-btn.active,
body[data-theme="dark"] .auth-tab.active,
body[data-theme="dark"] .cabinet-nav-btn.active,
body[data-theme="dark"] .admin-order-actions .small-btn,
body[data-theme="dark"] .footer-inner .small-btn,
body[data-theme="dark"] .checkout-actions .primary-btn,
body[data-theme="dark"] .modal-actions .primary-btn{
  background:linear-gradient(135deg,var(--accent),var(--accent-dark))!important;
  border-color:rgba(74,111,165,.54)!important;
  color:#fff!important;
  box-shadow:0 14px 30px rgba(74,111,165,.26)!important;
}

.photo-preview[hidden],
.edit-photo-preview[hidden],
[data-photo-preview][hidden]{display:none!important;}
.photo-preview:empty,
[data-photo-preview]:empty{display:none!important;}

.admin-form > .photo-preview:empty,
.admin-form > [data-photo-preview]:empty{display:none!important;}

@media (max-width:580px){.account-btn{max-width:92px!important;}}


/* v17: payment confirmation modal must stay above checkout dialog */
.checkout-modal{
  isolation:isolate;
}
.paid-confirm{
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: min(560px, calc(100vw - 36px)) !important;
  max-width: calc(100vw - 36px) !important;
  padding: 28px !important;
  border-radius: 28px !important;
  z-index: 100010 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translate(-50%, -46%) scale(.96) !important;
  transition: opacity .26s ease, transform .26s ease !important;
  box-shadow: 0 34px 120px rgba(0,0,0,.42) !important;
  overflow: visible !important;
  clip-path: none !important;
}
.paid-confirm.open{
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate(-50%, -50%) scale(1) !important;
}
.paid-confirm h3{
  margin:0 0 10px !important;
  font-size: clamp(24px, 3.2vw, 34px) !important;
  line-height:1 !important;
  letter-spacing:-.04em !important;
}
.paid-confirm p{
  margin:0 0 18px !important;
  color: var(--muted) !important;
}
.paid-confirm .checkout-actions{
  justify-content:flex-start !important;
}
html[data-theme="dark"] .paid-confirm,
body[data-theme="dark"] .paid-confirm{
  background: linear-gradient(150deg, rgba(38,38,38,.96), rgba(18,18,18,.94)) !important;
  border-color: rgba(255,255,255,.18) !important;
}
@media (max-width:580px){
  .paid-confirm{padding:22px !important; border-radius:24px !important;}
  .paid-confirm .checkout-actions{display:grid !important;}
  .paid-confirm .primary-btn,.paid-confirm .secondary-btn{width:100% !important;}
}


/* v18: Telegram-bot order flow */
.bot-order-modal{z-index:100020!important;}
.bot-order-dialog{width:min(680px,calc(100vw - 28px))!important;}
.bot-order-warning{margin:0!important;color:#ffcdcd!important;}
.cart-summary-note{font-size:14px;color:var(--muted);line-height:1.45;margin:12px 0 0!important;}
html[data-theme="dark"] .bot-order-dialog,
body[data-theme="dark"] .bot-order-dialog{background:linear-gradient(150deg,rgba(38,38,38,.96),rgba(18,18,18,.94))!important;}

/* backend v19 additions */
.toast-box { position: fixed; right: 24px; bottom: 24px; z-index: 99999; display: grid; gap: 10px; }
.toast { padding: 14px 18px; border-radius: 18px; transform: translateY(12px); opacity: 0; transition: .25s ease; color: var(--text); }
.toast.show { transform: translateY(0); opacity: 1; }
[data-theme="dark"] .toast { color: #fff; }
.header-cart-btn [data-cart-count][hidden] { display: none !important; }
.account-btn.truncate { max-width: 156px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.square-media { aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--radius-sm); }
.square-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-weight: 900; color: var(--accent); background: rgba(74,111,165,.12); }
.product-placeholder.small { width: 80px; height: 80px; border-radius: 18px; }
.size-picker { position: relative; z-index: 5; margin: 8px 0 16px; }
.size-picker-trigger { width: 100%; min-height: 46px; border-radius: 16px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: var(--text); text-align: left; padding: 0 16px; cursor: pointer; }
[data-theme="dark"] .size-picker-trigger { color: #fff; background: rgba(255,255,255,.06); }
.size-options { position: absolute; left: 0; right: 0; top: calc(100% + 8px); display: grid; max-height: 0; opacity: 0; overflow: hidden; transform: translateY(-8px); transition: .25s ease; border-radius: 18px; z-index: 30; }
.size-picker.open .size-options { max-height: 240px; opacity: 1; transform: translateY(0); padding: 8px; }
.size-options button { min-height: 38px; border-radius: 12px; background: transparent; color: var(--text); cursor: pointer; text-align: left; padding: 0 12px; }
[data-theme="dark"] .size-options button { color: #fff; }
.size-options button:hover { background: var(--accent); color: #fff; }
.product-size-label { display: block; margin-top: 12px; color: var(--muted); font-weight: 700; font-size: 14px; }
.product-size-empty { margin: 8px 0 16px; color: var(--muted); }
.cart-action-btn { pointer-events: auto; }
.cart-action-btn span { pointer-events: none; }
.cart-action-btn.added { transform: scale(.97); }
.qty-control { display: inline-flex; align-items: center; gap: 10px; }
.qty-control button { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; }
.cart-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 24px; align-items: start; }
.cart-list, .cart-summary { border-radius: var(--radius); padding: var(--pad, 28px); }
.cart-item { display: grid; grid-template-columns: 86px 1fr auto auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.cart-item:last-child { border-bottom: 0; }
.summary-total { display: flex; align-items: center; justify-content: space-between; margin: 22px 0; font-size: 20px; }
.admin-product-row, .admin-order-row, .order-row { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 12px; align-items: center; padding: 14px; border-radius: 18px; border: 1px solid rgba(255,255,255,.14); margin-top: 10px; }
.admin-order-row { grid-template-columns: 1.2fr 1fr auto auto; }
.order-row { grid-template-columns: 1fr 1fr auto; }
.photo-preview { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.photo-thumb { width: 76px; height: 76px; border-radius: 16px; overflow: hidden; position: relative; border: 1px solid rgba(255,255,255,.18); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb button { position: absolute; right: 4px; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.7); color:#fff; cursor:pointer; }
.modal-layer { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 24px; opacity: 0; transition: .22s ease; }
.modal-layer.show { opacity: 1; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.62); backdrop-filter: blur(14px); }
.modal-card { position: relative; width: min(720px, 100%); max-height: min(760px, calc(100vh - 48px)); overflow: auto; border-radius: 32px; padding: 34px; }
.modal-close { position: absolute; right: 18px; top: 18px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 28px; cursor: pointer; z-index: 2; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.modal-field-label { display:block; margin-bottom:10px; font-weight:800; }
.form-error { padding: 12px 14px; border-radius: 14px; background: rgba(255,80,80,.12); color: #ff8080; }
@media (max-width: 760px) { .cart-layout, .cart-item, .admin-product-row, .admin-order-row, .order-row { grid-template-columns: 1fr; } }


/* v21: profile check + pickup/delivery choice before bot order */
.receive-method-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:18px;
}
.receive-method-card{
  min-height:150px;
  border-radius:var(--radius-sm);
  padding:22px;
  display:grid;
  gap:10px;
  align-content:start;
  text-align:left;
  color:var(--text);
  cursor:pointer!important;
  border:1px solid rgba(255,255,255,.18);
  transition:transform .25s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.receive-method-card:hover{
  transform:translateY(-3px);
  background:linear-gradient(135deg,var(--accent),var(--accent-dark));
  color:#fff;
  box-shadow:0 18px 36px rgba(74,111,165,.24);
}
.receive-method-card:hover small,
.receive-method-card:hover .receive-method-icon{color:#fff;opacity:.92;}
.receive-method-icon{
  width:42px;
  height:42px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:rgba(74,111,165,.16);
  color:var(--accent);
  font-weight:900;
}
.receive-method-card strong{font-size:20px;letter-spacing:-.03em;}
.receive-method-card small{font-size:14px;line-height:1.45;color:var(--muted);}
html[data-theme="dark"] .receive-method-card,
body[data-theme="dark"] .receive-method-card{color:#fff;background:rgba(255,255,255,.055);}
@media(max-width:640px){.receive-method-grid{grid-template-columns:1fr}.receive-method-card{min-height:120px}}

.telegram-login-slot {
  min-height: 50px;
  min-width: 210px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill, 999px);
  overflow: hidden;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--border, rgba(255,255,255,.2));
}
.telegram-login-widget-inner,
.telegram-login-widget-inner iframe {
  display: block;
}
.telegram-login-slot.disabled {
  padding: 0 18px;
  color: var(--text-muted, rgba(255,255,255,.65));
  font-weight: 700;
}
/* v19: readable Telegram Login fallback */
.telegram-login-slot {
  background: transparent !important;
  border: 0 !important;
  overflow: visible !important;
}
.telegram-login-widget-inner {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.telegram-fallback-btn {
  min-height: 44px;
  min-width: 220px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent, #4d7ec2);
  color: #fff !important;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(47, 112, 194, .22);
}
.telegram-widget-ready .telegram-fallback-btn {
  display: none !important;
}
.telegram-widget-failed .telegram-fallback-btn {
  display: inline-flex !important;
}

/* v22: single branded Telegram Login button, admin page, better cart hitbox */
.telegram-login-slot{
  position:relative!important;
  width:fit-content!important;
  min-width:220px!important;
  min-height:50px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:0!important;
  background:transparent!important;
  overflow:visible!important;
}
.telegram-style-btn{
  min-height:50px;
  min-width:220px;
  padding:0 22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  border-radius:999px;
  background:linear-gradient(135deg,var(--accent),var(--accent-dark));
  border:1px solid rgba(74,111,165,.48);
  color:#fff!important;
  font-weight:850;
  font-size:15px;
  box-shadow:0 14px 32px rgba(74,111,165,.26);
  cursor:pointer!important;
  user-select:none;
  transition:transform .24s ease,box-shadow .24s ease,filter .24s ease;
}
.telegram-style-btn:hover{transform:translateY(-2px);box-shadow:0 18px 38px rgba(74,111,165,.32)}
.telegram-style-btn:disabled{opacity:.62;cursor:not-allowed!important;transform:none!important}
.telegram-style-icon{
  width:28px;
  height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:rgba(255,255,255,.18);
  font-size:15px;
  line-height:1;
  transform:rotate(-18deg);
}
.telegram-login-widget-inner{
  position:absolute!important;
  inset:0!important;
  z-index:5!important;
  display:none!important;
  width:100%!important;
  height:100%!important;
  min-height:50px!important;
  opacity:0!important;
  overflow:hidden!important;
  border-radius:999px!important;
}
.telegram-login-widget-inner iframe{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-width:100%!important;
  min-height:50px!important;
  opacity:0!important;
  border:0!important;
}
.telegram-widget-ready .telegram-login-widget-inner{display:block!important;pointer-events:auto!important}
.telegram-widget-failed .telegram-login-widget-inner{display:none!important}
.telegram-fallback-btn{display:none!important}
html[data-theme="dark"] .telegram-style-btn,
body[data-theme="dark"] .telegram-style-btn{background:linear-gradient(135deg,var(--accent),var(--accent-dark))!important;color:#fff!important}
.product-actions{position:relative!important;z-index:20!important;pointer-events:auto!important}
.cart-action-btn{
  position:relative!important;
  z-index:30!important;
  width:100%!important;
  min-height:54px!important;
  padding:0 22px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  pointer-events:auto!important;
  cursor:pointer!important;
  touch-action:manipulation!important;
  user-select:none!important;
}
.cart-action-btn,
.cart-action-btn *{cursor:pointer!important}
.cart-action-btn span{pointer-events:none!important}
.cart-action-btn:disabled,
.cart-action-btn:disabled *{cursor:not-allowed!important}
.heart-btn{position:relative!important;z-index:25!important;cursor:pointer!important}
.product-card .primary-btn,
.product-card .primary-btn *{cursor:pointer!important}
[data-admin-guest][hidden],
[data-admin-loading][hidden],
[data-admin-denied][hidden],
[data-admin-access][hidden]{display:none!important}
.admin-page-wrap{max-width:980px}
.admin-state{max-width:760px;margin:0 auto}
.admin-orders-panel{margin-top:24px}
.admin-header-inner .nav{display:none!important}
.admin-back-btn{min-height:42px;padding:0 16px}
.admin-product-row{grid-template-columns:1fr 1.2fr .8fr .6fr 1fr .5fr auto auto!important}
@media(max-width:920px){
  .admin-product-row{grid-template-columns:1fr!important}
  .admin-header-inner{border-radius:28px!important}
  .admin-back-btn{display:none!important}
}
@media(max-width:580px){
  .telegram-login-slot,.telegram-style-btn{width:100%!important;min-width:0!important}
}
