:root {
  --navy: #0b1b33;
  --navy-2: #122a4d;
  --navy-3: #1c3b68;
  --gold: #c9a227;
  --gold-soft: #f3e6b8;
  --bg: #f5f7fb;
  --white: #ffffff;
  --ink: #10213a;
  --muted: #657489;
  --line: #dde4ee;
  --danger: #a63b32;
  --ok: #1f7a55;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(11, 27, 51, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy-3); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -0.02em; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.note { color: var(--muted); font-size: 0.9rem; }
.hint { color: var(--muted); font-size: 0.88rem; margin: 8px 0 16px; }
.eyebrow { color: var(--gold); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px; }
.lead { font-size: 1.12rem; color: #42536b; max-width: 720px; }
.text-link { font-weight: 600; display: inline-block; margin-top: 8px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy); color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); font-size: 0.92rem; line-height: 1.15; }
.brand:hover { text-decoration: none; }
.brand strong { font-size: 1.12rem; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; background: var(--gold); color: var(--navy); font-size: 1.3rem;
}
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: #e8eef7; font-weight: 600; font-size: 0.94rem; }
.site-nav a:hover { color: var(--gold-soft); text-decoration: none; }
.nav-toggle {
  display: none; background: transparent; color: var(--white);
  border: 1px solid rgba(255,255,255,0.25); border-radius: 8px;
  padding: 7px 12px; font-size: 1.2rem; cursor: pointer;
}
.cart-link { display: inline-flex; align-items: center; gap: 8px; }
.badge {
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px;
  background: var(--gold); color: var(--navy); font-size: 0.78rem;
  display: inline-grid; place-items: center; font-weight: 800;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; border-radius: 10px;
  font: inherit; font-weight: 700; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn-primary:hover { background: #d9b53b; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy-3); }
.btn-lg { min-height: 54px; font-size: 1.02rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Sections */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 62%, var(--navy-3) 100%); color: var(--white); padding: 68px 0 74px; }
.hero .lead { color: #d5deeb; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 52px; align-items: center; }
.hero h1 { max-width: 720px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 16px; }
.hero .note { color: #b9c6d8; }
.hero-card { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); border-radius: 18px; padding: 26px; }
.hero-card-head { font-size: 1.1rem; font-weight: 700; margin-bottom: 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps span { color: var(--gold); font-weight: 800; flex: 0 0 28px; }
.hero-card-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.16); color: #c9d5e5; font-size: 0.9rem; }
.section { padding: 64px 0; }
.section-tight { padding: 38px 0 70px; }
.section-alt { background: #eef2f8; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-head p { margin-bottom: 0; max-width: 660px; }

/* Home blocks */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.feature-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--gold-soft); color: var(--navy); display: grid; place-items: center; font-weight: 800; margin-bottom: 14px; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.category-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 5px; }
.category-card:hover { border-color: var(--gold); text-decoration: none; }
.category-glyph { color: var(--gold); font-size: 1.4rem; }
.kit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kit-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.kit-price { font-size: 1.65rem; font-weight: 800; color: var(--navy); margin: 6px 0 2px; }
.kit-card .btn { margin-top: auto; }
.video-teaser { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.video-placeholder {
  min-height: 220px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--navy), var(--navy-3)); color: var(--white);
  font-size: 3rem; position: relative;
}
.video-placeholder small { position: absolute; bottom: 18px; font-size: 0.82rem; color: #cbd6e5; }
.video-placeholder-large { max-width: 360px; margin: 0 auto 22px; }
.contact-strip { display: flex; justify-content: space-between; gap: 24px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.contact-strip-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* Page heads */
.page-head { background: var(--navy); color: var(--white); padding: 46px 0 52px; }
.page-head-small { padding: 38px 0 44px; }
.page-head .lead { color: #cfdaea; }
.page-head a { color: var(--gold-soft); }
.breadcrumbs { display: flex; gap: 10px; font-size: 0.88rem; color: #bfcce0; margin-bottom: 18px; }

/* Catalog */
.filters { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; grid-template-columns: 1.6fr 1fr 1fr auto; gap: 14px; align-items: end; }
.field { display: grid; gap: 7px; font-size: 0.9rem; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--white); color: var(--ink); font: inherit; font-weight: 400;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid rgba(201,162,39,0.45); outline-offset: 1px; border-color: var(--gold); }
.result-count { margin: 18px 0 14px; color: var(--muted); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 16px; }
.product-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.product-visual { height: 148px; background: linear-gradient(145deg, #e9eef6, #d7e0ed); display: grid; place-items: center; position: relative; overflow: hidden; }
.product-visual img { width: 100%; height: 100%; object-fit: contain; padding: 10px 10px 26px; background: var(--white); }
.product-glyph { color: var(--navy-3); opacity: 0.45; font-size: 2.5rem; }
.product-category { position: absolute; left: 12px; bottom: 10px; font-size: 0.74rem; background: rgba(255,255,255,0.86); color: var(--navy); padding: 3px 9px; border-radius: 999px; }
.video-badge { position: absolute; right: 10px; top: 10px; background: rgba(18,38,66,0.88); color: #fff; border-radius: 999px; padding: 4px 10px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; }
.product-body { padding: 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.article { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.04em; margin: 0; }
.product-body h3 { font-size: 1rem; margin: 0; min-height: 2.8em; }
.product-body h3 a { color: var(--ink); }
.price-row { display: flex; align-items: baseline; gap: 6px; margin-top: auto; }
.price { font-size: 1.35rem; color: var(--navy); }
.unit { color: var(--muted); font-size: 0.9rem; }
.empty-state { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 46px 24px; text-align: center; }
.empty-state h2, .empty-state h3 { margin-bottom: 8px; }

/* Product */
.product-detail { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 34px; }
.product-detail-visual { background: linear-gradient(145deg, #e9eef6, #d7e0ed); border-radius: 18px; min-height: 380px; display: grid; place-items: center; position: relative; border: 1px solid var(--line); overflow: hidden; }
.product-detail-visual .detail-main-image { width: 100%; height: 100%; max-height: 480px; object-fit: contain; background: var(--white); }
.product-glyph-large { font-size: 6rem; }
.visual-note { position: absolute; bottom: 18px; font-size: 0.85rem; color: var(--muted); }
.subhead { font-size: 1.05rem; margin: 20px 0 10px; }
.detail-gallery { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.detail-gallery a { display: block; width: 82px; height: 82px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--white); }
.detail-gallery img { width: 100%; height: 100%; object-fit: contain; }
.detail-video { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 8px; }
.detail-video .subhead { margin-top: 10px; }
.product-video { display: block; width: 100%; max-width: 100%; max-height: 420px; border-radius: 10px; background: #000; }
.detail-price { font-size: 2rem; font-weight: 800; color: var(--navy); margin: 18px 0 8px; }
.detail-price span { font-size: 1rem; color: var(--muted); font-weight: 500; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 20px; }
.info-box { background: #edf2f9; border-left: 3px solid var(--gold); border-radius: 10px; padding: 16px 18px; }
.info-box p { margin: 6px 0 0; color: #41536c; }

/* Kits */
.kit-list { display: grid; gap: 22px; }
.kit-detail { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); scroll-margin-top: 90px; }
.kit-detail-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.kit-total { text-align: right; display: grid; gap: 4px; }
.kit-total span { color: var(--muted); font-size: 0.85rem; }
.kit-total strong { font-size: 1.7rem; color: var(--navy); }
.kit-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; background: var(--white); }
.data-table th, .data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { background: #eef2f8; color: var(--navy); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table-compact { font-size: 0.85rem; }
.data-table-compact th, .data-table-compact td { padding: 8px 10px; }

/* Cart */
.cart-list { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cart-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 18px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cart-row:last-child { border-bottom: 0; }
.cart-row-title { display: grid; gap: 3px; }
.cart-row-title strong { color: var(--ink); }
.cart-row-price { text-align: right; min-width: 110px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.qty-control button { width: 38px; height: 38px; border: 0; background: #eef2f8; cursor: pointer; font-size: 1.1rem; color: var(--navy); }
.qty-control input { width: 56px; height: 38px; border: 0; text-align: center; font: inherit; font-weight: 700; }
.icon-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.25rem; padding: 6px; }
.icon-btn:hover { color: var(--danger); }
.cart-summary { background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 20px 22px; margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.cart-summary strong { font-size: 1.7rem; color: var(--gold-soft); }
.cart-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }

/* Checkout */
.checkout-grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.checkout-form-card, .checkout-summary { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.checkbox-field { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; font-size: 0.92rem; }
.checkbox-field input { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px; accent-color: var(--navy-3); }
.test-mode-field { background: var(--gold-soft); border-radius: 8px; padding: 10px 12px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { background: #fbecea; color: var(--danger); border: 1px solid #e8bbb6; border-radius: 9px; padding: 12px 14px; margin: 14px 0; font-size: 0.92rem; }
.checkout-summary h2 { font-size: 1.25rem; }
.checkout-line { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.checkout-line span { color: var(--muted); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 18px 0 6px; font-size: 1.05rem; }
.summary-total strong { font-size: 1.5rem; color: var(--navy); }

/* Order page */
.order-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.order-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.order-meta div { background: #eef2f8; border-radius: 10px; padding: 14px; display: grid; gap: 5px; }
.order-meta span { color: var(--muted); font-size: 0.84rem; }
.test-badge { background: var(--gold-soft); color: #6d5210; }
.order-card .info-box { margin: 20px 0; }
.order-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { display: inline-block; background: #eef2f8; color: var(--navy); border-radius: 999px; padding: 3px 10px; font-size: 0.78rem; font-weight: 700; }
.pill-warn { background: var(--gold-soft); color: #6d5210; }
.pill-ok { background: #dff1e8; color: var(--ok); }

/* Videos */
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.video-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-width: 0; }
.video-thumb img { width: 100%; height: 220px; object-fit: cover; display: block; }
.video-body { padding: 20px; min-width: 0; }
.video-body h2 { font-size: 1.05rem; margin: 8px 0; }
.video-body h2 a { color: var(--ink); }
.video-card > video { display: block; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 10px; background: #000; }
.video-frame { position: relative; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-body .detail-price { font-size: 1.35rem; margin: 10px 0; }
.video-related { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: 0.88rem; color: var(--muted); }
.video-related a { background: #eef2f8; padding: 3px 9px; border-radius: 999px; font-weight: 600; }

/* Contacts and legal */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.contact-card p { display: grid; gap: 3px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.contact-card p span { color: var(--muted); font-size: 0.84rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.legal-text { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; max-width: 900px; }
.legal-text h2 { font-size: 1.2rem; margin-top: 26px; }
.legal-text a { text-decoration: underline; }

/* Footer */
.site-footer { background: var(--navy); color: #d6dfec; padding: 42px 0 20px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr; gap: 28px; }
.footer-brand { color: var(--white); font-weight: 800; font-size: 1.05rem; margin-bottom: 8px; }
.site-footer a { color: #d6dfec; }
.site-footer .muted { color: #9fb0c7; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 28px; padding-top: 16px; font-size: 0.84rem; color: #9fb0c7; }

/* Admin */
.admin-head { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-nav .btn { min-height: 38px; padding: 7px 13px; font-size: 0.88rem; }
.admin-login-wrap { max-width: 460px; margin: 40px auto; }
.admin-login-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.admin-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.admin-summary div { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 4px; }
.admin-summary span { color: var(--muted); font-size: 0.8rem; }
.admin-summary strong, .admin-summary code { font-size: 1.05rem; word-break: break-all; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.admin-orders { display: grid; gap: 16px; }
.admin-order { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.admin-order-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; flex-wrap: wrap; }
.admin-order-head > div { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-order-foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 14px; font-size: 0.88rem; }
.video-admin-list { display: grid; gap: 10px; }
.video-slot { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.video-slot summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-weight: 600; }
.video-slot summary strong { font-weight: 600; color: var(--muted); }
.video-slot-form { margin-top: 18px; display: grid; gap: 12px; }
.media-admin-grid { display: grid; grid-template-columns: minmax(320px, 0.9fr) 1.1fr; gap: 24px; align-items: start; }
.media-admin-form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; }
.media-admin-list { display: grid; gap: 8px; max-height: 720px; overflow: auto; }
.settings-form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; max-width: 760px; display: grid; gap: 14px; }
.log-view { background: var(--navy); color: #d8e3f2; border-radius: var(--radius); padding: 18px; max-height: 560px; overflow: auto; font: 0.82rem/1.6 Consolas, monospace; }

@media (max-width: 980px) {
  .features, .category-grid, .kit-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid, .video-teaser, .product-detail, .checkout-grid, .media-admin-grid { grid-template-columns: 1fr; }
  .contact-strip { flex-direction: column; align-items: flex-start; }
  .admin-summary { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 74px; left: 0; right: 0; background: var(--navy); padding: 14px 22px 20px; flex-direction: column; align-items: stretch; gap: 4px; border-top: 1px solid rgba(255,255,255,0.12); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px 0; }
  .filters { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .section { padding: 46px 0; }
  .features, .category-grid, .kit-grid, .video-grid, .contact-grid, .order-meta { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 1fr auto; gap: 10px 14px; }
  .cart-row-title { grid-column: 1 / -1; }
  .cart-summary { flex-direction: column; align-items: flex-start; }
  .cart-actions { flex-direction: column-reverse; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-head { flex-direction: column; align-items: flex-start; }
  .admin-summary { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .btn { width: 100%; }
  .admin-nav .btn { width: auto; }
}
