:root {
  --bg: #0a0b0e;
  --bg-alt: #101218;
  --bg-card: #14161d;
  --bg-card-hover: #1c1f2a;
  --border: #272a35;
  --text: #ecedf2;
  --text-dim: #8a8f9e;
  --gold: #d4a845;
  --gold-light: #f0d78a;
  --gold-grad: linear-gradient(135deg, #d4a845 0%, #f0d78a 50%, #d4a845 100%);
  --radius: 12px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  --font: 'Rubik', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, button, select { font-family: inherit; outline: none; border: none; color: var(--text); }
button { cursor: pointer; }
ul { list-style: none; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

.container { width: calc(100% - 32px); max-width: 1264px; margin: 0 auto; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10, 11, 14, 0.94);
  border-bottom: 1px solid var(--border);
  height: 72px;
}
.header-inner {
  height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--gold-grad);
  color: #0a0b0e;
  font-weight: 900; font-size: 22px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(212, 168, 69, 0.35);
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}
.logo-text { font-weight: 800; font-size: 22px; letter-spacing: 0.3px; }
.logo-gold {
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.header-nav { display: flex; gap: 24px; align-items: center; }
.header-nav a { color: var(--text-dim); font-weight: 500; font-size: 15px; transition: color 0.2s; }
.header-nav a:hover { color: var(--gold); }
.header-nav a.active { color: var(--gold-light); font-weight: 600; }

/* ---------- Main ---------- */
.main { flex: 1; padding: 110px 0 60px; }
.main .row { display: flex; gap: 28px; align-items: stretch; }
.main .col-left { flex: 0 0 380px; max-width: 380px; }
.main .col-right { flex: 1; min-width: 0; }

/* ---------- Page builder sections ---------- */
.page-sec {
  position: relative;
  padding: 26px 0;
  border-radius: 14px;
  margin-bottom: 18px;
  background-size: cover;
  background-position: center;
}
.page-sec .sec-banner {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  border-radius: 14px;
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}
.page-sec > .hero-block,
.page-sec > .steps-block,
.page-sec > .html-block {
  position: relative;
  z-index: 1;
}
.hero-block {
  text-align: center;
  padding: 40px 20px;
}
.hero-logo {
  font-size: clamp(42px, 8vw, 72px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 2px;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 30px rgba(0,0,0,0.35));
  margin-bottom: 12px;
}
.hero-ip {
  font-size: 16px;
  color: var(--text-dim);
  font-weight: 600;
}
.html-block {
  padding: 20px 0;
  color: var(--text);
}
.steps-block { padding: 20px 0; }
.steps-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--gold-light);
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.step-num {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--gold-grad);
  color: #0a0b0e;
  font-weight: 900;
  font-size: 16px;
  border-radius: 100px;
  margin: 0 auto 10px;
}
.step p { color: var(--text-dim); font-size: 13px; }
.step b { color: var(--text); }

/* ---------- Items list ---------- */
.items-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 600px;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.items-box::before {
  content: '';
  position: absolute; left: 0; top: 0; right: 0;
  height: 3px;
  background: var(--gold-grad);
  opacity: 0.6;
}
.items-box .box-title {
  padding: 22px 26px 0;
  font-weight: 700; font-size: 16px;
  color: var(--gold-light);
}
.items-list {
  flex: 1; overflow-y: auto;
  padding: 10px 0; margin-top: 10px;
}
.items-list .item {
  cursor: pointer; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px 10px 26px;
  margin: 3px 10px;
  border-radius: 10px;
  transition: background 0.15s, border-color 0.15s;
  border: 1px solid transparent;
}
.items-list .item:hover { background: rgba(212, 168, 69, 0.06); border-color: rgba(212, 168, 69, 0.15); }
.items-list .item.active {
  background: rgba(212, 168, 69, 0.1);
  border-color: rgba(212, 168, 69, 0.3);
}
.items-list .item .item-img {
  width: 40px; height: 40px; border-radius: 8px; object-fit: cover;
  flex-shrink: 0;
}
.items-list .item .item-name { flex: 1; font-weight: 500; font-size: 14px; }
.items-list .item .item-price { color: var(--gold); font-weight: 700; font-size: 14px; white-space: nowrap; }
.items-list .item-divider { height: 1px; background: var(--border); margin: 8px 18px; }

/* ---------- Item card ---------- */
.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 600px;
  display: flex; flex-direction: column;
  padding: 28px 34px 30px;
  box-shadow: var(--shadow);
  position: relative;
  overflow-y: auto;
}
.item-card::before {
  content: '';
  position: absolute; left: 0; top: 0; right: 0;
  height: 3px;
  background: var(--gold-grad);
  opacity: 0.6;
}
.item-card .card-header { display: flex; gap: 18px; margin-bottom: 18px; align-items: flex-start; }
.item-card .card-header .card-img {
  width: 80px; height: 80px; border-radius: 12px; object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(212, 168, 69, 0.2);
}
.items-list .item .item-img {
  width: 40px; height: 40px; border-radius: 8px; object-fit: cover;
  flex-shrink: 0;
}
.item-card .card-header .card-info { flex: 1; }
.item-card .card-title { font-weight: 800; font-size: 24px; margin-bottom: 4px; }
.item-card .card-sub { color: var(--text-dim); font-size: 14px; }
.item-card .card-body { flex: 1; }
.item-card .card-body h4 { font-size: 14px; font-weight: 700; color: var(--gold-light); margin: 16px 0 8px; }
.item-card .card-body .cmd-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.item-card .card-body .cmd-list li {
  font-size: 13px; color: var(--text-dim);
  padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.item-card .card-body .cmd-list li:last-child { border-bottom: none; }
.item-card .card-body .specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}
.item-card .card-body .specs-grid .spec {
  font-size: 13px; color: var(--text-dim);
  padding: 6px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  display: flex; justify-content: space-between;
}
.item-card .card-body .specs-grid .spec .spec-val { color: var(--gold-light); font-weight: 600; }

.card-periods {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 14px 0;
}
.period-pill {
  display: flex; justify-content: space-between; align-items: center;
  flex: 1; min-width: 90px;
  background: transparent; color: var(--text);
  font-size: 13px; font-weight: 500;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  text-align: left;
}
.period-pill .pill-price { font-weight: 700; color: var(--gold); }
.period-pill:hover { border-color: var(--gold); }
.period-pill.selected { border-color: var(--gold); background: rgba(212, 168, 69, 0.1); box-shadow: 0 0 14px rgba(212, 168, 69, 0.1); }

.card-action {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-top: 4px; flex-wrap: wrap;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.card-action .card-price { font-size: 14px; color: var(--text-dim); font-weight: 500; }
.card-action .card-price span { font-size: 24px; font-weight: 800; color: var(--gold); margin-left: 4px; }

.btn-gold {
  background: var(--gold-grad);
  color: #0a0b0e;
  font-size: 15px; font-weight: 800;
  padding: 14px 30px; border-radius: 10px;
  text-transform: uppercase; letter-spacing: 0.4px;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 6px 20px rgba(212, 168, 69, 0.3);
}
.btn-gold:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 8px 26px rgba(212, 168, 69, 0.45); }
.btn-gold:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.empty-card { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-dim); font-size: 16px; }

/* ---------- Modal ---------- */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(5, 7, 10, 0.82); z-index: 1200;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #14161d; border: 1px solid var(--border);
  border-radius: 16px; width: 460px; max-width: 94vw;
  padding: 30px 34px; position: relative;
  max-height: 92vh; overflow-y: auto;
  box-shadow: 0 24px 70px rgba(0,0,0,0.55);
}
.modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; cursor: pointer;
  width: 32px; height: 32px;
  display: grid; place-items: center; border-radius: 8px;
  transition: background 0.15s;
}
.modal-close:hover { background: rgba(255,255,255,0.06); }
.modal-close svg { width: 18px; height: 18px; stroke: var(--text-dim); }
.modal-close:hover svg { stroke: var(--text); }
.modal-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.modal-title .gold { color: var(--gold); }
.modal-sub { font-size: 13px; color: var(--text-dim); margin-bottom: 14px; }
.modal-body { display: flex; flex-direction: column; gap: 0; }
.modal-input {
  margin-bottom: 12px; width: 100%; height: 50px;
  background: #0a0b0e; border: 1.5px solid var(--border);
  border-radius: 10px; text-align: center;
  font-size: 15px; font-weight: 500; color: var(--text);
  padding: 0 14px; transition: border-color 0.15s, box-shadow 0.15s;
}
.modal-input::placeholder { color: var(--text-dim); }
.modal-input:hover { border-color: rgba(212, 168, 69, 0.4); }
.modal-input:focus { border-color: var(--gold); box-shadow: 0 0 14px rgba(212, 168, 69, 0.15); }
.modal-action {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 6px; gap: 12px; flex-wrap: wrap;
}
.modal-action .modal-total { font-size: 14px; color: var(--text-dim); font-weight: 500; }
.modal-action .modal-total span { font-size: 24px; font-weight: 800; color: var(--gold); margin-left: 4px; }
.modal-privacy {
  margin-top: 20px; font-size: 12px; font-weight: 500;
  color: var(--text-dim); text-align: center;
}
.modal-privacy a, .modal-privacy span { color: var(--gold); font-weight: 600; }
.modal-privacy a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 30px 0 24px;
  margin-top: auto;
}
.footer-inner { display: flex; flex-direction: column; gap: 16px; }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav a { color: var(--text-dim); font-size: 14px; transition: color 0.2s; }
.footer-nav a:hover { color: var(--gold); }
.footer-pay { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-chips span {
  padding: 5px 12px; border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 11px; font-weight: 700;
  color: var(--text-dim); background: var(--bg-card);
}
.pay-chips span.sbp { color: #289b37; border-color: rgba(40,155,55,0.4); }
.footer-legal p { color: var(--text-dim); font-size: 13px; margin-bottom: 4px; }
.footer-legal a { color: var(--gold); }
.footer-disclaimer { opacity: 0.7; }
.footer-copyright { opacity: 0.55; font-size: 12px; }

/* ---------- Page sections ---------- */
.page-section { padding: 130px 0 60px; }
.page-section .container { max-width: 740px; }
.page-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; color: var(--gold-light); }
.page-title::after { content: ''; display: block; width: 46px; height: 4px; background: var(--gold-grad); border-radius: 4px; margin-top: 10px; }
.legal-box { line-height: 1.7; font-size: 15px; margin-top: 20px; }
.legal-box h2 { font-size: 16px; font-weight: 700; margin: 26px 0 6px; color: var(--gold); }
.legal-box p { margin-bottom: 10px; color: var(--text-dim); }
.legal-box b { color: var(--text); }
.legal-box a { color: var(--gold); font-weight: 600; }

/* ---------- Admin ---------- */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--bg-card); color: var(--text); }
.admin-table th, .admin-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table th { color: var(--text-dim); font-weight: 700; font-size: 12px; }
.status { padding: 2px 8px; font-size: 11px; font-weight: 700; }
.status-pending { color: #ffc107; }
.status-paid { color: #3ecf6e; }
.status-delivered { color: #3ecf6e; }
.status-failed { color: #ff5c5c; }
.admin-table-wrap { overflow-x: auto; }

@media (max-width: 940px) {
  .main .row { flex-direction: column; }
  .main .col-left { flex: none; max-width: none; }
  .items-box { height: 360px; }
  .item-card { min-height: 400px; padding: 22px 20px 26px; }
  .header-nav { gap: 16px; }
  .header-nav a { font-size: 13px; }
  .modal { width: 94vw; padding: 26px 20px; }
  .footer-top { flex-direction: column; align-items: flex-start; }
  .card-body .specs-grid { grid-template-columns: 1fr; }
}