@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-2: #f2f6fc;
  --color-border: #e1e7f2;
  --color-text: #1a2338;
  --color-muted: #667088;
  --color-accent: #2f7de1;
  --color-accent-hover: #1f63bd;
  --color-accent-light: rgba(47,125,225,0.08);
  --color-cta: #1a4fb4;
  --color-cta-hover: #163f8f;
  --color-cta-light: rgba(26,79,180,0.15);
  --color-danger: #dc2626;
  --color-success: #16a34a;
  --color-brand-blue: #4a86e0;
  --color-brand-blue-dark: #3a6fc4;
  --radius: 3px;
  --radius-lg: 5px;
  --font-head: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.5;
}
body > main, body > .layout { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
ul { list-style: none; margin: 0; padding: 0; }
button, input, select { font-family: inherit; font-size: inherit; }
input, select, textarea { background: var(--color-surface); color: var(--color-text); }
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.no-scroll { overflow: hidden; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; margin: 0 0 12px; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  background: var(--color-brand-blue);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 20px;
  flex-wrap: wrap;
}
.logo { display: flex; align-items: center; font-family: var(--font-head); font-weight: 800; font-size: 20px; color: #fff; background: #fff; padding: 8px 20px; border-radius: var(--radius); }
.logo-img { height: 52px; width: auto; display: block; object-fit: contain; }
.header-search { flex: 1; min-width: 200px; display: flex; background: #fff; border-radius: var(--radius); overflow: hidden; }
.header-search input { flex: 1; border: none; padding: 9px 12px; outline: none; background: transparent; color: var(--color-text); }
.search-btn { border: none; background: var(--color-surface-2); padding: 0 14px; cursor: pointer; color: var(--color-muted); display: flex; align-items: center; }
.search-btn:hover { color: var(--color-accent); }
.header-nav { display: flex; gap: 18px; }
.header-nav a { position: relative; font-weight: 600; font-size: 14px; color: #fff; opacity: .92; padding-bottom: 4px; }
.header-nav a:hover { opacity: 1; text-decoration: underline; }
.header-nav a.active { opacity: 1; font-weight: 800; }
.header-nav a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: #fff; border-radius: 2px;
}
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-switcher { display: flex; border: 1px solid rgba(255,255,255,0.5); border-radius: var(--radius); overflow: hidden; }
.lang-switcher button { border: none; background: transparent; padding: 6px 10px; cursor: pointer; font-weight: 700; font-size: 12px; color: #fff; opacity: .8; }
.lang-switcher button.active { background: #fff; color: var(--color-brand-blue-dark); opacity: 1; }
.cart-open-btn { position: relative; border: none; background: none; cursor: pointer; color: #fff; display: flex; align-items: center; padding: 4px; }
.cart-open-btn:hover { opacity: .85; }
.cart-badge { position: absolute; top: -6px; right: -8px; background: #ff5a3c; color: #fff; border-radius: 50%; font-size: 11px; min-width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; padding: 0 3px; }
.menu-toggle { display: none; border: none; background: none; font-size: 22px; cursor: pointer; color: #fff; }

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn-primary, .btn-cart, .btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 20px; border-radius: var(--radius); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em;
  cursor: pointer; transition: box-shadow .15s, background .15s;
}
.btn-primary { background: var(--color-accent); color: #fff; border: 2px solid var(--color-accent); }
.btn-primary:hover { background: var(--color-accent-hover); box-shadow: 4px 4px 0 var(--color-accent-light); }
.btn-cart { background: var(--color-cta); color: #fff; border: 2px solid var(--color-cta); }
.btn-cart:hover { background: var(--color-cta-hover); box-shadow: 4px 4px 0 var(--color-cta-light); }
.btn-cart:disabled { background: var(--color-border); border-color: var(--color-border); color: var(--color-muted); cursor: not-allowed; box-shadow: none; }
.btn-outline { background: transparent; color: var(--color-text); border: 2px solid var(--color-border); }
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); box-shadow: 4px 4px 0 var(--color-accent-light); }

/* ── Hero banners ───────────────────────────────────────────────────── */
.hero-banners { display: flex; gap: 16px; flex-wrap: wrap; margin: 24px 0; }
.hero-banner {
  position: relative; flex: 1 1 300px; aspect-ratio: 16/9;
  display: flex; align-items: flex-end; border-radius: var(--radius); overflow: hidden;
  color: #fff; padding: 20px; transition: box-shadow .15s;
}
.hero-banner:hover { box-shadow: 4px 4px 0 var(--color-accent); }
.hero-banner:hover .hero-banner-img { transform: scale(1.04); }
.banner-bg-1 { background: linear-gradient(135deg,#173a70 0%,#2c5cae 55%,#4a86e0 100%); }
.banner-bg-2 { background: linear-gradient(135deg,#0e2547 0%,#22437e 50%,#3a6fc4 100%); }
.banner-bg-3 { background: linear-gradient(135deg,#0a1c38 0%,#1c3f78 55%,#4a86e0 100%); }
.hero-banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: transform .3s; background: var(--color-surface-2); }
.hero-banner-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(10,18,40,0) 35%, rgba(10,18,40,0.82) 100%); }
.hero-banner-content { position: relative; z-index: 2; }
.hero-banner-tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; opacity: .8; margin-bottom: 6px; }
.hero-banner-title { font-family: var(--font-head); font-size: 20px; font-weight: 800; }

.hero-banner-photo { display: block; flex: 1 1 320px; border-radius: var(--radius); overflow: hidden; line-height: 0; aspect-ratio: 16/9; }
.hero-banner-photo img { width: 100%; height: 100%; display: block; object-fit: contain; background: var(--color-surface-2); }

/* ── Sections ───────────────────────────────────────────────────────── */
section { margin: 40px 0; }
.section-title { display: flex; align-items: center; justify-content: center; margin-bottom: 18px; text-align: center; }
.section-text-center { max-width: 720px; margin: 0 auto; text-align: center; }

/* ── Category tiles ─────────────────────────────────────────────────── */
.category-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.category-tile {
  flex: 1 1 160px; max-width: 220px;
  background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 20px 14px; text-align: center; font-weight: 600; font-size: 14px; transition: box-shadow .15s, border-color .15s;
}
.category-tile:hover { border-color: var(--color-accent); box-shadow: 4px 4px 0 var(--color-accent-light); color: var(--color-accent); }

/* ── Product grid & card ────────────────────────────────────────────── */
.product-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.product-card {
  flex: 1 1 220px; max-width: 260px; width: 220px;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 1px 3px rgba(20,30,50,0.06);
  transition: box-shadow .18s, border-color .18s, transform .18s;
}
.product-card:hover { border-color: var(--color-accent); box-shadow: 0 10px 24px rgba(47,125,225,0.16); transform: translateY(-3px); }
.product-card-link { display: flex; flex-direction: column; flex: 1; }
.thumb-wrap { position: relative; width: 100%; aspect-ratio: 5/6; background: var(--color-surface-2); overflow: hidden; flex-shrink: 0; }
.thumb-wrap img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .25s; }
.product-card:hover .thumb-wrap img { transform: scale(1.04); }
.no-img { width: 100%; height: 100%; background: var(--color-surface-2); }
.no-img.small { width: 56px; height: 56px; }
.no-img.big { width: 100%; aspect-ratio: 1; }
.badge-out { position: absolute; top: 8px; left: 8px; background: var(--color-danger); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: var(--radius); }
.product-body { padding: 14px 14px 6px; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.product-brand { font-size: 11px; text-transform: uppercase; color: var(--color-muted); letter-spacing: 0.04em; }
.product-name { font-weight: 600; font-size: 14px; line-height: 1.35; color: var(--color-text); }
.product-card .desc { font-size: 12px; color: var(--color-muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price-row { margin-top: auto; padding-top: 8px; }
.product-price { font-family: var(--font-head); font-weight: 800; font-size: 18px; color: var(--color-accent); }
.product-footer { padding: 10px 14px 14px; }
.product-footer .btn-cart { width: 100%; padding: 10px; font-size: 12px; }

/* ── FAQ / About / Reviews / Advantages ────────────────────────────── */
.faq-item { background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.faq-item h3 { margin-bottom: 6px; font-size: 15px; }
.faq-item p { margin: 0; color: var(--color-muted); }

.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.review-card { background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 18px; }
.review-name { font-weight: 700; margin-bottom: 4px; }
.review-stars { color: var(--color-accent); margin-bottom: 8px; }
.review-text { color: var(--color-muted); }

.advantages-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.advantage-card { background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 20px; text-align: center; }
.advantage-card svg { color: var(--color-accent); margin-bottom: 10px; }
.advantage-card h3 { font-size: 14px; margin-bottom: 6px; }
.advantage-card p { margin: 0; color: var(--color-muted); font-size: 13px; }

/* ── Catalog layout ─────────────────────────────────────────────────── */
.catalog-layout { display: flex; gap: 72px; align-items: flex-start; justify-content: center; margin: 24px 0; }
.catalog-sidebar { width: 240px; flex-shrink: 0; background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 18px; text-align: center; }
.catalog-sidebar h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 10px; }
.filter-group { margin-bottom: 20px; }
.filter-check { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.price-range { display: flex; justify-content: center; gap: 8px; }
.price-range input { width: 100px; padding: 7px 8px; border: 1px solid var(--color-border); border-radius: var(--radius); text-align: center; }
#filterBrands { width: 100%; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius); text-align: center; text-align-last: center; }
.catalog-main { flex: 1; min-width: 0; }
.catalog-toolbar { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 20px; gap: 12px; }
.catalog-toolbar h1 { margin: 0; }
#sortSelect { padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); text-align: center; text-align-last: center; }
.no-results { padding: 40px; text-align: center; color: var(--color-muted); }
.pagination { display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 32px; }
.page-btn { min-width: 36px; height: 36px; border: 1px solid var(--color-border); background: var(--color-surface); padding: 0 8px; border-radius: var(--radius); cursor: pointer; font-weight: 600; color: var(--color-text); transition: border-color .15s, color .15s; }
.page-btn:hover:not(.active):not(:disabled) { border-color: var(--color-accent); color: var(--color-accent); }
.page-btn.active { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-btn.page-nav { font-size: 16px; font-weight: 700; }
.page-ellipsis { color: var(--color-muted); padding: 0 4px; }

/* ── Product detail page ───────────────────────────────────────────── */
.breadcrumbs { font-size: 13px; color: var(--color-muted); margin: 20px 0 16px; }
.breadcrumbs a:hover { color: var(--color-accent); }
.product-detail { display: flex; gap: 32px; flex-wrap: wrap; }
.gallery { flex: 1 1 380px; max-width: 460px; }
.gallery-main { border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; background: var(--color-surface-2); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gallery-thumb { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--color-border); border-radius: var(--radius); cursor: pointer; background: var(--color-surface-2); }
.gallery-thumb.active { border-color: var(--color-accent); }
.product-detail-info { flex: 1 1 380px; }
.product-detail-meta { display: flex; align-items: center; gap: 14px; margin: 10px 0; font-size: 13px; color: var(--color-muted); }
.stock-badge { padding: 3px 9px; border-radius: var(--radius); font-weight: 600; font-size: 12px; }
.stock-badge.in { background: rgba(22,163,74,0.1); color: var(--color-success); }
.stock-badge.out { background: rgba(220,38,38,0.1); color: var(--color-danger); }
.product-detail-price { font-family: var(--font-head); font-size: 30px; font-weight: 800; color: var(--color-accent); margin: 14px 0; }
.product-detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }

.dp-tabs { border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; margin: 16px 0; }
.dp-tab-btns { display: flex; border-bottom: 1px solid var(--color-border); }
.dp-tab-btn { flex: 1; padding: 11px 14px; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-muted); display: flex; align-items: center; justify-content: center; gap: 7px; }
.dp-tab-btn.active { color: var(--color-accent); border-bottom-color: var(--color-accent); background: var(--color-accent-light); }
.dp-tab-panel { display: none; padding: 16px; font-size: 13px; color: var(--color-muted); }
.dp-tab-panel.active { display: block; }
.dp-tab-panel a { color: var(--color-accent); font-weight: 600; }

.bank-requisites { background: var(--color-surface-2); border: 1px solid var(--color-accent); border-radius: var(--radius); padding: 14px 16px; margin-top: 12px; }
.bank-requisites-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--color-accent); margin-bottom: 8px; }
.bank-requisites-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bank-requisites-table td { padding: 5px 0; border-bottom: 1px solid var(--color-border); }
.bank-requisites-table td:first-child { color: var(--color-muted); width: 38%; }
.bank-requisites-table td:last-child { font-weight: 600; color: var(--color-text); word-break: break-all; }

.product-description, .product-specs { margin-top: 32px; }
.product-description h2, .product-specs h2, .similar-products h2 { text-align: center; }
.specs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs-table td { padding: 9px 12px; border-bottom: 1px solid var(--color-border); }
.specs-table td:first-child { color: var(--color-muted); width: 40%; }
.specs-table td:last-child { font-weight: 600; }

/* Nested description HTML from source export */
.product-desc-content .dp-wrap { background: transparent; }
.product-desc-content .dp-card { background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.product-desc-content h2, .product-desc-content h3 { color: var(--color-text); }
.product-desc-content p, .product-desc-content li { color: var(--color-muted); }
.product-desc-content strong, .product-desc-content b { color: var(--color-text); }
.product-desc-content table { border-collapse: collapse; width: 100%; }
.product-desc-content table th { background: var(--color-surface-2); color: var(--color-text); padding: 9px 12px; }
.product-desc-content table td { border: 1px solid var(--color-border); color: var(--color-muted); padding: 8px 12px; }

.similar-products { margin-top: 40px; }

/* ── Static pages ───────────────────────────────────────────────────── */
.page-content { max-width: 820px; margin: 30px auto; padding: 0 20px; }
.page-content h1 { margin-bottom: 18px; text-align: center; }
.page-content p { color: var(--color-muted); margin-bottom: 14px; }
.page-content h2 { margin-top: 26px; }

/* ── Cart modal (centered) ─────────────────────────────────────────── */
.cart-overlay { position: fixed; inset: 0; background: rgba(20,30,50,0.5); display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 1000; }
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  width: 100%; max-width: 460px; max-height: 88vh;
  background: var(--color-surface); border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  transform: scale(.96) translateY(8px); opacity: 0; transition: transform .2s, opacity .2s;
  box-shadow: 0 20px 60px rgba(20,30,50,0.25);
}
.cart-overlay.open .cart-drawer { transform: scale(1) translateY(0); opacity: 1; }
.cart-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--color-border); }
.cart-drawer-header h2 { margin: 0; font-size: 18px; }
.cart-close-btn { border: none; background: none; font-size: 22px; cursor: pointer; color: var(--color-muted); }
#cartBody { flex: 1; overflow-y: auto; padding: 16px 22px 22px; }
.cart-empty { text-align: center; color: var(--color-muted); padding: 40px 0; }
.cart-item { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.cart-item-img { width: 56px; height: 56px; background: var(--color-surface-2); border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.cart-item-img img { width: 100%; height: 100%; object-fit: contain; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.cart-item-price { font-size: 13px; color: var(--color-accent); font-weight: 700; margin-bottom: 4px; }
.cart-item-qty { display: flex; align-items: center; gap: 10px; }
.cart-item-qty button {
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-border); background: var(--color-surface-2); color: var(--color-text);
  cursor: pointer; border-radius: var(--radius); font-weight: 700; line-height: 1; padding: 0;
}
.cart-item-qty button:hover { border-color: var(--color-accent); color: var(--color-accent); }
.cart-item-qty span { min-width: 18px; text-align: center; font-weight: 600; }
.cart-item-remove { border: none; background: none; color: var(--color-danger); font-size: 12px; cursor: pointer; }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 16px; padding: 14px 0; border-top: 2px solid var(--color-border); margin-top: 6px; }
.order-form { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.order-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--color-muted); }
.order-form input, .order-form select { padding: 9px 10px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 14px; color: var(--color-text); }
.btn-checkout { margin-top: 6px; width: 100%; }

/* ── Toast ──────────────────────────────────────────────────────────── */
.site-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--color-text); color: #fff; padding: 12px 20px; border-radius: var(--radius); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 2000; }
.site-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer { margin-top: auto; background: var(--color-brand-blue-dark); color: rgba(255,255,255,0.85); padding: 40px 0 24px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; margin-bottom: 24px; }
.footer-col h3 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.footer-col a, .footer-col span { display: block; color: rgba(255,255,255,0.85); font-size: 13px; margin-bottom: 8px; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.2); padding-top: 16px; font-size: 12px; color: rgba(255,255,255,0.65); text-align: center; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .catalog-layout { flex-direction: column; }
  .catalog-sidebar { width: 100%; }
  .header-nav { display: none; }
  .menu-toggle { display: block; }
}
