
:root{
  --bg:#eef1f5;
  --panel:#f7f8fa;
  --panel-2:#edf1f6;
  --text:#183153;
  --muted:#63748b;
  --line:#d7e0ea;
  --accent:#1f5a3b;
  --accent-2:#4b7a59;
  --danger:#d9534f;
  --ok:#2f8a5e;
  --shadow:0 18px 38px rgba(31,90,59,.08);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Inter,Arial,sans-serif;background:linear-gradient(180deg,#f4f5f7 0,#eef1f5 52%,#e8edf3 100%);color:var(--text)}
a{color:inherit;text-decoration:none}
.container{width:min(1180px,calc(100% - 28px));margin:0 auto}
.site-header{position:sticky;top:0;z-index:50;background:rgba(248,249,251,.94);backdrop-filter:blur(14px);border-bottom:1px solid rgba(31,90,59,.08)}
.header-inner{display:flex;justify-content:space-between;align-items:center;padding:16px 0}
.logo{display:inline-flex;align-items:center;gap:12px;font-weight:900;letter-spacing:.08em;color:#1f5a3b}
.logo-mark{width:44px;height:44px;display:block;object-fit:contain;filter:drop-shadow(0 10px 22px rgba(31,90,59,.18))}
.logo-text{display:block;line-height:1;white-space:nowrap}
.main-nav{display:flex;gap:16px;align-items:center;justify-content:flex-end}
.main-nav a{padding:10px 14px;border-radius:14px;background:#fff;border:1px solid var(--line);box-shadow:0 8px 18px rgba(31,90,59,.05);color:#1f5a3b}
.hero{padding:40px 0 18px}
.hero h1{font-size:52px;line-height:1;margin:0}
.filters{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0 24px}
.chip{padding:10px 14px;border:1px solid var(--line);border-radius:999px;background:#f9fafb;box-shadow:0 10px 20px rgba(31,90,59,.04)}
.chip.active{background:linear-gradient(135deg,#ffffff,#edf5ef);border-color:#a9c6b1;color:#1f5a3b}
.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.card{background:linear-gradient(180deg,#f9fafb,#f2f4f7);border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow);padding:18px}
.product-card{overflow:hidden;padding:0}
.product-image-wrap{display:flex;align-items:center;justify-content:center;height:360px;padding:16px;background:linear-gradient(180deg,#f1f3f5,#e9edf1);border-bottom:1px solid rgba(31,90,59,.06)}
.product-image{width:100%;height:100%;object-fit:contain;display:block}
.product-body{padding:18px}
.product-body h3{margin:10px 0 10px;font-size:22px}
.price{font-weight:900;font-size:22px;color:#1f5a3b}
.price.big{font-size:28px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:linear-gradient(135deg,var(--accent),var(--accent-2));color:#fff;border:none;border-radius:16px;padding:12px 16px;font-weight:800;cursor:pointer;box-shadow:0 12px 26px rgba(31,90,59,.22)}
.btn.secondary{background:#fff;color:var(--text);border:1px solid var(--line);box-shadow:none}
.btn.danger{background:linear-gradient(135deg,#e27a7a,var(--danger));color:#fff}
.small-btn{padding:8px 12px;border-radius:12px;font-size:14px}
.input,textarea,select{width:100%;background:#fff;color:var(--text);border:1px solid var(--line);border-radius:14px;padding:12px 14px;outline:none}
.input:focus,textarea:focus,select:focus{border-color:#8db79b;box-shadow:0 0 0 4px rgba(75,122,89,.15)}
label{display:grid;gap:8px;font-size:14px;color:#49627f}
.stack{display:grid;gap:14px}
.checkout-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.checkout-grid .full{grid-column:1/-1}
.site-main{padding-top:14px;padding-bottom:0}
.product-page{display:grid;grid-template-columns:1fr .92fr;gap:16px;align-items:start}
.product-main-stage{display:flex;align-items:flex-start;justify-content:center;border-radius:18px;background:linear-gradient(180deg,#f1f3f5,#e9edf1);padding:18px 18px 12px;min-height:0}
.product-large{width:auto;max-width:64%;display:block;height:auto;max-height:min(48vh,520px);object-fit:contain;object-position:center top;border-radius:18px;background:transparent;padding:0;margin:0 auto}
.desc{line-height:1.7;color:#49627f}
.table-wrap{overflow:auto}
.table{width:100%;border-collapse:collapse}
.table th,.table td{border-bottom:1px solid rgba(31,90,59,.08);padding:12px 10px;text-align:left;vertical-align:top}
.table th{color:var(--muted);font-weight:700}
.summary{margin:18px 0;display:grid;gap:10px}
.total{font-size:26px;font-weight:900}
.site-footer{padding:34px 0;color:var(--muted);margin-top:28px;border-top:1px solid rgba(31,90,59,.07);background:rgba(241,244,248,.96)}
.footer-grid{display:grid;grid-template-columns:1.15fr auto 1.15fr;gap:20px;align-items:center}
.footer-brand{font-size:20px;font-weight:900;color:#1f1a17;margin-bottom:8px}
.footer-legal{line-height:1.75}
.footer-center{display:flex;justify-content:center;align-items:center;text-align:center;min-height:52px}
.footer-right{display:grid;justify-items:end;gap:10px;text-align:right}
.footer-copy-right{font-size:16px;font-weight:800;color:#1f5a3b}
.footer-grid-premium{padding:6px 0}
.alert{padding:14px 16px;border-radius:16px;margin:16px 0}
.alert-success{background:rgba(47,138,94,.10);border:1px solid rgba(47,138,94,.20)}
.alert-error{background:rgba(197,79,79,.10);border:1px solid rgba(197,79,79,.20)}
.muted{color:var(--muted)}
.empty{padding:26px;text-align:center}
.auth-wrap{display:grid;place-items:center;min-height:70vh}
.auth-card{width:min(440px,100%)}
.admin-shell{display:grid;grid-template-columns:280px 1fr;gap:18px;padding:20px 0 30px}
.admin-menu{display:grid;gap:10px;height:max-content;position:sticky;top:88px}
.admin-menu a{padding:12px 14px;border-radius:14px;background:#fff;border:1px solid var(--line)}
.admin-content{display:grid;gap:18px}
.between{display:flex;justify-content:space-between;align-items:center;gap:10px}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.stat-num{font-size:34px;font-weight:900}
.inline-form,.ref-form{display:flex;gap:10px;flex-wrap:wrap}
.inline-form .input,.ref-form .input{flex:1 1 180px}
.variant-row{display:grid;grid-template-columns:1.1fr 1fr 1fr .9fr;gap:10px;margin-bottom:10px}
.thumb{width:70px;height:70px;border-radius:12px;object-fit:contain;background:#fff;border:1px solid rgba(31,90,59,.12);padding:4px}
.big-thumb{width:150px;height:150px}
.order-card{display:grid;gap:12px}
.order-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.order-form .full{grid-column:1/-1}
.items-list{margin:0;padding-left:0;color:#4a4037}
.note{margin-top:16px;padding:14px;border:1px dashed #afc9f3;border-radius:16px;color:var(--muted);line-height:1.6;background:#f8fbf9}
code{background:#eef5f0;padding:2px 6px;border-radius:8px}
.small{max-width:100px}

@media (max-width: 1180px){.product-large{max-width:58%;max-height:min(44vh,460px)}}
@media (max-width: 980px){
  .grid,.stats-grid,.product-page,.admin-shell,.checkout-grid,.order-form,.footer-grid{grid-template-columns:1fr}
  .variant-row{grid-template-columns:1fr}
  .main-nav{gap:10px;flex-wrap:wrap;justify-content:flex-end}
  .logo{gap:10px;font-size:15px}
  .logo-mark{width:32px;height:32px}
  .hero h1{font-size:40px}
  .footer-right,.footer-legal{text-align:center;justify-items:center}
  .footer-links-right{justify-content:center}
  .robokassa-logo-original{width:210px;margin:6px auto}
}

.orders-toolbar{display:grid;grid-template-columns:minmax(240px,1.7fr) repeat(3,minmax(150px,.8fr)) auto auto auto;gap:10px;align-items:center;margin-top:16px}
.orders-search{min-width:0}
.orders-select{min-width:0}
@media (max-width: 980px){.orders-toolbar{grid-template-columns:1fr}}


.footer-links{display:flex;gap:12px;flex-wrap:wrap;margin-top:0}
.footer-links a{color:#557565;text-decoration:none}
.footer-links a:hover{color:#1f5a3b}
.footer-links-right{justify-content:flex-end}
.robokassa-logo{display:block;width:148px;max-width:100%;height:auto}
.robokassa-logo-original{width:148px;max-width:100%;filter:drop-shadow(0 10px 24px rgba(31,90,59,.10));background:#fff;padding:8px 12px;border-radius:12px;border:1px solid rgba(31,90,59,.08)}
.legal-page{padding:28px 32px;line-height:1.7}
.legal-page h1{margin-top:0;margin-bottom:8px}
.legal-page h2{margin-top:26px;margin-bottom:10px;font-size:22px}
.legal-page p{margin:0 0 14px}
.legal-list{margin:0 0 14px 18px;padding:0}
.legal-list li{margin:0 0 8px}
.payment-badge{display:flex;align-items:center;gap:14px;flex-wrap:wrap;background:#f4f7fb;border:1px solid #dbe2eb;border-radius:18px;padding:14px 16px;margin:16px 0 20px}
.payment-badge-order{margin-bottom:16px}
@media (max-width: 840px){
  .legal-page{padding:22px 18px}
}

.delivery-switch{display:flex;gap:12px;flex-wrap:wrap;margin:4px 0 8px}
.delivery-option{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border:1px solid #d7e4f5;border-radius:14px;background:#fff;cursor:pointer}
.delivery-option.active{border-color:#1f5a3b;background:#eef5f0}
.pickup-box,.cdek-box,.order-total-box{padding:16px;border:1px solid #dbe2eb;border-radius:18px;background:#f4f7fb}
.actions-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.order-total-box{display:flex;gap:18px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.note code{word-break:break-all}
@media (max-width: 700px){.order-total-box{align-items:flex-start;flex-direction:column}}

.admin-gallery{display:flex;gap:10px;flex-wrap:wrap}
.product-gallery-card{display:grid;gap:10px}
.product-gallery-strip{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.product-gallery-thumb-button{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:14px;padding:0;background:#f7f8fa;cursor:pointer;transition:.2s ease;line-height:0;overflow:hidden}
.product-gallery-thumb-button.active{border-color:var(--accent);box-shadow:0 0 0 2px rgba(31,95,214,.14)}
.product-gallery-thumb-button:hover{transform:translateY(-1px)}
.product-gallery-thumb{width:82px;height:82px;object-fit:contain;object-position:center top;border-radius:14px;background:#f4f5f7;padding:6px}
.items-list{display:grid;gap:10px;margin:0}
.order-item-row{display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px solid rgba(31,26,23,.08)}
.order-item-row:first-child{border-top:none;padding-top:0}

@media (max-width: 640px){.site-main{padding-top:10px}.product-image-wrap{height:280px;padding:12px}.product-main-stage{padding:12px}.product-large{max-width:88%;max-height:50vh}.product-gallery-thumb{width:72px;height:72px}}


.product-card-actions{display:flex;gap:10px;align-items:center;flex-wrap:nowrap;margin-top:14px}
.inline-add-to-cart-form{display:flex;align-items:center;flex:0 0 auto}
.inline-add-to-cart-form .btn,.product-card-actions .btn{min-width:0;white-space:nowrap}
.product-card-actions .btn.secondary{flex:0 0 auto}
.product-card-actions .btn,.product-card-actions .inline-add-to-cart-form .btn{padding-inline:14px}
.cart-remove-col{text-align:right;white-space:nowrap}
.cart-actions{margin-top:14px}

@media (max-width: 760px){.product-card-actions{flex-wrap:wrap}.product-card-actions .btn,.product-card-actions .inline-add-to-cart-form{width:100%}}


.footer-payment-center{display:grid;gap:12px;justify-items:center}
.footer-payment-main{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap}
.robokassa-service-text{font-size:14px;line-height:1.45;color:var(--muted);max-width:320px}
.payment-methods-image{display:block;width:336px;max-width:100%;height:auto}
@media (max-width: 980px){.footer-payment-main{flex-direction:column}.robokassa-service-text{text-align:center;max-width:100%}.payment-methods-image{width:300px}}

.footer-grid-premium{padding:10px 0}
.footer-payment-main,.payment-methods-image{justify-self:center}
.payment-methods-image{filter:drop-shadow(0 10px 22px rgba(31,90,59,.06))}
.main-nav a:hover,.admin-menu a:hover{border-color:#a9c7ff;color:#1f5a3b}



/* v25 gradient buttons/nav */
.main-nav a{
  background:linear-gradient(135deg,#2d6ff0 0%,#4e90ff 100%);
  color:#fff;
  border:1px solid rgba(31,90,59,.08);
  box-shadow:0 12px 24px rgba(31,95,214,.16);
}
.main-nav a:hover{
  color:#fff;
  border-color:transparent;
  box-shadow:0 14px 26px rgba(31,90,59,.22);
  transform:translateY(-1px);
}
.btn{
  background:linear-gradient(135deg,#245fd1 0%,#4f97ff 100%);
  box-shadow:0 12px 26px rgba(31,95,214,.24);
}
.btn.secondary{
  background:linear-gradient(135deg,#2f74f2 0%,#67a9ff 100%);
  color:#fff;
  border:none;
  box-shadow:0 12px 24px rgba(31,90,59,.18);
}
.btn.secondary:hover{
  color:#fff;
  transform:translateY(-1px);
}
.btn.danger{
  background:linear-gradient(135deg,#e27a7a,#cf5656);
}
.product-card-actions .btn,
.product-card-actions .inline-add-to-cart-form .btn,
.cart-actions .btn,
.actions-row .btn{
  min-height:46px;
}
.robokassa-logo-original{
  background:#fff;
  padding:8px 12px;
  border-radius:12px;
  border:1px solid rgba(31,90,59,.08);
}
.payment-methods-image{
  width:336px;
  max-width:100%;
  height:auto;
}
@media (max-width: 980px){
  .payment-methods-image{width:300px}
}


/* v26 softer gray surfaces */
.footer-payment-center{gap:10px}
.footer-payment-main{background:rgba(255,255,255,.58);padding:10px 14px;border:1px solid rgba(215,224,234,.9);border-radius:18px}
.robokassa-logo-original{background:#fff;border:1px solid rgba(31,90,59,.08);box-shadow:0 10px 24px rgba(31,90,59,.08)}
.payment-methods-image{filter:drop-shadow(0 8px 18px rgba(31,90,59,.05))}
.product-page .card{background:linear-gradient(180deg,#f8f8f8,#f1f3f5)}
.product-body{background:transparent}

/* v27 blue-gray balance */
:root{
  --bg:#e5e7eb;
  --surface:#f3f4f6;
  --surface-strong:#eceff3;
  --line:#cfd5dd;
  --text:#2f3b4b;
  --muted:#6d7682;
  --accent:#2f6fe4;
  --accent-2:#6a96ea;
}
body{
  background:linear-gradient(180deg,#e6e8eb 0%,#e1e4e8 100%);
  color:var(--text);
}
.site-header,
.site-footer{
  background:rgba(246,247,249,.84);
  border-color:#d0d5dc;
}
.site-main{padding-top:18px}
.card,
.product-page .card,
.checkout-grid .card,
.admin-menu,
.admin-content .card,
.order-card{
  background:linear-gradient(180deg,#f3f4f6 0%,#eceff2 100%);
  border-color:#d2d7de;
}
.product-image-wrap,
.product-main-stage,
.pickup-box,.cdek-box,.order-total-box,
.payment-badge,
.footer-payment-main{
  background:rgba(248,249,251,.92);
  border-color:#d2d8e0;
}
.logo,
.logo-text,
.footer-copy,
.footer-copy-right,
.robokassa-service-text{
  color:#616975;
}
.footer-links a,
.footer-links-right a,
.footer-links a:visited{
  color:#666f7a;
}
.footer-links a:hover,
.footer-links-right a:hover,
.logo:hover .logo-text{
  color:#2f6fe4;
}
.main-nav a{
  background:linear-gradient(135deg,#6a7f9f 0%,#8fa6c4 100%);
  border-color:rgba(79,100,132,.16);
  box-shadow:0 10px 22px rgba(79,100,132,.16);
}
.main-nav a:hover{
  box-shadow:0 12px 24px rgba(61,91,144,.18);
}
.btn{
  background:linear-gradient(135deg,#2e69d6 0%,#5998ff 100%);
}
.btn.secondary,
.product-card-actions .btn.secondary,
.inline-add-to-cart-form .btn.secondary{
  background:linear-gradient(135deg,#737e8d 0%,#9aa4b2 100%);
  color:#fff;
  box-shadow:0 10px 20px rgba(88,99,114,.18);
}
.btn.secondary:hover,
.product-card-actions .btn.secondary:hover,
.inline-add-to-cart-form .btn.secondary:hover{
  color:#fff;
  box-shadow:0 12px 22px rgba(88,99,114,.22);
}
.payment-methods-image{
  width:352px;
  max-width:100%;
  height:auto;
  filter:none;
}
.robokassa-logo-original{
  background:#fff;
  border-color:#d3d9e0;
}
@media (max-width:980px){
  .payment-methods-image{width:310px}
}


/* v28: full legal documents from uploaded DOCX files */
.legal-full-doc{max-width:980px;margin-left:auto;margin-right:auto}
.legal-full-doc .muted{border-left:4px solid #93c5fd;padding:10px 14px;background:#f1f5f9;border-radius:12px;color:#64748b}
.legal-full-doc h2{padding-top:10px;border-top:1px solid #e2e8f0;color:#334155}
.legal-full-doc h3{margin:20px 0 8px;font-size:18px;line-height:1.35;color:#475569}
.legal-full-doc p{color:#1f2937}
.legal-full-doc a{color:#2563eb;text-decoration:none}
.legal-full-doc a:hover{text-decoration:underline}


/* v29: согласие на обработку персональных данных в корзине */
.consent-check{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(255,255,255,.72);
  color:var(--muted);
  line-height:1.45;
}
.consent-check input{
  width:18px;
  height:18px;
  margin-top:2px;
  accent-color:var(--accent);
  flex:0 0 auto;
}
.consent-check a{
  color:var(--accent);
  font-weight:800;
  text-decoration:underline;
  text-underline-offset:3px;
}


/* v30-v35 home hero + footer cleanup */
.home-hero-banner{
  display:grid;
  grid-template-columns:minmax(260px, 460px) minmax(0, 1fr) !important;
  align-items:center;
  gap:24px !important;
  padding:20px 24px !important;
  margin:8px 0 18px;
  overflow:hidden !important;
  background:linear-gradient(180deg,#f3f4f7 0%, #eceff3 100%);
}
.home-hero-media,
.home-hero-copy{
  min-width:0 !important;
}
.home-hero-media{
  display:flex;
  align-items:center;
  justify-content:flex-start !important;
  overflow:hidden !important;
}
.home-hero-image{
  width:100% !important;
  max-width:460px !important;
  height:auto !important;
  object-fit:contain !important;
  object-position:center center !important;
  display:block !important;
  border-radius:18px !important;
  box-sizing:border-box !important;
  box-shadow:0 12px 26px rgba(35,55,95,.08);
  filter:none !important;
}
.home-hero-copy{
  display:flex;
  align-items:center;
  min-height:100%;
}
.home-hero-title{
  margin:0;
  font-size:clamp(22px, 2.8vw, 38px) !important;
  max-width:520px !important;
  line-height:1.12 !important;
  letter-spacing:-0.015em !important;
  color:#334257;
  font-weight:900;
}
.footer-brand-clean{
  font-weight:900;
  letter-spacing:.08em;
  color:#6d7682;
}
.consent-check{
  align-items:flex-start;
  line-height:1.45;
}
@media (max-width: 1100px){
  .home-hero-banner{
    grid-template-columns:minmax(220px, 380px) minmax(0, 1fr) !important;
    gap:20px !important;
  }
  .home-hero-title{
    font-size:clamp(21px, 3vw, 32px) !important;
  }
}
@media (max-width: 900px){
  .home-hero-banner{
    grid-template-columns:1fr !important;
    gap:16px !important;
    padding:18px !important;
  }
  .home-hero-media{
    justify-content:center !important;
  }
  .home-hero-image{
    max-width:100% !important;
  }
  .home-hero-copy{
    justify-content:center !important;
    text-align:center !important;
  }
  .home-hero-title{
    font-size:clamp(20px, 4.8vw, 30px) !important;
    max-width:100% !important;
  }
}


/* v36 footer contacts */
.footer-contacts{
  display:grid;
  gap:6px;
  color:#6d7682;
}
.footer-contact-title{
  font-weight:900;
  letter-spacing:.08em;
  color:#5f6875;
  text-transform:uppercase;
  margin-bottom:2px;
}
.footer-contacts a{
  color:#557565;
  font-weight:800;
  text-decoration:none;
}
.footer-contacts a:hover{
  color:#2f6fe4;
  text-decoration:underline;
  text-underline-offset:3px;
}
@media (max-width: 980px){
  .footer-contacts{
    text-align:center;
    justify-items:center;
  }
}

/* TERRAFORTIS brand patch: Robokassa removed */
.footer-brand-message{
  font-size:18px;
  line-height:1.35;
  font-weight:700;
  letter-spacing:.02em;
  text-align:center;
  color:var(--text);
}
@media (max-width:980px){.footer-brand-message{font-size:16px}}
