:root {
  --orange: #FF6600;
  --orange-dark: #cc5200;
  --orange-light: #fff3eb;
  --ink: #1A1A2E;
  --muted: #5f6478;
  --line: #e2e4ea;
  --surface: #ffffff;
  --soft: #f6f7fb;
  --green: #0a8a5c;
  --green-dark: #076b47;
  --sky: #e8f1ff;
  --mint: #e4f8f0;
  --sun: #fff5e0;
  --rose: #fff0f3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button, a { color: inherit; font: inherit; }

button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  padding: 0 14px;
  font-size: 14px;
}
button:hover { border-color: var(--orange); color: var(--orange-dark); }

.primary { border-color: var(--orange); background: var(--orange); color: #fff; }
.primary:hover { background: var(--orange-dark); color: #fff; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 20px;
  min-height: 64px;
  border-bottom: 2px solid var(--line);
  background: rgba(255,255,255,0.97);
  padding: 0 clamp(16px,5vw,64px);
}

.brand {
  font-size: 26px; font-weight: 900;
  text-decoration: none; color: var(--orange);
  letter-spacing: -0.5px;
}
.brand span { color: var(--ink); }

nav { display: flex; gap: 16px; margin-left: auto; }
nav a { text-decoration: none; font-size: 14px; font-weight: 600; color: var(--muted); }
nav a:hover { color: var(--orange); }

.login-btn { min-width: 80px; border-color: var(--orange); color: var(--orange); }
.login-btn:hover { background: var(--orange); color: #fff; }

main { display: grid; gap: 40px; padding-bottom: 60px; }

/* HERO */
.hero {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(260px,340px);
  gap: 28px; align-items: end;
  min-height: 420px;
  padding: 56px clamp(16px,5vw,64px) 44px;
  background:
    linear-gradient(110deg,rgba(255,255,255,0.97),rgba(255,255,255,0.6)),
    linear-gradient(135deg, #fff3eb, #e8f1ff, #fff5e0);
}
.eyebrow {
  margin: 0 0 10px; color: var(--orange-dark);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}
.hero h1 {
  max-width: 680px; margin: 0;
  font-size: clamp(34px,5.5vw,72px); line-height: 0.96;
}
.hero h1 em { color: var(--orange); font-style: normal; }
.hero p { max-width: 560px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.hero-panel {
  display: grid; gap: 8px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  padding: 18px;
}
.hero-panel span { color: var(--muted); font-size: 13px; }
.hero-panel strong { font-size: 18px; }
.hero-panel small { color: var(--muted); font-size: 12px; line-height: 1.4; }

/* STATS */
.catalog-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
  padding: 0 clamp(16px,5vw,64px);
}
.stat-tile {
  display: grid; gap: 6px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255,255,255,0.9); padding: 18px;
}
.stat-tile:nth-child(1) { background: linear-gradient(135deg,#fff,var(--orange-light)); }
.stat-tile:nth-child(2) { background: linear-gradient(135deg,#fff,var(--mint)); }
.stat-tile:nth-child(3) { background: linear-gradient(135deg,#fff,var(--sky)); }
.stat-tile:nth-child(4) { background: linear-gradient(135deg,#fff,var(--sun)); }
.stat-tile span { color: var(--muted); font-size: 13px; }
.stat-tile strong { font-size: 32px; line-height: 1; }

/* TAG INVENTORY */
.tag-inventory {
  padding: 0 clamp(16px,5vw,64px);
}
.tag-inventory h2 { margin: 0 0 6px; font-size: 22px; }
.tag-count-badge {
  display: inline-block; background: var(--orange); color: #fff;
  font-size: 13px; font-weight: 700; padding: 3px 12px;
  border-radius: 20px; margin-bottom: 14px;
}
.tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px,1fr));
  gap: 10px;
}
.tag-card {
  display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); padding: 12px 14px;
  cursor: default;
  transition: border-color .15s;
}
.tag-card:hover { border-color: var(--orange); }
.tag-num {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
  margin-top: 1px;
}
.tag-info { flex: 1; min-width: 0; }
.tag-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.tag-desc { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.tag-badge {
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 8px; white-space: nowrap; margin-top: 4px;
  display: inline-block;
}
.ga4   { background:#E8F5E9; color:#1B5E20; }
.ads   { background:#E3F2FD; color:#0D47A1; }
.meta  { background:#F3E5F5; color:#4A148C; }
.engage{ background:#FFF3E0; color:#E65100; }
.consent{background:#E0F7FA; color:#006064; }
.num-ga4   { background:#1B5E20; color:#fff; }
.num-ads   { background:#1565C0; color:#fff; }
.num-meta  { background:#6A1B9A; color:#fff; }
.num-engage{ background:#E65100; color:#fff; }
.num-consent{background:#006064; color:#fff;}

/* LAYOUT */
.layout {
  display: grid;
  grid-template-columns: 220px minmax(0,1fr);
  gap: 28px;
  padding: 0 clamp(16px,5vw,64px);
}
.filters { display: grid; align-content: start; gap: 10px; }
.filter-group { display: grid; gap: 8px; }
.filters h2, .products h2 { margin: 0; font-size: 20px; }
.section-heading {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 14px;
}
.section-heading span { color: var(--muted); font-size: 13px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
}
.product-card {
  display: grid; gap: 0;
  border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; background: var(--surface);
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  transition: box-shadow .15s;
}
.product-card:hover { box-shadow: 0 8px 28px rgba(255,102,0,0.12); }
.product-card img {
  display: block; width: 100%; aspect-ratio: 4/3;
  object-fit: cover; background: var(--soft);
}
.promo-banner {
  background: var(--orange); color: #fff;
  font-size: 11px; font-weight: 700; padding: 4px 10px;
  text-align: center;
}
.product-body { display: grid; gap: 8px; padding: 12px; }
.product-body h3 { margin: 0; font-size: 14px; line-height: 1.3; min-height: 36px; }
.meta, .price-row {
  display: flex; justify-content: space-between; gap: 8px;
  color: var(--muted); font-size: 12px;
}
.price-row strong { color: var(--ink); font-size: 16px; }
.stars { color: var(--orange); font-size: 12px; }
.tier-pill {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 8px;
  background: var(--orange-light); color: var(--orange-dark);
}
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

/* BOOKING FUNNEL */
.checkout {
  margin: 0 clamp(16px,5vw,64px);
  border-top: 3px solid var(--orange);
  padding-top: 24px; display: grid; gap: 16px;
}
.checkout h2 { margin: 0; font-size: 20px; }
.checkout-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.funnel-step {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted); margin-top: 6px;
}
.funnel-arrow { color: var(--orange); font-weight: 700; }

/* DEPLOY PANEL */
.deploy-panel {
  margin: 0 clamp(16px,5vw,64px);
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(240px,380px);
  gap: 18px; align-items: start;
  border-top: 3px solid var(--green);
  background: var(--mint);
  padding: 24px; border-radius: 10px;
}
.deploy-panel h2 { margin: 0; font-size: 20px; color: var(--green-dark); }
.deploy-panel p { max-width: 580px; margin: 8px 0 0; color: var(--muted); line-height: 1.5; font-size: 14px; }
.deploy-steps { display: grid; gap: 8px; }
.deploy-steps span {
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); padding: 10px 14px; font-size: 13px;
}

/* EVENT CONSOLE */
.event-console {
  margin: 0 clamp(16px,5vw,64px);
  border-top: 3px solid var(--ink); padding-top: 22px;
}
.event-console h2 { margin: 0; font-size: 20px; }
#eventLog {
  min-height: 280px; max-height: 440px; overflow: auto;
  border: 1px solid var(--line); border-radius: 8px;
  background: #0f1117; color: #e8eaf0;
  padding: 16px; white-space: pre-wrap; font-family: 'Courier New', monospace; font-size: 12px;
}

footer {
  display: flex; align-items: center; gap: 24px;
  border-top: 3px solid var(--ink);
  margin: 0 clamp(16px,5vw,64px); padding: 28px 0 40px;
  color: var(--muted); font-size: 13px;
}
footer strong { color: var(--orange); font-size: 28px; font-weight: 900; }

@media (max-width:980px) {
  .hero, .layout, .catalog-stats { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .deploy-panel { grid-template-columns: 1fr; }
}
@media (max-width:620px) {
  .product-grid { grid-template-columns: 1fr; }
  .checkout-actions, footer { flex-direction: column; align-items: stretch; }
}
