/* ============================================================
   Fireworks Shop — night-sky theme
   Mobile-first. Palette:
   --night   #101430  deep midnight blue (background)
   --panel   #1A2044  raised card blue
   --gold    #F5B942  spark gold (primary accent / CTAs)
   --red     #E8503A  festive red (secondary accent)
   --ink     #F4F2EC  warm off-white text
   --muted   #9AA0C3  muted blue-grey text
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@500;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --night: #101430;
  --night-deep: #0A0D22;
  --panel: #1A2044;
  --panel-line: #2A3160;
  --gold: #F5B942;
  --gold-dark: #D99A1E;
  --red: #E8503A;
  --ink: #F4F2EC;
  --muted: #9AA0C3;
  --radius: 12px;
  --display: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
  --body: 'Inter', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--body);
  background: var(--night);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.2; }
a { color: var(--gold); text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
.site-header {
  background: var(--night-deep);
  border-bottom: 1px solid var(--panel-line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-logo { height: 40px; width: auto; }
.brand-mark { color: var(--gold); font-size: 1.5rem; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.05rem; }

.nav-toggle {
  display: block; background: none; border: 1px solid var(--panel-line);
  color: var(--ink); font-size: 1.3rem; padding: 4px 12px; border-radius: 8px; cursor: pointer;
}
.site-nav {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  background: var(--night-deep); border-bottom: 1px solid var(--panel-line);
  flex-direction: column; padding: 8px 16px 16px;
}
.site-nav.open { display: flex; }
.site-nav a { color: var(--ink); padding: 10px 4px; border-bottom: 1px solid var(--panel-line); }
.site-nav a:last-child { border-bottom: none; }
.cart-badge {
  background: var(--red); color: #fff; border-radius: 999px;
  font-size: 0.72rem; padding: 1px 7px; margin-left: 4px; font-weight: 600;
}

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-block; padding: 11px 22px; border-radius: 999px;
  font-weight: 600; font-family: var(--body); font-size: 0.95rem;
  border: none; cursor: pointer; text-align: center; transition: transform .12s ease, background .15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--gold); color: #21170A; }
.btn-primary:hover { background: var(--gold-dark); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--panel-line); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn-block { display: block; width: 100%; }

label { display: block; font-size: 0.87rem; color: var(--muted); margin: 14px 0 5px; font-weight: 500; }
input, select, textarea {
  width: 100%; padding: 11px 13px; background: var(--night-deep);
  border: 1px solid var(--panel-line); border-radius: 8px; color: var(--ink);
  font-family: var(--body); font-size: 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
input[type="file"] { padding: 8px; }
input[type="checkbox"], input[type="radio"] { width: auto; }

.alert { padding: 12px 15px; border-radius: 8px; margin: 14px 0; font-size: 0.92rem; }
.alert-error { background: rgba(232, 80, 58, .12); border: 1px solid var(--red); color: #FFB3A7; }
.alert-success { background: rgba(102, 200, 130, .1); border: 1px solid #4CAF6E; color: #A5E8BC; }

/* ---------- Hero / banners ---------- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 56px 16px 64px; background: radial-gradient(ellipse at 50% -20%, #232B5C 0%, var(--night) 60%);
}
.hero h1 { font-size: clamp(1.9rem, 6vw, 3.2rem); font-weight: 800; }
.hero h1 .spark { color: var(--gold); }
.hero p { color: var(--muted); max-width: 520px; margin: 12px auto 24px; }

.hero-welcome {
  display: grid; gap: 20px; align-items: center;
  background: linear-gradient(135deg, rgba(26, 32, 68, 0.96), rgba(10, 13, 34, 0.95));
  border: 1px solid var(--panel-line);
  border-radius: 22px; padding: 24px; box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}
.hero-copy h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  margin-bottom: 10px;
}
.eyebrow {
  display: inline-flex; margin-bottom: 12px; padding: 5px 10px; border-radius: 999px;
  background: rgba(245, 185, 66, 0.12); color: var(--gold); font-size: 0.78rem;
  letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
}
.hero-copy p {
  color: var(--muted); max-width: 620px; margin-bottom: 20px;
}
.hero-cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-highlight-grid { display: grid; gap: 12px; }
.highlight-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px; background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-line); border-radius: 16px;
}
.highlight-card strong { display: block; margin-bottom: 2px; }
.highlight-card p { color: var(--muted); font-size: 0.88rem; margin: 0; }
.highlight-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(245, 185, 66, 0.14); color: var(--gold); font-size: 1.1rem;
}
.highlight-icon svg,
.shop-pills svg {
  width: 18px; height: 18px;
}

.feature-strip {
  display: grid; gap: 14px;
}
.feature-card {
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: 16px;
  padding: 16px; box-shadow: 0 10px 36px rgba(0,0,0,0.18);
}
.feature-card strong { color: var(--ink); }
.feature-card p { color: var(--muted); margin-top: 4px; font-size: 0.92rem; }

.section-header { margin-bottom: 18px; }
.panel-glow {
  background: linear-gradient(180deg, rgba(26, 32, 68, 0.98), rgba(17, 21, 49, 0.96));
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
}
.steps-grid {
  display: grid; gap: 12px;
}
.step-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-line); border-radius: 16px;
  padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
.step-card strong { color: var(--ink); }
.step-card p { color: var(--muted); font-size: 0.9rem; }
.step-num {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(245, 185, 66, 0.14); color: var(--gold); font-weight: 800;
}

/* signature: tiny star field */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 30%, var(--gold) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 18%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 62% 55%, var(--red) 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 70%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90% 62%, var(--gold) 50%, transparent 51%),
    radial-gradient(1px 1px at 45% 15%, var(--gold) 50%, transparent 51%);
  opacity: .8;
}

.banner-slider { position: relative; overflow: hidden; }
.banner-track { display: flex; transition: transform .5s ease; }
.banner-slide { min-width: 100%; position: relative; }
.banner-slide img { width: 100%; height: 240px; object-fit: cover; }
.banner-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 20px 20px;
  background: linear-gradient(transparent, rgba(10, 13, 34, .9));
}
.banner-caption h2 { font-size: 1.3rem; }
.banner-caption p { color: var(--muted); font-size: 0.9rem; }
.banner-dots { position: absolute; bottom: 10px; right: 14px; display: flex; gap: 6px; }
.banner-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.4); cursor: pointer;
}
.banner-dots button.active { background: var(--gold); }

/* ---------- Product grid ---------- */
.section { padding: 36px 0; }
.section-headline {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
}
.checkout-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.checkout-head .section-title { margin-bottom: 0; }
.section-title { font-size: 1.4rem; margin-bottom: 4px; }
.section-sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 0; }
.shop-pills {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px;
}
.shop-pills span {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(245, 185, 66, 0.08); color: var(--gold);
  border: 1px solid rgba(245, 185, 66, 0.22); border-radius: 999px;
  padding: 6px 10px; font-size: 0.78rem; font-weight: 700;
}
.shop-pills svg {
  flex: 0 0 auto;
}

.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.product-card {
  background: var(--panel); border: 1px solid var(--panel-line);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .15s;
}
.product-card:hover { border-color: var(--gold); }
.product-card .thumb { aspect-ratio: 1; background: radial-gradient(circle at top, rgba(245, 185, 66, 0.18), rgba(10, 13, 34, 0.9)); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .thumb .no-img {
  display: flex; align-items: center; justify-content: center; height: 100%;
  color: rgba(245, 185, 66, 0.75); font-size: 2rem;
}
.product-card .thumb .no-img svg {
  width: 56px; height: 56px;
}
.product-card .card-body { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.product-card h3 { font-size: 0.98rem; }
.product-card h3 a { color: var(--ink); }
.product-card .price { color: var(--gold); font-weight: 600; margin-top: auto; }
.product-card .cat { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Product page ---------- */
.product-detail { display: grid; gap: 24px; padding: 28px 0; }
.product-detail .photo { border-radius: var(--radius); overflow: hidden; background: var(--panel); border: 1px solid var(--panel-line); }
.product-detail .photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.variation-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.variation-option {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--panel-line); border-radius: 8px; padding: 11px 13px; cursor: pointer;
}
.variation-option:has(input:checked) { border-color: var(--gold); background: rgba(245, 185, 66, .07); }
.variation-option .v-thumb {
  width: 48px; height: 48px; border-radius: 8px; overflow: hidden;
  background: var(--night-deep); border: 1px solid var(--panel-line); flex: 0 0 auto;
}
.variation-option .v-thumb img { width: 100%; height: 100%; object-fit: cover; }
.variation-option .v-name { flex: 1; }
.variation-option .v-price { color: var(--gold); font-weight: 600; }
.variation-option .v-stock { font-size: 0.78rem; color: var(--muted); }
.qty-row { display: flex; gap: 10px; align-items: center; margin: 14px 0; }
.qty-row input { width: 84px; text-align: center; }

/* ---------- Cart / checkout / tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data th, table.data td { padding: 11px 10px; text-align: left; border-bottom: 1px solid var(--panel-line); vertical-align: middle; }
table.data th {
  color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: .04em; background: rgba(255, 255, 255, 0.02);
}
table.data tbody tr:hover { background: rgba(245, 185, 66, 0.06); }
.cart-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; }

.panel {
  background: linear-gradient(180deg, rgba(26, 32, 68, 0.98), rgba(16, 20, 48, 0.98));
  border: 1px solid var(--panel-line);
  border-radius: var(--radius); padding: 20px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
}
.panel h3 { color: var(--ink); margin-bottom: 8px; }
.checkout-step-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.08rem; margin-bottom: 10px;
}
.step-marker {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: rgba(245, 185, 66, 0.14); color: var(--gold);
  font-size: 0.82rem; font-weight: 800;
}
.summary-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.summary-pill {
  display: inline-flex; align-items: center; padding: 4px 8px;
  border-radius: 999px; background: rgba(245, 185, 66, 0.12);
  color: var(--gold); font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
}
.checkout-summary-panel {
  position: sticky; top: 18px;
}
.checkout-grid { display: grid; gap: 20px; padding: 24px 0; }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.95rem; }
.summary-row.total { border-top: 1px solid var(--panel-line); margin-top: 8px; padding-top: 12px; font-weight: 700; font-size: 1.1rem; }
.summary-row.total .amount { color: var(--gold); }

.choice-cards { display: grid; gap: 10px; }
.choice-card {
  border: 1px solid var(--panel-line); border-radius: 10px; padding: 13px 15px;
  cursor: pointer; display: flex; gap: 10px; align-items: flex-start;
}
.choice-card:has(input:checked) { border-color: var(--gold); background: rgba(245, 185, 66, .07); }
.choice-card strong { display: block; }
.choice-card small { color: var(--muted); }

.pay-details {
  background: var(--night-deep); border: 1px dashed var(--panel-line);
  border-radius: 10px; padding: 14px 16px; margin-top: 10px; font-size: 0.92rem;
}
.pay-details strong { color: var(--gold); }

.order-success-shell { display: grid; gap: 16px; }
.order-success-hero {
  text-align: center; padding: 26px 22px; background:
    radial-gradient(circle at top, rgba(245, 185, 66, 0.14), transparent 40%),
    linear-gradient(180deg, rgba(26, 32, 68, 0.98), rgba(16, 20, 48, 0.98));
}
.order-success-icon {
  width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 12px;
  display: grid; place-items: center; font-size: 2rem;
  background: rgba(245, 185, 66, 0.14); border: 1px solid rgba(245, 185, 66, 0.25);
}
.order-success-title { margin: 8px 0 4px; font-size: 2rem; }
.order-success-subtitle { color: var(--muted); margin: 0; }
.order-success-code {
  margin: 16px 0 4px; font-family: var(--display); font-size: 1.7rem; font-weight: 800;
  color: var(--gold); letter-spacing: .02em;
}
.order-success-badge-wrap { margin: 0; }
.order-success-meta { margin: 10px 0 0; color: var(--muted); font-size: 0.82rem; }
.order-success-summary,
.order-success-next,
.order-success-whatsapp {
  background: linear-gradient(180deg, rgba(24, 30, 64, 0.98), rgba(16, 20, 48, 0.98));
}

.status-badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600;
}
.st-pending_payment { background: rgba(245,185,66,.15); color: var(--gold); }
.st-payment_review { background: rgba(120,150,255,.15); color: #9FB4FF; }
.st-confirmed { background: rgba(102,200,130,.15); color: #A5E8BC; }
.st-shipped { background: rgba(140,120,255,.15); color: #C3B7FF; }
.st-completed { background: rgba(102,200,130,.25); color: #C9F5D8; }
.st-cancelled { background: rgba(232,80,58,.15); color: #FFB3A7; }

/* ---------- Auth ---------- */
.auth-box { max-width: 420px; margin: 40px auto; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--panel-line); background: var(--night-deep);
  padding: 22px 0; margin-top: 40px; color: var(--muted); font-size: 0.84rem; text-align: center;
}

/* ---------- Admin ---------- */
.admin-layout { display: flex; flex-direction: column; min-height: 100vh; }
.admin-topbar {
  background: linear-gradient(180deg, #121735, #0A0D22);
  border-bottom: 1px solid var(--panel-line);
  display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
}
.admin-topbar h1 { font-size: 1rem; }
.admin-topbar-actions {
  display: flex; gap: 10px; align-items: center; font-size: 0.88rem; flex-wrap: wrap;
}
.admin-topbar-actions a { color: var(--ink); }
.logout-link { color: var(--red) !important; }
.admin-nav {
  display: flex; flex-wrap: nowrap; gap: 4px; padding: 10px 16px; background: var(--panel);
  border-bottom: 1px solid var(--panel-line);
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.admin-nav a { color: var(--muted); padding: 7px 13px; border-radius: 8px; font-size: 0.9rem; white-space: nowrap; flex-shrink: 0; }
.admin-nav a.active, .admin-nav a:hover { background: var(--night-deep); color: var(--gold); }
.admin-topbar-actions a:hover { color: var(--gold); }
.admin-content { padding: 22px 16px; max-width: 1100px; width: 100%; margin: 0 auto; }
.dashboard-head { margin-bottom: 16px; }
.dashboard-head h2 { font-size: 1.6rem; margin-top: 4px; }
.admin-breadcrumb {
  display: inline-block; margin-bottom: 8px; color: var(--muted); font-size: 0.9rem;
}
.admin-breadcrumb:hover { color: var(--gold); }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card {
  background: linear-gradient(180deg, rgba(26, 32, 68, 0.95), rgba(16, 20, 48, 0.98));
  border: 1px solid var(--panel-line); border-radius: var(--radius); padding: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}
.stat-card .num { font-size: 1.6rem; font-weight: 800; font-family: var(--display); color: var(--gold); }
.stat-card .lbl { color: var(--muted); font-size: 0.82rem; }
.admin-panel {
  overflow: hidden; background: linear-gradient(180deg, rgba(26, 32, 68, 0.95), rgba(16, 20, 48, 0.98));
}
.variation-editor-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.variation-editor-row .variation-img-cell { display: flex; flex-direction: column; gap: 6px; }
.variation-editor-row .variation-img-cell img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--panel-line); }
.form-grid-2 { display: grid; gap: 0 16px; }
.inline-form { display: inline; }
.admin-thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; }
.banner-admin-img { width: 130px; border-radius: 8px; }

/* ---------- Desktop ---------- */
@media (min-width: 720px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex !important; position: static; flex-direction: row;
    background: none; border: none; padding: 0; gap: 4px; align-items: center;
  }
  .site-nav a { border: none; padding: 8px 13px; border-radius: 8px; }
  .site-nav a:hover { background: var(--panel); color: var(--gold); }
  .hero-welcome { grid-template-columns: 1.1fr 0.9fr; padding: 32px; }
  .hero-highlight-grid { grid-template-columns: 1fr; }
  .feature-strip { grid-template-columns: repeat(3, 1fr); }
  .steps-grid { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .product-detail { grid-template-columns: 1fr 1fr; }
  .checkout-grid { grid-template-columns: 1.5fr 1fr; align-items: start; }
  .banner-slide img { height: 380px; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
  .admin-nav { flex-wrap: wrap; overflow-x: visible; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
