:root {
  --bg: #070707;
  --panel: #121212;
  --panel-soft: #1c1718;
  --text: #f6f1eb;
  --muted: #b2aaa3;
  --accent: #d7a85a;
  --accent-2: #7a1f2a;
  --line: rgba(215, 168, 90, 0.22);
  --danger: #ef4444;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(122,31,42,.4), transparent 32rem), var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
input, textarea, select, button {
  font: inherit;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(18px, 5vw, 72px);
  background: rgba(7,7,7,.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand, .nav-links { display: flex; align-items: center; gap: 18px; }
.brand { font-weight: 900; letter-spacing: .03em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #fff0ba);
  color: #1a1110;
  box-shadow: 0 0 28px rgba(215,168,90,.35);
}
.nav-links a { color: var(--muted); font-weight: 700; font-size: 14px; }
.nav-links a:hover { color: var(--accent); }
.flash {
  margin: 16px auto 0;
  max-width: 1180px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: rgba(215,168,90,.12);
  border-radius: 10px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: 48px;
  min-height: 76vh;
  padding: 64px clamp(18px, 5vw, 72px);
}
.hero-copy h1 {
  margin: 14px 0;
  font-size: clamp(48px, 10vw, 104px);
  line-height: .88;
  letter-spacing: 0;
}
.hero-copy p, .lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  max-width: 650px;
}
.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero-panel {
  min-height: 500px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(215,168,90,.16), rgba(122,31,42,.28));
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,.42);
  overflow: hidden;
}
.hero-panel img { width: min(92%, 470px); }

.section, .admin, .product-page, .message {
  padding: 48px clamp(18px, 5vw, 72px);
  max-width: 1320px;
  margin: 0 auto;
}
.section-head, .admin-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
h1, h2, h3, p { margin-top: 0; }
h2 { font-size: clamp(30px, 5vw, 52px); margin-bottom: 0; }
.actions, .chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255,255,255,.04);
  padding: 13px 18px;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
}
.btn.primary {
  color: #1a1110;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), #fff0ba);
}
.btn.ghost { background: transparent; color: var(--accent); }
.btn.small { padding: 10px 14px; }
.btn.full { display: block; width: 100%; margin-top: 12px; }
.text-link { color: var(--accent); font-weight: 900; }

.search { display: flex; gap: 10px; min-width: min(460px, 100%); }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  color: var(--text);
  padding: 12px 13px;
}
textarea { min-height: 92px; resize: vertical; }
label { color: var(--muted); font-size: 13px; font-weight: 800; display: grid; gap: 8px; }
.chips a {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}
.chips .active { background: var(--accent); color: #1a1110; border-color: transparent; font-weight: 900; }

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(18,18,18,.76);
  overflow: hidden;
}
.image-wrap {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1.08;
  background: #171313;
  overflow: hidden;
}
.image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover img { transform: scale(1.06); }
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #1a1110;
  font-size: 12px;
  font-weight: 900;
}
.badge.danger { left: auto; right: 12px; background: var(--danger); color: white; }
.card-body { padding: 16px; }
.category, .stock { color: var(--muted); font-size: 13px; }
.card h3 { min-height: 48px; margin-bottom: 10px; }
.price { display: flex; align-items: center; gap: 10px; }
.price strong { color: var(--accent); font-size: 20px; }
.price span { color: #8f8580; text-decoration: line-through; }
.price.large strong { font-size: 34px; }
.empty {
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  padding: 28px;
  text-align: center;
  background: rgba(255,255,255,.03);
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(300px, 520px) minmax(0, 1fr);
  gap: 46px;
}
.back { display: inline-block; color: var(--accent); margin-bottom: 24px; font-weight: 900; }
.product-image {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
}
.product-image img { width: 100%; aspect-ratio: 1 / 1.08; object-fit: cover; }
.product-info h1 { font-size: clamp(36px, 6vw, 66px); line-height: 1; margin: 14px 0; }
.meta-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.meta-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--muted);
}
.order-form { border-top: 1px solid var(--line); padding-top: 24px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.wide { grid-column: 1 / -1; }

.admin-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 24px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(18,18,18,.86);
  padding: 20px;
}
.panel h2 { font-size: 28px; margin-bottom: 18px; }
.panel form { display: grid; gap: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checks { display: flex; gap: 18px; }
.checks label { display: flex; align-items: center; gap: 8px; }
.checks input { width: auto; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { padding: 13px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--accent); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
small { color: var(--muted); }
.row-actions, .status-form { display: flex; flex-wrap: wrap; gap: 8px; }
.mini {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  color: var(--text);
  padding: 8px 10px;
  cursor: pointer;
}
.admin-login, .message {
  min-height: 66vh;
  display: grid;
  place-items: center;
}
.login-box {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(18,18,18,.9);
  padding: 26px;
}
.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 36px clamp(18px, 5vw, 72px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 42px;
}

@media (max-width: 980px) {
  .hero, .product-detail, .admin-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-panel { min-height: 340px; }
  .section-head, .admin-head, .footer { align-items: flex-start; flex-direction: column; }
  .search { width: 100%; }
}

@media (max-width: 560px) {
  .nav { align-items: flex-start; flex-direction: column; gap: 12px; }
  .nav-links { width: 100%; justify-content: space-between; }
  .grid, .form-grid, .two { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
}
