:root {
  --bg: #07111f;
  --ink: #eef4fb;
  --muted: rgba(238, 244, 251, 0.65);
  --line: rgba(255, 255, 255, 0.1);
  --accent: #7eb8e8;
  --chrome: #c8d7e6;
  --navy: #1f5f8b;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Manrope, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(31, 95, 139, 0.25), transparent 30%),
    linear-gradient(180deg, #07111f 0%, #050b14 100%);
}
h1, h2, h3 { font-family: Oswald, sans-serif; letter-spacing: 0.02em; font-weight: 500; }
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
select option, select optgroup { color: #142033; background-color: #ffffff; }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(7, 17, 31, 0.95); border-bottom: 1px solid var(--line); }
.header-bar, .section-head, .pager, .header-actions { display: flex; align-items: center; gap: 16px; }
.header-bar { padding: 16px 0; }
.brand { color: white; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 42px; height: 42px; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; }
.brand-kicker { display: block; font-size: 11px; letter-spacing: 0.35em; text-transform: uppercase; color: #9eb4cc; }
.brand-name { font-size: 22px; font-weight: 650; }
.brand-name span { color: var(--accent); }
.search { display: flex; flex: 1; }
.search input, .filters input, .filters select, .panel input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 10px 12px;
}
.search input { border-radius: 10px 0 0 10px; }
.search button, .btn {
  border: 0;
  border-radius: 10px;
  background: var(--chrome);
  color: #07111f;
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
}
.search button { border-radius: 0 10px 10px 0; background: var(--navy); color: white; }
.ghost, .btn-ghost { border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; color: white; }
.cart-link { position: relative; background: var(--chrome); color: #07111f; border-radius: 10px; padding: 8px 14px; font-weight: 700; }
#cart-count { position: absolute; top: -8px; right: -8px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--navy); color: white; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
#cart-count[hidden] { display: none; }
.added-note { margin-top: 12px; }
.btn:disabled { opacity: 0.7; cursor: wait; }
.main-nav { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.main-nav .wrap { display: flex; gap: 6px; overflow: auto; padding: 8px 0 10px; }
.main-nav a { color: rgba(255,255,255,.75); padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.hero { border-bottom: 1px solid var(--line); }
.hero-grid, .product, .contact-grid, .cart-layout, .footer-grid { display: grid; gap: 24px; }
.hero-grid { padding: 64px 0; }
.eyebrow { color: var(--accent); letter-spacing: 0.28em; text-transform: uppercase; font-size: 13px; }
.lead, .meta, .legal, .footer-grid p, .footer-grid li { color: var(--muted); }
h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.05; margin: 12px 0; }
.hero-actions, .stats, .category-grid, .product-grid { display: grid; gap: 12px; }
.hero-actions { display: flex; flex-wrap: wrap; margin: 24px 0; }
.stats { grid-template-columns: repeat(3, 1fr); }
.stats div, .category, .card, .highlight, .panel, .empty { border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 18px; }
.stats div, .category, .highlight, .panel { padding: 16px; }
.stats strong { display: block; font-size: 24px; }
.highlights { display: grid; gap: 12px; }
.section { padding: 48px 0; }
.section-head { justify-content: space-between; }
.category-grid, .product-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-top: 18px; }
.card { color: inherit; overflow: hidden; display: flex; flex-direction: column; min-height: 100%; }
.card-media { position: relative; aspect-ratio: 1; background: linear-gradient(160deg, #0f1f33, #16263d); display: flex; align-items: center; justify-content: center; }
.card-media img, .gallery img { width: 100%; height: 100%; object-fit: contain; padding: 18px; }
.card-sku, .gallery-empty { color: rgba(255,255,255,.35); font-size: 28px; }
.pill { position: absolute; left: 10px; top: 10px; background: rgba(0,0,0,.5); border-radius: 99px; padding: 4px 8px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card h3 { font-size: 16px; margin: 0; }
.sku { color: var(--accent); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin: 0; }
.price, .product-price { color: #d4e4f4; font-weight: 700; margin-top: auto; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; align-items: center; }
.filters input, .filters select { width: auto; min-width: 180px; }
.filters select {
  color: #142033;
  background: #f4f7fb;
}
.filters label { font-size: 14px; color: var(--muted); }
.pager { justify-content: space-between; margin-top: 28px; }
.pager a, .pager span { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.disabled { opacity: .4; }
.empty { padding: 32px; text-align: center; }
.product { grid-template-columns: 1fr 1fr; align-items: start; margin-top: 18px; }
.gallery, .gallery-empty { min-height: 320px; border-radius: 18px; background: #0f1f33; display: flex; align-items: center; justify-content: center; }
.gallery-stack { display: grid; gap: 16px; }
.photo-row { display: grid; gap: 12px; }
.photo-row.multi { grid-template-columns: 1fr 1fr; }
.photo-row .gallery { min-height: 240px; }
.drawing { margin: 0; }
.drawing a { display: block; background: #fff; border-radius: 18px; }
.drawing img { width: 100%; height: auto; max-height: 640px; object-fit: contain; display: block; }
.drawing figcaption { margin-top: 8px; text-align: center; color: var(--muted); font-size: 14px; }
.facts { display: grid; gap: 8px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.panel { display: grid; gap: 10px; margin-top: 16px; }
.panel input { margin-top: 6px; }
.contact-grid { grid-template-columns: 1fr 1fr; }
.cart-layout { grid-template-columns: 1.2fr .8fr; }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button, .cart-line button, .cart-toolbar button { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.error { color: #ffb4b4; }
.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: #050b14; }
.footer-grid { grid-template-columns: repeat(4, 1fr); padding: 40px 0; }
.footer-title { color: white; font-weight: 700; }
.footer-grid ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.legal { text-align: center; font-size: 12px; padding: 0 16px 8px; }
.legal a { color: inherit; }
.made-by { display: flex; justify-content: center; align-items: center; gap: 8px; color: rgba(238, 244, 251, .45); font-size: 12px; padding: 0 16px 18px; }
.made-by img { width: 16px; height: 16px; border-radius: 4px; }
.made-by a { color: inherit; }
.seller-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.guide-copy { max-width: 760px; }
.guide-copy p { line-height: 1.65; }
.guide-hero, .guide-wide { margin: 22px 0 0; border-radius: 18px; overflow: hidden; background: #f4f7fb; border: 1px solid var(--line); }
.guide-hero img, .guide-wide img { display: block; width: 100%; height: auto; }
.guide-block { margin-top: 22px; }
.guide-block h3 { margin: 0; font-size: 22px; }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.guide-grid figure { margin: 0; background: #fff; border-radius: 18px; overflow: hidden; }
.guide-grid img { display: block; width: 100%; height: auto; background: #fff; }
.guide-close { margin-top: 28px; }
.guide-close p { margin: 0; }
.guide-more { margin-top: 28px; }
.call-fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .18);
}
.call-fab svg { width: 24px; height: 24px; display: block; flex: none; }
.call-fab span { font-weight: 700; font-size: 14px; max-width: 0; overflow: hidden; white-space: nowrap; }
.call-fab:hover, .call-fab:focus { width: auto; padding: 0 16px; }
.call-fab:hover span, .call-fab:focus span { max-width: 180px; margin-left: 8px; }
.narrow { max-width: 480px; }
.order ul { margin: 0; padding-left: 18px; }
.cms-brand { display: flex; align-items: center; gap: 12px; }
.cms-brand img { width: 40px; height: 40px; border-radius: 10px; display: block; }
.cms-name { margin: 0; color: var(--accent); letter-spacing: 0.16em; text-transform: uppercase; font-size: 13px; font-weight: 700; }
.cms-brand h1 { margin: 2px 0 0; }
.cms-login { margin-bottom: 8px; }
.admin-main h1 { font-size: 36px; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.admin-nav a { color: #eef4fb; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; padding: 8px 12px; }
.admin-nav a.active { background: #f4f7fb; color: #142033; }
.hint { color: var(--muted); font-size: 14px; max-width: 720px; }
.flash { border-radius: 12px; padding: 12px 14px; }
.flash-ok { background: rgba(120, 190, 140, .16); color: #d7f5e2; }
.flash-bad { background: rgba(180, 70, 70, .22); color: #ffd4d4; }
.admin-form label, .admin-form .panel { display: grid; gap: 8px; }
.admin-form textarea, .status-row input, .status-row select, .admin-form input[type="file"] {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  border-radius: 10px;
  padding: 10px 12px;
  color: inherit;
  font: inherit;
}
.admin-form textarea { min-height: 88px; }
.status-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.status-row input, .status-row select { width: auto; min-width: 160px; color: #142033; background: #f4f7fb; }
@media (max-width: 800px) {
  .search, .ghost { display: none; }
  .hero-grid, .product, .contact-grid, .cart-layout, .footer-grid, .stats, .photo-row.multi, .guide-grid { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 1fr; }
}
