:root {
  color-scheme: dark;
  --ink: #0a0f14;
  --surface: #111820;
  --surface-2: #161f29;
  --line: #26323e;
  --paper: #f4f6f5;
  --muted: #9ba8b4;
  --mint: #2fe6a6;
  --mint-dark: #1c8f6c;
  --amber: #e8a33d;
  --danger: #ff6b6b;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper);
  background:
    radial-gradient(circle at 15% 0%, rgba(47, 230, 166, .11), transparent 34rem),
    radial-gradient(circle at 90% 18%, rgba(232, 163, 61, .08), transparent 30rem),
    var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
img { display: block; max-width: 100%; }
.container { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 100; background: var(--mint); color: var(--ink); padding: 10px 14px; border-radius: 10px; font-weight: 800; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(244, 246, 245, .96); color: var(--ink); border-bottom: 1px solid rgba(10, 15, 20, .08); backdrop-filter: blur(14px); }
.nav-row { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { width: auto; height: 38px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: .92rem; font-weight: 650; }
.nav-links a { color: #35414b; transition: color .2s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--mint-dark); }
.nav-cta { background: var(--ink); color: var(--paper) !important; padding: 10px 16px; border-radius: 999px; }
.menu-button { display: none; border: 0; background: transparent; color: var(--ink); padding: 8px; cursor: pointer; }
.hero { position: relative; overflow: hidden; padding: 76px 0 52px; text-align: center; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .45; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to bottom, #000, transparent); }
.hero-inner { position: relative; max-width: 760px; margin-inline: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--mint); background: rgba(47, 230, 166, .08); border: 1px solid rgba(47, 230, 166, .22); border-radius: 999px; padding: 7px 12px; font: 700 .73rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { font-family: Sora, Inter, system-ui, sans-serif; }
h1 { margin: 22px 0 14px; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.06; letter-spacing: -.035em; }
.hero p { color: #b9c3cc; font-size: 1.05rem; line-height: 1.7; margin: 0 auto; max-width: 650px; }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin: 0 0 28px; }
.search-wrap { position: relative; flex: 1; max-width: 520px; }
.search { width: 100%; color: var(--paper); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px 13px 44px; outline: none; transition: border-color .2s, box-shadow .2s; }
.search:focus { border-color: var(--mint); box-shadow: 0 0 0 4px rgba(47, 230, 166, .1); }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.count { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.content { padding: 12px 0 84px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.product-card { display: flex; flex-direction: column; min-width: 0; background: linear-gradient(180deg, #141d26, var(--surface)); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 12px 32px rgba(0,0,0,.15); transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.product-card:hover { transform: translateY(-5px); border-color: rgba(47,230,166,.7); box-shadow: 0 20px 50px -18px rgba(47,230,166,.34); }
.product-media { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 22px; background: #0d1319; border-bottom: 1px solid var(--line); overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: contain; }
.promo { position: absolute; left: 14px; top: 14px; padding: 6px 10px; border-radius: 999px; color: white; background: #dc2626; font-size: .7rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.product-body { display: flex; flex-direction: column; flex: 1; padding: 22px; }
.product-body h2, .product-body h3 { margin: 0 0 10px; font-size: 1.08rem; line-height: 1.35; }
.description { color: var(--muted); font-size: .91rem; line-height: 1.58; margin: 0 0 18px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.price { margin: auto 0 16px; font: 800 1.42rem/1.2 Sora, sans-serif; color: var(--mint); }
.actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid transparent; border-radius: 999px; padding: 10px 17px; cursor: pointer; font-weight: 800; transition: transform .18s, background .18s, border-color .18s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--mint); color: var(--ink); }
.button-primary:hover { background: #63f0be; }
.button-secondary { background: transparent; color: var(--paper); border-color: var(--line); }
.button-secondary:hover { border-color: var(--mint); color: var(--mint); }
.button-danger { background: rgba(255,107,107,.1); color: #ff9e9e; border-color: rgba(255,107,107,.3); }
.state { grid-column: 1 / -1; padding: 50px 24px; text-align: center; color: var(--muted); background: rgba(17,24,32,.7); border: 1px dashed var(--line); border-radius: 20px; }
.spinner { width: 28px; height: 28px; margin: 0 auto 14px; border: 3px solid var(--line); border-top-color: var(--mint); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.site-footer { border-top: 1px solid var(--line); padding: 34px 0; color: var(--muted); font-size: .86rem; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-row img { align-self: flex-start; width: auto; max-width: min(100%, 260px); height: 30px; object-fit: contain; background: var(--paper); border-radius: 8px; padding: 4px 8px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .85fr); gap: 42px; align-items: start; }
.detail-media { position: sticky; top: 96px; display: grid; place-items: center; min-height: 430px; padding: 42px; border: 1px solid var(--line); border-radius: 24px; background: #0d1319; box-shadow: var(--shadow); }
.detail-media img { max-height: 520px; object-fit: contain; }
.detail-panel { padding: 8px 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .84rem; margin-bottom: 22px; }
.breadcrumb a:hover { color: var(--mint); }
.detail-panel h1 { margin-top: 14px; font-size: clamp(2rem, 5vw, 3.2rem); }
.detail-description { color: #bdc7cf; line-height: 1.75; white-space: pre-line; }
.price-large { margin: 28px 0 20px; color: var(--mint); font: 850 clamp(2rem, 5vw, 3rem)/1.1 Sora, sans-serif; }
.trust-list { display: grid; gap: 12px; margin: 26px 0 0; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: #bdc7cf; font-size: .9rem; }
.trust-list span::before { content: "✓"; color: var(--mint); font-weight: 900; margin-right: 9px; }
.admin-shell { padding: 42px 0 84px; }
.admin-top { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
.admin-top h1 { margin: 8px 0 0; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.panel { padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.field { display: grid; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.field label { color: #cad2d9; font-size: .85rem; font-weight: 750; }
.field input, .field textarea, .field select { width: 100%; color: var(--paper); background: #0d1319; border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; outline: none; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(47,230,166,.1); }
.field textarea { min-height: 120px; resize: vertical; }
.check-row { display: flex; align-items: center; gap: 10px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--mint); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.admin-grid { margin-top: 28px; }
.admin-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.admin-card-actions .button { min-height: 38px; padding: 8px 13px; font-size: .82rem; }
.login-card { width: min(460px, calc(100% - 32px)); margin: 70px auto; }
.status-message { min-height: 22px; margin-top: 12px; color: var(--muted); font-size: .88rem; }
.status-message.error { color: #ff9e9e; }
.status-message.success { color: var(--mint); }

@media (max-width: 860px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-media { position: static; min-height: 320px; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 16px 20px; background: var(--paper); border-bottom: 1px solid #dbe0e4; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 4px; }
  .menu-button { display: inline-flex; }
}

@media (max-width: 580px) {
  .hero { padding: 56px 0 40px; }
  .product-grid { grid-template-columns: 1fr; }
  .toolbar, .admin-top, .footer-row { align-items: stretch; flex-direction: column; }
  .search-wrap { max-width: none; width: 100%; }
  .actions { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .panel { padding: 20px; }
  .detail-media { padding: 24px; min-height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
