/* ===== Rubezh — стили (светлая тема) ===== */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f5f0;
  --panel: #ffffff;
  --border: #e6e4d8;
  --forest: #2f5233;
  --forest-dark: #203c25;
  --forest-light: #4c7350;
  --khaki: #9c8657;
  --accent: #d9731c;
  --accent-hover: #c2630f;
  --text: #201f1a;
  --text-dim: #6b6a60;
  --danger: #c0392b;
  --success: #2f7d43;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 2px 10px rgba(30,30,20,.06);
  --shadow-md: 0 10px 30px rgba(30,30,20,.10);
  --maxw: 1240px;
  --font-head: "Oswald", "Arial Narrow", Arial, sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
html { width: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--forest-dark);
  margin: 0 0 0.5em;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */

.header {
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
}
.logo-img {
  height: 52px;
  width: 52px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.main-nav {
  display: flex;
  gap: 24px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}
.main-nav a {
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.main-nav a:hover, .main-nav a.active { color: var(--forest); border-color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 18px; }
.icon-link {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text);
  white-space: nowrap;
  position: relative;
}
.icon-link .icon { width: 20px; height: 20px; flex-shrink: 0; }
.icon-link:hover { color: var(--accent); }
.icon-link .cart-badge { position: absolute; top: -6px; right: -8px; }
.cart-badge {
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 50%; width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
}

.burger {
  display: none;
  background: none; border: 1px solid var(--border); color: var(--text);
  padding: 8px 10px; border-radius: var(--radius-sm); font-size: 18px; cursor: pointer;
}

.icon-link-cart {
  width: 40px; height: 40px; justify-content: center;
  background: var(--bg-soft); border-radius: 50%;
}
.icon-link-cart:hover { background: var(--forest); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 14px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
  text-align: center;
}
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(217,115,28,.28); }
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--forest-dark); border-color: var(--border); }
.btn-outline:hover { border-color: var(--forest); color: var(--forest); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Hero banners (1 large + 2 small, like reference) ---------- */
.hero-banners {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin: 24px 0;
}
.banner {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(140deg, #3a4f2e, #22331c);
  background-size: cover;
  background-position: center;
  color: #fff;
  box-shadow: var(--shadow);
}
.banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,20,10,.05) 0%, rgba(10,15,8,.75) 100%);
}
.banner-content { position: absolute; left: 0; bottom: 0; right: 0; padding: 26px; z-index: 2; }
.banner-large { min-height: 420px; }
.banner-large h1 { color: #fff; font-size: 34px; margin-bottom: 10px; max-width: 420px; line-height: 1.15; }
.banner-large p { color: #e7e9e1; font-size: 15px; margin: 0 0 18px; max-width: 380px; }
.banner-side { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; height: 100%; }
.banner-small { min-height: 0; }
.banner-tag { display: inline-block; font-size: 12px; color: #d9e3d5; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.banner-small h3 { color: #fff; font-size: 19px; margin: 0; }

/* ---------- Brands section ---------- */
.brands-section .section-head { align-items: center; }
.brands-arrows { display: flex; gap: 8px; }
.brands-arrow {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font-size: 18px; color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.brands-arrow:hover { background: var(--forest); color: #fff; border-color: var(--forest); }
.brands-row {
  display: flex; gap: 16px; overflow-x: auto; scroll-behavior: smooth;
  padding-bottom: 4px; scrollbar-width: none;
}
.brands-row::-webkit-scrollbar { display: none; }
.brand-card {
  flex: 0 0 calc((100% - 4 * 16px) / 5);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 100px;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.brand-card img { max-height: 44px; max-width: 100%; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .15s, opacity .15s; }
.brand-card:hover img { filter: none; opacity: 1; }
.brand-name { font-family: var(--font-head); text-transform: uppercase; color: var(--text-dim); letter-spacing: .04em; }

/* ---------- Category strip (horizontal scroll, square photos) ---------- */
.cat-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.cat-strip::-webkit-scrollbar { display: none; }
.cat-card {
  flex: 0 0 calc((100% - 4 * 16px) / 5);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  transition: box-shadow .15s, transform .15s, border-color .15s;
  box-shadow: var(--shadow);
}
.cat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--forest-light); }
.cat-card-img {
  aspect-ratio: 1/1;
  background: linear-gradient(150deg, #eef2ea, #f7f5ee);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.cat-card-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.cat-card h3 { font-size: 14px; margin: 0; padding: 14px 10px; color: var(--text); }
.thumb-placeholder { font-size: 30px; opacity: .5; }

/* ---------- Section ---------- */
.section { padding-top: 46px; padding-bottom: 46px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 22px; flex-wrap: wrap; gap: 10px;
}
.section-head h2 { margin: 0; font-size: 26px; }
.section-head a { color: var(--accent); font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Product grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.card-product {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s, transform .15s, border-color .15s;
  box-shadow: var(--shadow);
}
.card-product:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: var(--forest-light); }
.card-product .thumb {
  aspect-ratio: 4/5;
  background: linear-gradient(150deg, #eef2ea, #f7f5ee);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: 13px; text-align: center; padding: 10px;
  position: relative;
}
.card-product .thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.badge-sale {
  position: absolute; top: 10px; left: 10px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 3px; text-transform: uppercase;
}
.badge-out {
  position: absolute; top: 10px; left: 10px;
  background: #7d7d70; color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 3px; text-transform: uppercase;
}
.card-body { padding: 14px 14px 16px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.card-body .cat-label { font-size: 11px; color: var(--forest); text-transform: uppercase; letter-spacing: .05em; }
.card-body h3 { font-size: 15px; margin: 0; text-transform: none; letter-spacing: 0; line-height: 1.3; flex: 1; color: var(--text); }
.price-row { display: flex; align-items: baseline; gap: 8px; }
.price { font-family: var(--font-head); font-size: 19px; color: var(--forest-dark); }
.price-old { font-size: 13px; color: var(--text-dim); text-decoration: line-through; }

/* ---------- Filters / catalog layout ---------- */
.catalog-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; flex-wrap: wrap; gap: 12px; }
.filter-toggle { display: flex; align-items: center; gap: 8px; }

.filter-overlay {
  position: fixed; inset: 0; background: rgba(20,20,15,.45);
  z-index: 190; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.filter-overlay.open { opacity: 1; pointer-events: auto; }

.filter-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 320px; max-width: 88vw;
  background: #fff; z-index: 200; padding: 22px; overflow-y: auto;
  transform: translateX(-100%); transition: transform .25s ease;
  box-shadow: var(--shadow-md);
}
.filter-drawer.open { transform: translateX(0); }
.filter-drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.filter-drawer-head h3 { margin: 0; font-size: 18px; }
.filter-drawer-close {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
  background: none; cursor: pointer; font-size: 15px; color: var(--text);
}
.filter-drawer-close:hover { background: var(--bg-soft); }
.filter-drawer-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

.filter-dropdown { border-top: 1px solid var(--border); padding: 12px 0; }
.filter-dropdown summary {
  cursor: pointer; font-family: var(--font-head); font-size: 13px; letter-spacing: .03em;
  color: var(--forest-dark); text-transform: uppercase; list-style: none;
}
.filter-dropdown summary::-webkit-details-marker { display: none; }
.filter-dropdown summary::after { content: "+"; float: right; font-size: 16px; }
.filter-dropdown[open] summary::after { content: "–"; }
.filter-dropdown .filter-checks { margin-top: 10px; max-height: 220px; overflow-y: auto; }

/* ---------- Product detail / gallery ---------- */
.product-view { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.gallery-main {
  aspect-ratio: 1/1;
  background: linear-gradient(150deg, #eef2ea, #f7f5ee);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); overflow: hidden; position: relative;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumb {
  width: 70px; height: 70px; padding: 0; border-radius: var(--radius-sm);
  border: 2px solid var(--border); overflow: hidden; cursor: pointer; background: none;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active { border-color: var(--accent); }

.product-info .cat-label { color: var(--forest); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.product-info h1 { font-size: 30px; margin: 6px 0 16px; }
.product-info .price-row { margin-bottom: 18px; }
.product-info .price { font-size: 32px; }
.product-info .descr { color: var(--text-dim); margin-bottom: 24px; }
.size-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.size-list label { position: relative; }
.size-list input { position: absolute; opacity: 0; }
.size-list span {
  display: inline-block; padding: 9px 15px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; font-size: 14px;
}
.size-list input:checked + span { border-color: var(--accent); background: var(--accent); color: #fff; }
.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.qty-row input[type=number] {
  width: 70px; padding: 10px; background: var(--bg-soft); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm); text-align: center;
}

/* ---------- Forms ---------- */
.form-box {
  max-width: 480px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.form-wide { max-width: 100%; }
label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .03em; }
.field { margin-bottom: 16px; }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=url], input[type=file], textarea, select {
  width: 100%; padding: 11px 12px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 15px;
  font-family: var(--font-body);
}
input[type=file] { padding: 9px 10px; background: var(--bg-soft); }
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--forest-light); }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.checkbox-row input { width: auto; }
.checkbox-row label { margin: 0; text-transform: none; font-size: 14px; color: var(--text); }
.form-foot { margin-top: 18px; font-size: 14px; color: var(--text-dim); text-align: center; }
.form-foot a { color: var(--accent); }

/* ---------- Image manager (admin uploads) ---------- */
.image-manager { display: flex; gap: 12px; flex-wrap: wrap; }
.image-manager-item {
  width: 110px; text-align: center; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px; background: #fff;
}
.image-manager-item img { width: 100%; height: 80px; object-fit: cover; border-radius: 4px; margin-bottom: 6px; }
.image-manager-remove { font-size: 12px; color: var(--danger); display: flex; align-items: center; gap: 4px; justify-content: center; }
.image-manager-remove input { width: auto; margin: 0; }

.admin-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.admin-thumb-empty { background: var(--bg-soft); }

/* ---------- Flash messages ---------- */
.flash-wrap { padding-top: 16px; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 10px; font-size: 14px; }
.flash-success { background: #eaf6ec; border: 1px solid var(--success); color: #1f5c30; }
.flash-error { background: #fdecea; border: 1px solid var(--danger); color: #8f2a20; }

/* ---------- Cart ---------- */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.cart-table th { text-align: left; font-size: 12px; text-transform: uppercase; color: var(--text-dim); padding: 10px 8px; border-bottom: 1px solid var(--border); }
.cart-table td { padding: 14px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-row-name { display: flex; gap: 12px; align-items: center; }
.cart-thumb { width: 60px; height: 60px; background: var(--bg-soft); border-radius: var(--radius-sm); flex-shrink: 0; border: 1px solid var(--border); overflow: hidden; }
.cart-qty-input { width: 60px; padding: 6px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm); text-align: center; }
.cart-summary { display: flex; justify-content: flex-end; }
.cart-summary-box { width: 100%; max-width: 340px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.cart-summary-box .row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 15px; }
.cart-summary-box .total { font-size: 20px; font-family: var(--font-head); color: var(--forest-dark); border-top: 1px solid var(--border); padding-top: 12px; margin-top: 6px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-dim); }

/* ---------- Checkout ---------- */
.checkout-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; align-items: start; }
.order-summary { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.order-summary .line { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.order-summary .total { font-size: 18px; font-family: var(--font-head); padding-top: 12px; color: var(--forest-dark); }

/* ---------- Tables (admin) ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
table.data th, table.data td { padding: 11px 12px; border-bottom: 1px solid var(--border); font-size: 14px; text-align: left; }
table.data th { text-transform: uppercase; font-size: 12px; color: var(--text-dim); background: var(--bg-soft); }
table.data tr:last-child td { border-bottom: none; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; text-transform: uppercase; }
.pill-new { background: #fff3e8; color: var(--accent); }
.pill-done { background: #eaf6ec; color: var(--success); }
.pill-cancel { background: #fdecea; color: var(--danger); }

/* ---------- Admin layout ---------- */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 30px; min-height: 70vh; }
.admin-sidebar { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; align-self: start; }
.admin-sidebar a {
  display: block; padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 4px;
  font-size: 14px; color: var(--text-dim);
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--forest); color: #fff; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; flex-wrap: wrap; gap: 10px; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 30px; }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat-card .num { font-family: var(--font-head); font-size: 30px; color: var(--forest-dark); }
.stat-card .label { color: var(--text-dim); font-size: 13px; text-transform: uppercase; }
.actions-row { display: flex; gap: 8px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--forest-dark);
  padding: 44px 0 24px;
  margin-top: 40px;
  color: #cddccf;
  font-size: 14px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.footer h4 { color: #fff; font-size: 14px; margin-bottom: 10px; }
.footer a { color: #cddccf; display: block; margin-bottom: 6px; }
.footer a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 16px; font-size: 13px; text-align: center; }

/* ---------- Catalog filter form ---------- */
.filter-form { margin-top: 0; padding-top: 0; }
.filter-title { font-size: 12px; margin: 14px 0 8px; color: var(--forest-dark); }
.price-range-row { display: flex; gap: 8px; }
.price-range-row input { padding: 8px 10px; font-size: 14px; }
.filter-checks { display: flex; flex-direction: column; gap: 8px; }
.filter-check { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); text-transform: none; cursor: pointer; }
.filter-check input { width: auto; margin: 0; }
.btn-block.btn-sm { width: 100%; }

/* ---------- Admin size manager ---------- */
.size-manager { display: flex; flex-direction: column; gap: 8px; }
.size-manager-row {
  display: flex; align-items: center; gap: 16px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px;
  background: var(--bg-soft);
}
.size-manager-label { font-family: var(--font-head); min-width: 60px; }
.size-disabled span em { color: var(--danger); font-style: normal; font-size: 11px; margin-left: 4px; }
.size-disabled input { opacity: .5; }

/* ---------- Legal / info pages ---------- */
.legal-content {
  max-width: 760px; margin: 0 auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px 40px; box-shadow: var(--shadow);
}
.legal-content h1 { font-size: 26px; }
.legal-content h2 { font-size: 17px; }
.legal-content h3 { font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--text); }
.legal-content p, .legal-content li { color: var(--text-dim); font-size: 15px; }
.legal-content ul { padding-left: 20px; }
.legal-contacts { background: var(--bg-soft); border-radius: var(--radius); padding: 18px 20px; }
.footer-bottom { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.footer-bottom a { color: #cddccf; margin: 0; }
.footer-bottom a:hover { color: var(--accent); }
.footer-dot { color: rgba(255,255,255,.3); }

/* ---------- Auth extras ---------- */
.auth-divider { display: flex; align-items: center; text-align: center; color: var(--text-dim); font-size: 12px; margin: 16px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { padding: 0 10px; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; }

/* ---------- Склад / деньги / статистика (админка) ---------- */
.muted { color: var(--text-dim); }
.text-pos { color: var(--success) !important; }
.text-neg { color: var(--danger) !important; }
.dash-title { font-size: 15px; margin: 22px 0 10px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 8px; }
.stat-card .num small { font-size: 14px; color: var(--text-dim); font-family: var(--font-body); }
.stat-card .sub { color: var(--text-dim); font-size: 13px; margin: 2px 0 6px; }
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.admin-sidebar-sep { height: 1px; background: var(--border); margin: 10px 4px; }
.notice { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 14px; }
.notice-warn { background: #fff6e8; border: 1px solid #f0c98a; color: #7a4a0c; }
.notice a { color: var(--accent); margin-left: 6px; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter-bar input, .filter-bar select { width: auto; min-width: 160px; padding: 8px 10px; font-size: 14px; }
.chip { display: inline-block; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 20px; padding: 2px 10px; font-size: 12px; margin: 2px 4px 2px 0; white-space: nowrap; }
.chip-zero { color: var(--text-dim); background: #fff; border-style: dashed; }
.radio-row { display: flex; align-items: center; gap: 8px; text-transform: none; font-size: 14px; color: var(--text); margin-bottom: 8px; cursor: pointer; }
.radio-row input { width: auto; margin: 0; }
.hint { font-size: 12px; color: var(--text-dim); margin-top: 5px; }
.hint a { color: var(--accent); }
.price-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 14px 2px; margin-bottom: 16px; background: var(--bg-soft); }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.qty-table input { width: 110px; padding: 7px 9px; }
.finance-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 16px; }
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.section-head a.btn-accent, .section-head a.btn-accent:hover { color: #fff; text-transform: uppercase; font-size: 12px; letter-spacing: .05em; }
.section-head a.btn-outline { color: var(--forest-dark); text-transform: uppercase; font-size: 12px; letter-spacing: .05em; }
.section-head a.btn-outline:hover { color: var(--forest); }
.sync-box { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; font-size: 13px; }
.stock-table td { vertical-align: top; }
.stock-table .actions-row { flex-wrap: wrap; }
.bar-chart { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 210px; gap: 12px; align-items: center; font-size: 13px; }
.bar-label { color: var(--text-dim); }
.bar-track { position: relative; height: 22px; background: var(--bg-soft); border-radius: 4px; overflow: hidden; }
.bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.bar-rev { background: #cfe0cf; }
.bar-profit { background: var(--forest); height: 40%; top: 30%; }
.bar-value { white-space: nowrap; }
.bar-legend { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 10px; }
.dot-rev { background: #cfe0cf; }
.dot-profit { background: var(--forest); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .brand-card { flex: 0 0 calc((100% - 2 * 16px) / 3); }
  .cat-card { flex: 0 0 calc((100% - 2 * 16px) / 3); }
  .filter-drawer { width: 300px; }
  .product-view { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 180px 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .hero-art { display: none; }
  .hero-banners { grid-template-columns: 1fr; }
  .banner-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; height: auto; }
  .banner-small { min-height: 190px; }
  .banner-large { min-height: 320px; }
}

@media (max-width: 760px) {
  .hero { padding: 44px 0; }
  .hero h1 { font-size: 30px; }
  .main-nav { display: none; }
  .burger { display: inline-block; }
  .header-actions { gap: 8px; }
  .icon-link span { display: none; }
  .icon-link { gap: 0; }
  .logo-img { height: 42px; width: 42px; }
  .main-nav.open {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border); padding: 10px 20px 16px; gap: 4px;
    box-shadow: var(--shadow-md);
  }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .brand-card { flex: 0 0 calc((100% - 16px) / 2); height: 80px; }
  .cat-card { flex: 0 0 calc((100% - 16px) / 2); }
  .filter-drawer { width: 280px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: flex; flex-wrap: wrap; gap: 6px; }
  .admin-sidebar a { flex: 1; text-align: center; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cart-table thead { display: none; }
  .cart-table td { display: block; border-bottom: none; padding: 4px 8px; }
  .cart-table tr { display: block; border-bottom: 1px solid var(--border); padding: 12px 0; }
  .section-head h2 { font-size: 20px; }
  .feature-strip { grid-template-columns: 1fr; }
  .banner-small { min-height: 160px; }
  .banner-large { min-height: 260px; }
}

@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero h1 { font-size: 24px; }
  .logo { font-size: 22px; }
  .form-box { padding: 22px; }
  .legal-content { padding: 22px; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .finance-grid { grid-template-columns: 1fr 1fr; }
  .split-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .finance-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 70px 1fr; }
  .bar-value { grid-column: 1 / -1; padding-left: 0; }
  .filter-bar select, .filter-bar input { min-width: 0; flex: 1 1 140px; }
}

/* Админка на телефоне: таблицы и карточки не должны раздвигать страницу */
.admin-layout > * { min-width: 0; }
.kpi-grid > *, .stat-cards > *, .split-2 > *, .finance-grid > * { min-width: 0; }
@media (max-width: 760px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-sidebar a { flex: 1 1 auto; padding: 8px 10px; }
  .stat-card .num { font-size: 22px; }
  .quick-actions .btn { flex: 1 1 auto; }
  table.data th, table.data td { padding: 9px 8px; font-size: 13px; }
  .section-head { align-items: flex-start; }
}

/* ---------- Предзаказ ---------- */
[hidden] { display: none !important; }
.size-out span { border-style: dashed; color: var(--text-dim); }
.size-out span em { color: var(--accent); font-style: normal; font-size: 11px; margin-left: 4px; }
.size-list input:checked + span em { color: #fff; }
.size-out input:checked + span { color: #fff; }
.preorder-note { background: #fff6e8; border: 1px solid #f0c98a; color: #7a4a0c; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; margin: 0 0 16px; }
.preorder-layout { display: grid; grid-template-columns: 340px 1fr; gap: 30px; align-items: start; max-width: 980px; margin: 0 auto; }
.preorder-product { display: flex; flex-direction: column; gap: 14px; }
.preorder-thumb { aspect-ratio: 1/1; background: linear-gradient(150deg, #eef2ea, #f7f5ee); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.preorder-thumb img { width: 100%; height: 100%; object-fit: cover; }
.side-badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; text-align: center; margin-left: 4px; }
@media (max-width: 760px) {
  .preorder-layout { grid-template-columns: minmax(0, 1fr); }
  .preorder-thumb { max-width: 260px; }
}
