:root {
  --blue: #1f4fd8;
  --blue-2: #163db0;
  --blue-soft: #eef3ff;
  --ink: #1a1a1a;
  --muted: #5a5a5a;
  --line: #ebebeb;
  --bg: #f6f7fb;
  --card: #fff;
  --green: #1a7a3c;
  --star: #f0b429;
  --price: #1a1a1a;
  --was: #7a7a7a;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
.wrap { width: min(1240px, calc(100% - 24px)); margin-inline: auto; }

.prebar {
  background: #f3f3f3;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: #333;
}
.prebar .wrap { display: flex; justify-content: flex-end; gap: 16px; min-height: 32px; align-items: center; }
.land a { color: #333; margin-left: 8px; padding: 2px 8px; border-radius: 99px; text-decoration: none; }
.land a.on { background: var(--blue); color: #fff; font-weight: 700; }
.prebar a { color: #333; }

.welcome {
  background: linear-gradient(135deg, #1f4fd8 0%, #5b7cff 100%);
  color: #fff;
  border-radius: 20px;
  padding: 22px 24px;
  margin: 16px auto 8px;
}
.welcome h1 { margin: 4px 0 8px; font-size: 28px; line-height: 1.2; }
.welcome p { margin: 0; opacity: .95; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.header { background: #fff; border-bottom: 1px solid var(--line); }
.header-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  min-height: 76px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  color: var(--blue); font-weight: 800; font-size: 28px;
  letter-spacing: -.04em; text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue);
  display: grid; place-items: center;
}
.logo-mark span {
  width: 14px; height: 14px; border-radius: 50%; background: #fff;
}
.search {
  display: flex; height: 44px;
  border: 2px solid var(--blue); border-radius: 24px; overflow: hidden; background: #fff;
}
.search input {
  flex: 1; border: 0; padding: 0 16px; outline: none; min-width: 0;
}
.search button {
  width: 52px; border: 0; background: var(--blue); color: #fff; cursor: pointer;
}
.search button:hover { background: var(--blue-2); }
.actions { display: flex; gap: 8px; }
.action {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 72px; color: var(--ink); text-decoration: none; font-size: 12px; position: relative;
}
.action:hover { text-decoration: none; color: var(--blue); }
.action b { font-size: 18px; line-height: 1; }
.badge {
  position: absolute; top: 0; right: 10px;
  background: var(--blue); color: #fff; border-radius: 99px;
  min-width: 18px; height: 18px; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; padding: 0 4px;
}

.catbar { background: #fff; border-bottom: 1px solid var(--line); }
.catbar .wrap { display: flex; gap: 18px; overflow: auto; min-height: 44px; align-items: center; }
.catbar a, .catbar button {
  border: 0; background: none; padding: 0; color: var(--ink);
  white-space: nowrap; cursor: pointer; font-weight: 600;
}
.catbar a:hover, .catbar button:hover { color: var(--blue); text-decoration: none; }

.promo-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; padding: 16px 0 8px; }
.promo {
  min-height: 132px; border-radius: 12px; padding: 20px;
  color: #fff; display: flex; flex-direction: column; justify-content: center;
}
.promo h2 { margin: 4px 0 8px; font-size: 22px; }
.promo p { margin: 0; opacity: .9; }
.promo a, .promo span { font-weight: 700; color: #fff; }
.p1 { background: linear-gradient(135deg, #0033cc, #6a8cff); }
.p2 { background: linear-gradient(135deg, #111827, #334155); }
.p3 { background: linear-gradient(135deg, #0b7a2b, #22a34a); }

.block { padding: 18px 0 28px; }
.shop { display: grid; grid-template-columns: 252px 1fr; gap: 28px; align-items: start; }
.sidebar {
  position: sticky; top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 14px 14px 18px;
}
.sidebar h3 { margin: 0 0 10px; font-size: 16px; }
.side-group { border-top: 1px solid #f0f0f0; padding: 12px 0 4px; }
.side-scroll { max-height: 220px; overflow: auto; padding-right: 4px; }
.brand-search {
  width: 100%; height: 36px; margin: 0 0 8px;
  border: 1px solid #ccc; border-radius: 8px; padding: 0 10px;
}
.brand-search:focus { outline: 2px solid var(--blue-soft); border-color: var(--blue); }
.price-range { display:flex; gap:6px; align-items:center; margin-top:8px; }
.price-range input { width:100%; height:34px; border:1px solid #ccc; border-radius:6px; padding:0 8px; }
.side-option {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 4px 0; cursor: pointer; color: #222;
}
.side-option input { margin-top: 3px; accent-color: var(--blue); }
.side-option .count { color: var(--muted); margin-left: auto; font-size: 12px; }
.side-range { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; margin-top: 8px; }
.side-range input {
  width: 100%; height: 34px; border: 1px solid #ccc; border-radius: 6px; padding: 0 8px;
}
.side-range button {
  height: 34px; border: 0; border-radius: 6px; background: var(--blue); color: #fff; padding: 0 10px; cursor: pointer;
}
.reset-filters {
  width: 100%; margin-top: 12px; height: 36px;
  border: 1px solid #cfcfcf; background: #fff; border-radius: 8px; cursor: pointer;
}
.filter-toggle {
  display: none;
  margin-bottom: 10px; height: 40px; width: 100%;
  border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; font-weight: 700;
}
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue-soft); color: var(--blue-2);
  border-radius: 99px; padding: 5px 10px; font-size: 12px; font-weight: 700; border: 0; cursor: pointer;
}
.result-tools { display: flex; align-items: center; gap: 16px; }
.sort { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sort select { height: 34px; border: 1px solid #ccc; border-radius: 6px; padding: 0 8px; background: #fff; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.block-head h2 { font-size: 22px; margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 99px;
  padding: 7px 12px; cursor: pointer;
}
.chip.on { border-color: var(--blue); color: var(--blue); font-weight: 700; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  color: inherit; text-decoration: none;
}
.card { content-visibility: auto; contain-intrinsic-size: 320px; }
.card-img {
  height: 190px; background: #fff; display: grid; place-items: center;
  border-bottom: 1px solid #f2f2f2;
}
.card-img img { max-width: 78%; max-height: 160px; object-fit: contain; }
.gallery img { max-width: 100%; max-height: 420px; object-fit: contain; }
.card-body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.chat-toggle {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  height: 46px; padding: 0 16px; border: 0; border-radius: 999px;
  background: var(--blue); color: #fff; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 24px rgba(31,79,216,.28);
}
.chat-panel {
  position: fixed; right: 18px; bottom: 72px; z-index: 40;
  width: min(340px, calc(100vw - 24px)); height: 420px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.12);
}
.chat-panel[hidden], .chat-toggle[hidden], .chat-show[hidden], #chat-widget.is-off { display: none !important; }
.chat-head { background: var(--blue); color: #fff; padding: 12px 14px; font-weight: 700; display:flex; justify-content:space-between; align-items:center; }
.chat-actions { display:flex; gap:4px; }
.chat-show {
  position: fixed; right: 0; bottom: 120px; z-index: 40;
  border: 0; background: var(--blue); color: #fff;
  padding: 10px 8px; border-radius: 8px 0 0 8px; cursor: pointer; font-weight: 700;
}
.chat-end-bottom {
  border:0; background:#f3f3f3; color:#333; padding:10px; cursor:pointer; font-weight:700;
}
.chat-log { flex: 1; overflow: auto; padding: 12px; background: #f7f8fb; }
.bubble { background: #fff; border-radius: 12px; padding: 8px 10px; margin: 0 0 8px; max-width: 90%; }
.bubble b { display: block; font-size: 11px; color: var(--muted); }
.bubble.me { margin-left: auto; background: var(--blue-soft); }
#chat-form { display: flex; border-top: 1px solid var(--line); }
#chat-form input { flex: 1; border: 0; padding: 12px; outline: none; }
#chat-form button { border: 0; background: var(--blue); color: #fff; padding: 0 14px; cursor: pointer; }
@media(max-width:800px){.two{grid-template-columns:1fr}}
table.admin{width:100%;border-collapse:collapse;background:#fff}
table.admin th,table.admin td{text-align:left;padding:8px;border-bottom:1px solid #eee;font-size:13px}
.summary .lead-form label { display: block; margin: 8px 0; font-size: 13px; }
.summary .lead-form input, .summary .lead-form select {
  width: 100%; height: 38px; border: 1px solid #ccc; border-radius: 8px; padding: 0 10px;
}
.pager button { height: 36px; padding: 0 14px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; }
.pager button:disabled { opacity: .4; cursor: default; }
.card-title { font-size: 14px; font-weight: 400; margin: 0; color: var(--ink); min-height: 40px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-img { height: 160px; }
.stars { color: var(--star); letter-spacing: 1px; font-size: 12px; }
.stars span { color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.price { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.was { color: var(--was); text-decoration: line-through; font-weight: 400; font-size: 13px; margin-left: 6px; }
.ship { color: var(--green); font-weight: 700; font-size: 13px; }
.sold { color: var(--muted); font-size: 12px; }

.usps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  background: var(--bg); border-radius: 12px; padding: 16px !important; margin-bottom: 28px;
}
.usps div { display: flex; flex-direction: column; gap: 2px; }
.usps span { color: var(--muted); }

.footer { background: var(--bg); border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.footer h3 { margin: 0 0 8px; font-size: 14px; }
.footer a { display: block; color: #222; margin: 6px 0; }
.footer .logo { font-size: 22px; margin-bottom: 8px; }

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 32px;
  align-items: start;
  padding: 20px 0 48px;
}
.crumb { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--blue); }
.gallery {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 380px;
  display: grid;
  place-items: center;
  padding: 28px;
}
.gallery img {
  max-width: 100%;
  max-height: 460px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.product-desc, .specs-block, .seo-copy {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 16px 0 0;
}
.product-desc h2, .specs-block h2, .seo-copy h2 {
  font-size: 18px;
  margin: 0 0 12px;
  font-weight: 800;
}
.product-desc p, .seo-copy p {
  margin: 0;
  color: #333;
  line-height: 1.55;
  font-size: 15px;
}
.buy {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  background: #fff;
  position: sticky;
  top: 12px;
}
.buy h1 { font-size: 22px; line-height: 1.3; margin: 4px 0 8px; font-weight: 800; }
.brand { color: var(--blue); font-weight: 700; text-decoration: none; }
.ean { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.price-lg { font-size: 30px; font-weight: 800; margin: 12px 0 6px; letter-spacing: -.03em; }
.price-lg .was { margin-left: 8px; font-size: 16px; }
.qty { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.qty label { font-weight: 700; font-size: 14px; }
.qty input {
  width: 72px; height: 44px; padding: 0 10px;
  border: 1px solid #ccc; border-radius: 8px; font-size: 16px;
}
.btn-cart {
  width: 100%; height: 48px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--blue); color: #fff; font-weight: 700; font-size: 16px;
}
.btn-cart:hover { background: var(--blue-2); }
table.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
table.specs th, table.specs td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid #eee; vertical-align: top;
}
table.specs tr:nth-child(odd) { background: #fafafa; }
table.specs th { width: 38%; color: #555; font-weight: 700; }
.bullets { margin: 12px 0 0; padding-left: 18px; }
@media (max-width: 900px) {
  .product-layout { grid-template-columns: 1fr; gap: 16px; }
  .buy { position: static; }
}
.btn-cart:hover { background: var(--blue-2); }
.btn-ghost {
  width: 100%; height: 44px; margin-top: 8px; border: 1px solid #cfcfcf;
  background: #fff; border-radius: 8px; cursor: pointer;
}
.ok { color: var(--green); font-weight: 700; margin-top: 10px; }
.offers { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.offer { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f1f1f1; }
.offer.on { background: var(--blue-soft); margin: 0 -8px; padding: 8px; border-radius: 8px; }
.specs { margin-top: 16px; }
.specs table { width: 100%; border-collapse: collapse; }
.specs td { padding: 8px 0; border-bottom: 1px solid #f1f1f1; }
.specs td:first-child { color: var(--muted); width: 40%; }
.bullets { margin: 8px 0 12px; padding-left: 18px; }
.bullets li { margin: 4px 0; }
.prose { max-width: 70ch; color: #222; }

.cart-layout { padding: 20px 0 48px; }
.cart-grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: 20px; }
@media (max-width: 800px) { .cart-grid { grid-template-columns: 1fr; } }
.cart-list, .summary { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.cart-row { display: grid; grid-template-columns: 88px 1fr auto; gap: 12px; padding: 16px; border-bottom: 1px solid #f1f1f1; }
.cart-row img { width: 88px; height: 88px; object-fit: contain; }
.summary { padding: 16px; height: max-content; }
.summary .price { margin: 8px 0 16px; }

.sell-layout { padding: 20px 0 48px; max-width: 900px; }
.lead { font-size: 16px; color: #333; }
.sell-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.sell-cards article, .lead-form {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fff;
}
.lead-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px 14px;
  max-width: 640px;
}
.lead-form label, .checkout-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #222;
}
.lead-form input,
.lead-form select,
.lead-form textarea,
.checkout-form input,
.checkout-form select {
  width: 100%;
  height: 42px;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  background: #fff;
  box-sizing: border-box;
}
.is-invalid { border-color: #c0392b !important; background: #fff5f5 !important; }
.checkout-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: none;
}
.checkout-form .full { grid-column: 1 / -1; }
.summary .lead-form, .summary .checkout-form { margin-top: 12px; }
@media (max-width: 800px) {
  .checkout-form { grid-template-columns: 1fr; }
}
.note { color: var(--muted); }
.empty { color: var(--muted); padding: 24px 0; }

.reviews { padding-bottom: 40px; }
.review-summary {
  display: grid; grid-template-columns: 180px 1fr; gap: 24px;
  border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fff;
  margin-bottom: 16px;
}
.bars { display: grid; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 32px 1fr; gap: 8px; align-items: center; font-size: 12px; }
.bar { height: 8px; background: #eee; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--star); }
.review-tools { margin: 0 0 12px; }
.review {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; margin-bottom: 10px;
}
.review-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.review h3 { margin: 6px 0; font-size: 16px; }
.verified {
  background: #e8f6ec; color: var(--green); font-size: 11px; font-weight: 700;
  border-radius: 99px; padding: 2px 8px;
}
.review-form {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fff;
  display: grid; gap: 10px; margin-top: 16px;
}
.review-form input, .review-form select, .review-form textarea {
  width: 100%; border: 1px solid #ccc; border-radius: 6px; padding: 8px 10px; font: inherit;
}
.review-form textarea { min-height: 90px; }
.reco-lead { color: var(--muted); margin: 0 0 14px; font-size: 13px; }
.reco-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.reco-card .why { color: var(--blue); font-size: 12px; font-weight: 700; margin: 0; }
.reco-ai {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue-soft); color: var(--blue-2);
  border-radius: 99px; padding: 4px 10px; font-size: 12px; font-weight: 700;
  margin-bottom: 8px;
}

@media (max-width: 980px) {
  .header-row { grid-template-columns: auto 1fr; }
  .actions { grid-column: 1 / -1; justify-content: flex-end; }
  .promo-row, .cards, .usps, .footer-grid, .cart-grid, .sell-cards, .review-summary {
    grid-template-columns: 1fr 1fr;
  }
  .shop { grid-template-columns: 1fr; }
  .sidebar { position: static; display: none; }
  .sidebar.open { display: block; margin-bottom: 14px; }
  .filter-toggle { display: block; }
  .reco-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { width: min(1240px, calc(100% - 16px)); }
  .header-row { grid-template-columns: auto 1fr; gap: 10px; min-height: 64px; }
  .logo { font-size: 20px; }
  .logo-mark { width: 28px; height: 28px; }
  .actions { gap: 4px; }
  .action { min-width: 56px; font-size: 11px; }
  .search { height: 40px; }
  .welcome { padding: 16px; border-radius: 14px; margin: 10px auto 6px; }
  .welcome h1 { font-size: 22px; }
  .promo-row, .cards, .usps, .footer-grid, .product-layout, .cart-grid, .sell-cards, .header-row, .reco-row, .review-summary {
    grid-template-columns: 1fr;
  }
  .cards { gap: 10px; }
  .card-img { height: 220px; }
  .buy { position: static; }
  .gallery { min-height: 240px; padding: 16px; }
  .gallery img { max-height: 280px; }
  .buy h1 { font-size: 20px; }
  .price-lg { font-size: 26px; }
  .chat-panel { right: 8px; left: 8px; width: auto; bottom: 64px; height: 70vh; }
  .chat-toggle { right: 12px; bottom: 12px; }
  table.specs th { width: 36%; }
  .cart-row { grid-template-columns: 72px 1fr; }
  .cart-row > div:last-child { grid-column: 2; }
}

.subcats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px auto 0;
}
.subcat {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #fff;
  color: #222;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.subcat:hover, .subcat.on { background: var(--blue-soft); color: var(--blue); border-color: #c9d6ff; }
.product-desc { margin: 18px 0 8px; }
.product-desc h2, .specs-block h2 { font-size: 20px; margin: 0 0 10px; }
.product-desc p { color: #333; line-height: 1.5; }
.specs-block h2 { font-size: 18px; margin: 0 0 10px; }
table.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
table.specs th, table.specs td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.specs th { width: 42%; color: #555; font-weight: 600; background: #fafafa; }
.seo-copy h2{font-size:18px;margin:0 0 8px}
.seo-copy p{color:#444;font-size:14px;line-height:1.45}
