
:root {
  --bg: #080808;
  --panel: #111111;
  --panel-2: #161616;
  --card: #151515;
  --text: #ffffff;
  --muted: #b7b7b7;
  --line: rgba(255,255,255,.08);
  --primary: #c40000;
  --primary-2: #ff2b2b;
  --soft: rgba(196,0,0,.12);
  --max: 1240px;
  --radius: 20px;
  --shadow: 0 12px 36px rgba(0,0,0,.28);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(196,0,0,.16), transparent 20%),
    radial-gradient(circle at top left, rgba(196,0,0,.09), transparent 18%),
    var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
.container { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(8,8,8,.78);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(145deg, var(--primary-2), #8d0000);
  display: grid; place-items: center;
  box-shadow: 0 10px 20px rgba(196,0,0,.25);
  font-weight: 800; font-size: 22px;
}
.brand-name { font-size: 24px; font-weight: 800; letter-spacing: .4px; }
.brand-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.menu { display: flex; align-items: center; gap: 26px; color: #f1f1f1; font-size: 15px; }
.menu a { opacity: .88; }
.menu a:hover { opacity: 1; color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: flex; border:1px solid var(--line); border-radius: 14px; overflow:hidden; }
.lang-switch a { font-size: 13px; padding: 10px 12px; color: var(--muted); background: transparent; }
.lang-switch a.active { background: linear-gradient(145deg, var(--primary-2), #930000); color:#fff; }
.btn,.ghost {
  border: 0; cursor: pointer; transition: .2s ease;
  padding: 12px 16px; border-radius: 14px; font-weight: 700; display:inline-flex; align-items:center; justify-content:center;
}
.btn { background: linear-gradient(145deg, var(--primary-2), #930000); color: #fff; box-shadow: 0 10px 24px rgba(196,0,0,.22); }
.btn:hover { transform: translateY(-1px); }
.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.14); }
.hero { padding: 34px 0 22px; }
.hero-grid { display: grid; grid-template-columns: 1.45fr .9fr; gap: 22px; }
.hero-main {
  min-height: 520px; border-radius: 32px; overflow: hidden; position: relative;
  background: radial-gradient(circle at 75% 30%, rgba(255,255,255,.12), transparent 22%), linear-gradient(135deg, #0d0d0d 0%, #250000 50%, #8f0000 100%);
  box-shadow: var(--shadow); border: 1px solid var(--line); padding: 46px; display: flex; align-items: center;
}
.hero-main::after {
  content:""; position:absolute; right:-80px; bottom:-80px; width:280px; height:280px;
  background: radial-gradient(circle, rgba(255,43,43,.35), transparent 60%); filter: blur(20px);
}
.eyebrow {
  display: inline-flex; align-items:center; gap:8px; background: rgba(255,255,255,.08); padding: 8px 12px; border-radius:999px;
  color:#fff; font-size:13px; border:1px solid rgba(255,255,255,.08);
}
h1 { margin: 16px 0 14px; font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -.03em; }
.hero-text { max-width: 580px; color: #e7e7e7; font-size: 18px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-side { display:grid; gap:18px; }
.side-card, .panel-card {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid var(--line); border-radius: 24px; padding:24px; box-shadow: var(--shadow);
}
.side-title { font-size:18px; font-weight:700; margin:12px 0 6px; }
.side-desc { color: var(--muted); line-height:1.65; font-size:14px; }
.section { padding: 26px 0; }
.section-head { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom: 18px; }
.section-title { font-size: 32px; margin:0; letter-spacing: -.02em; }
.section-sub { color: var(--muted); margin-top: 8px; line-height:1.6; font-size:15px; }
.categories { display:grid; grid-template-columns: repeat(4, 1fr); gap:18px; }
.cat-card {
  background: linear-gradient(180deg, #151515, #111111); border:1px solid var(--line); border-radius:24px; padding:22px; min-height:190px;
  box-shadow: var(--shadow); display:flex; flex-direction:column; justify-content:space-between;
}
.cat-icon {
  width:54px; height:54px; border-radius:16px; display:grid; place-items:center; background: var(--soft); color:#fff; font-size:24px;
}
.cat-name { font-size:22px; font-weight:700; margin-top:22px; }
.cat-copy { color: var(--muted); font-size:14px; line-height:1.65; margin-top:10px; }
.cat-link { margin-top: 18px; color:#fff; font-size:14px; opacity:.9; }

.products { display:grid; grid-template-columns: repeat(3, 1fr); gap:20px; }
.product, .related-card {
  background: linear-gradient(180deg, #151515, #101010); border:1px solid var(--line); border-radius:24px; overflow:hidden; box-shadow: var(--shadow);
}
.product-visual, .mini-visual {
  aspect-ratio: 1/1; padding:24px; position:relative; background:
  radial-gradient(circle at 70% 28%, rgba(255,255,255,.12), transparent 18%), linear-gradient(135deg, #0c0c0c, #2b0000 55%, #8d0000);
  display:grid; place-items:center;
}
.badge { position:absolute; top:16px; left:16px; font-size:12px; background: rgba(255,255,255,.1); color:#fff; padding:8px 10px; border-radius:999px; border:1px solid rgba(255,255,255,.08);}
.device {
  width:82%; max-width:260px; aspect-ratio: 1/1; border-radius:28px; position:relative; background: radial-gradient(circle at top left, #4d4d4d, #111 55%);
  box-shadow: inset 0 0 40px rgba(255,255,255,.05), 0 18px 40px rgba(0,0,0,.4);
}
.device::before,.device::after {
  content:""; position:absolute; background: linear-gradient(180deg, #232323, #060606); border-radius:28px; box-shadow: inset 0 0 16px rgba(255,255,255,.03);
}
.earbuds::before { width:28%; height:46%; left:20%; top:18%; transform: rotate(-10deg); }
.earbuds::after { width:28%; height:46%; right:20%; top:18%; transform: rotate(10deg); }
.microphone::before { width:26%; height:56%; left:37%; top:14%; border-radius:999px; }
.microphone::after { width:12%; height:20%; left:44%; bottom:12%; border-radius:999px; }
.swim::before { width:60%; height:20%; left:20%; top:38%; border-radius:999px; }
.swim::after { width:16%; height:16%; right:18%; top:30%; border-radius:50%; }
.product-body, .meta { padding:22px; }
.product-name { font-size:22px; font-weight:700; margin:0 0 8px; }
.product-desc { color: var(--muted); font-size:14px; line-height:1.7; min-height:48px; }
.price-row { display:flex; align-items:center; gap:10px; margin-top:18px; }
.price { font-size:24px; font-weight:800; }
.old-price { color:#777; text-decoration: line-through; font-size:14px; }
.cta-row { display:flex; gap:10px; margin-top:18px; }
.cta-row .btn,.cta-row .ghost { flex:1; text-align:center; }
.page-main { min-height: calc(100vh - 76px); }
.page-head { padding-top: 24px; }
.page-title { font-size: 44px; margin: 10px 0 12px; }
.page-copy { color: var(--muted); max-width: 760px; line-height: 1.8; }

.support-grid { display:grid; grid-template-columns: 1.05fr .95fr; gap:20px; }
.support-box,.promo-box, .detail-gallery, .detail-panel, .detail-block, .admin-card, .form-card {
  background: linear-gradient(180deg, #141414, #101010);
  border:1px solid var(--line); border-radius:28px; padding:30px; box-shadow: var(--shadow);
}
.promo-box { background: radial-gradient(circle at 80% 25%, rgba(255,255,255,.08), transparent 18%), linear-gradient(135deg, #101010, #250000 55%, #770000); }
.mini-list { display:grid; grid-template-columns: repeat(2, 1fr); gap:14px; margin-top:22px; }
.mini-item { background: rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.06); border-radius:18px; padding:16px; min-height:92px; }
.mini-item strong { display:block; margin-top:10px; font-size:15px; }
.mini-item span { display:block; color: var(--muted); margin-top:8px; line-height:1.5; font-size:13px; }

.footer { padding:24px 0 40px; color: var(--muted); border-top:1px solid var(--line); margin-top:18px; }
.footer-row { display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap; }
.footer-links { display:flex; gap:18px; flex-wrap:wrap; }

/* detail */
.detail-hero { padding: 24px 0 8px; }
.breadcrumb { color: var(--muted); font-size:14px; margin-bottom:18px; }
.detail-grid { display:grid; grid-template-columns: 1.05fr .95fr; gap:24px; }
.detail-gallery { overflow:hidden; padding:0; }
.detail-visual {
  min-height:560px; position:relative; padding:32px;
  background: radial-gradient(circle at 72% 24%, rgba(255,255,255,.12), transparent 18%), linear-gradient(135deg, #0c0c0c, #2b0000 55%, #8d0000);
  display:grid; place-items:center;
}
.detail-thumbs { display:grid; grid-template-columns: repeat(4, 1fr); gap:12px; padding:18px; }
.thumb { border:1px solid var(--line); border-radius:18px; min-height:86px; background: linear-gradient(180deg, #131313, #0e0e0e); display:grid; place-items:center; }
.thumb .device { width:56%; max-width:94px; }
.detail-title { font-size:42px; margin:14px 0 10px; line-height:1.05; }
.rating { display:flex; align-items:center; gap:10px; color:#ffcf67; font-size:14px; }
.detail-copy { color: var(--muted); line-height:1.8; font-size:15px; margin-top:14px; }
.detail-price { display:flex; align-items:end; gap:12px; margin-top:18px; }
.detail-price strong { font-size:36px; }
.detail-price span { color:#777; text-decoration:line-through; }
.tag-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.tag { padding:10px 12px; border-radius:999px; font-size:13px; background: rgba(255,255,255,.05); border:1px solid var(--line); color:#fff; }
.spec-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap:12px; margin-top:24px; }
.spec-item { border:1px solid var(--line); border-radius:18px; background: rgba(255,255,255,.03); padding:16px; }
.spec-item strong { display:block; font-size:14px; margin-bottom:8px; }
.spec-item span { color: var(--muted); font-size:14px; line-height:1.6; }
.buy-actions { display:grid; grid-template-columns: 1fr 1fr; gap:12px; margin-top:24px; }
.notice-box { margin-top:22px; border:1px solid var(--line); border-radius:18px; padding:16px; background: rgba(255,255,255,.03); color: var(--muted); font-size:14px; line-height:1.7; }
.detail-sections { display:grid; gap:18px; margin-top:26px; }
.detail-block h2 { margin:0 0 14px; font-size:24px; }
.feature-list { display:grid; grid-template-columns: repeat(2, 1fr); gap:14px; }
.feature-card { border:1px solid var(--line); border-radius:18px; padding:16px; background: rgba(255,255,255,.03); }
.feature-card strong { display:block; margin-bottom:8px; }
.feature-card span { color: var(--muted); line-height:1.6; font-size:14px; }
.package-list { display:grid; gap:10px; color: var(--muted); line-height:1.7; }
.related-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap:18px; }
.related-card h3 { margin:0 0 8px; font-size:20px; }
.related-card p { margin:0; color: var(--muted); line-height:1.6; min-height:46px; font-size:14px; }
.related-card .mini-price { font-weight:800; font-size:20px; margin-top:12px; }

/* form and admin */
.form-grid { display:grid; grid-template-columns: 1fr .95fr; gap:24px; }
.form-card h2, .admin-card h2 { margin: 0 0 16px; font-size: 28px; }
.field-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap:14px; }
.field { display:flex; flex-direction:column; gap:8px; margin-bottom:14px; }
.field label { font-size:14px; color:#ddd; }
.field input, .field textarea, .field select {
  width:100%; background:#0d0d0d; color:#fff; border:1px solid var(--line); border-radius:14px; padding:14px 14px; outline:none;
}
.field textarea { min-height:120px; resize: vertical; }
.summary-row { display:flex; justify-content:space-between; gap:10px; padding:12px 0; border-bottom:1px solid var(--line); color:#ddd; }
.summary-row.total { font-size:20px; font-weight:800; color:#fff; border-bottom:0; padding-top:18px; }
.notice-success {
  background: rgba(0,128,0,.15); border:1px solid rgba(0,128,0,.25); color:#ddffdd; padding:14px 16px; border-radius:16px; margin-top:16px; display:none;
}
.admin-layout { display:grid; grid-template-columns: 280px 1fr; gap:20px; }
.admin-sidebar {
  background: linear-gradient(180deg, #141414, #101010); border:1px solid var(--line); border-radius:28px; padding:24px; box-shadow: var(--shadow); min-height: calc(100vh - 170px);
}
.admin-menu { display:grid; gap:10px; margin-top:18px; }
.admin-menu a {
  padding:14px 16px; border-radius:16px; border:1px solid var(--line); color:#ddd; background: rgba(255,255,255,.02);
}
.admin-menu a.active, .admin-menu a:hover { background: linear-gradient(145deg, var(--primary-2), #930000); color:#fff; }
.stat-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap:16px; }
.stat { background: rgba(255,255,255,.03); border:1px solid var(--line); border-radius:20px; padding:18px; }
.stat strong { font-size:28px; display:block; margin-top:10px; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse: collapse; }
th, td { text-align:left; padding:14px 12px; border-bottom:1px solid var(--line); }
th { color:#ddd; font-size:14px; }
td { color: var(--muted); }
.status-pill { display:inline-block; padding:8px 10px; border-radius:999px; font-size:12px; border:1px solid var(--line); }
.status-on { background: rgba(0,128,0,.12); color:#d9ffd9; }
.status-off { background: rgba(255,165,0,.12); color:#ffe7c2; }
.login-wrap { max-width: 520px; margin: 60px auto; }

@media (max-width: 1080px) {
  .hero-grid, .support-grid, .products, .categories, .detail-grid, .feature-list, .related-grid, .spec-grid, .field-grid, .form-grid, .stat-grid, .admin-layout {
    grid-template-columns: 1fr 1fr;
  }
  .admin-layout { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .menu { display:none; }
  .hero-grid, .support-grid, .products, .categories, .mini-list, .detail-grid, .feature-list, .related-grid, .spec-grid, .field-grid, .form-grid, .stat-grid {
    grid-template-columns: 1fr;
  }
  .hero-main { padding:30px; min-height:420px; }
  .section-title { font-size:28px; }
  .nav-actions .ghost { display:none; }
  .detail-visual { min-height:420px; }
  .detail-title, .page-title { font-size: 34px; }
}


/* V3 backend management */
.toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:18px;
}
.toolbar-left, .toolbar-right {
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.filter-chip {
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:#ddd;
  font-size:13px;
}
.filter-chip.active {
  background:linear-gradient(145deg, var(--primary-2), #930000);
  color:#fff;
}
.search-input {
  min-width:260px;
  background:#0d0d0d;
  color:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:13px 14px;
}
.admin-panel-note {
  margin-top:14px;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--muted);
  line-height:1.7;
  font-size:14px;
}
.upload-box {
  border:1px dashed rgba(255,255,255,.18);
  border-radius:20px;
  padding:28px;
  background:rgba(255,255,255,.03);
  text-align:center;
  color:var(--muted);
}
.grid-3 {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}
.order-cards {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}
.order-card {
  border:1px solid var(--line);
  border-radius:20px;
  background:rgba(255,255,255,.03);
  padding:18px;
}
.order-card strong {
  display:block;
  font-size:18px;
  margin-bottom:10px;
}
.order-card span {
  color:var(--muted);
  font-size:14px;
  line-height:1.7;
}
@media (max-width: 980px) {
  .grid-3, .order-cards { grid-template-columns:1fr; }
  .search-input { min-width:100%; }
}


/* V4 real orders */
.success-card {
  max-width: 760px;
  margin: 40px auto 0;
}
.kv-grid {
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:14px;
}
.kv-item {
  border:1px solid var(--line);
  border-radius:18px;
  background: rgba(255,255,255,.03);
  padding:16px;
}
.kv-item strong {
  display:block;
  font-size:14px;
  margin-bottom:8px;
}
.kv-item span {
  color:var(--muted);
  line-height:1.6;
}
.status-form {
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
  margin-top:16px;
}
.inline-form {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}
.redirect-note {
  margin-top:12px;
  color:var(--muted);
  font-size:14px;
}
@media (max-width: 820px) {
  .kv-grid, .status-form { grid-template-columns: 1fr; }
}
