/* MASALA STUDIOS — WHOP SHOP
   Brand: masalastudios.pro (dark #070810, amber #F5A800, Clash Display + Satoshi) */

:root {
  --bg: #070810;
  --bg-soft: #0c0e1a;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f3f7;
  --text-muted: #9aa0b0;
  --text-faint: #62677a;
  --accent: #f5a800;
  --accent-soft: rgba(245, 168, 0, 0.12);
  --accent-border: rgba(245, 168, 0, 0.35);
  --ok: #3ecf8e;
  --err: #ff6b6b;
  --font-display: "Clash Display", "Satoshi", sans-serif;
  --font-body: "Satoshi", "Inter", system-ui, sans-serif;
  --radius: 18px;
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --maxw: 1180px;
}

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

/* The `hidden` attribute must always win over explicit display values */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: inherit; }

img { display: block; max-width: 100%; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: rgba(7, 8, 16, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--accent);
}

.brand-mark { width: 26px; height: 26px; }

.brand-name {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--text);
}

.brand-name strong { font-weight: 600; }
.brand-name em { font-style: normal; color: var(--accent); font-weight: 500; margin-left: 8px; }

.lang-switch { display: flex; gap: 4px; border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px; }

.lang-btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.lang-btn.active { color: #070810; background: var(--accent); }
.lang-btn:not(.active):hover { color: var(--text); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("../images/hero-bg.png");
  background-size: cover;
  background-position: center;
  opacity: 0.55;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,8,16,0.55) 0%, rgba(7,8,16,0.25) 40%, var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 96px 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  max-width: 13ch;
  white-space: pre-line;
}

.hero-subtitle {
  margin-top: 22px;
  max-width: 56ch;
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 400;
}

.hero-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.hero-badges li {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 8px 16px;
  backdrop-filter: blur(6px);
}

.hero-badges li::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 9px;
  vertical-align: 1px;
}

/* ---------- Sections ---------- */

.section { padding: 88px 0; }
.section-head { max-width: var(--maxw); margin: 0 auto 44px; padding: 0 24px; }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.01em;
}

/* ---------- Product grid ---------- */

.product-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  background: var(--surface-hover);
}

.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }

.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card-media img { transform: scale(1.04); }

.card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #070810;
  background: var(--accent);
  border-radius: 999px;
  padding: 5px 12px;
}

.card-body { display: flex; flex-direction: column; gap: 12px; padding: 22px; flex: 1; }

.card-title { font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -0.01em; }

.card-desc { color: var(--text-muted); font-size: 14.5px; flex: 1; }

.card-features { list-style: none; display: grid; gap: 6px; }

.card-features li {
  font-size: 13.5px;
  color: var(--text-muted);
  padding-left: 22px;
  position: relative;
}

.card-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }

.card-price { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--accent); }

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 11px 22px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.18s;
}

.btn-primary { background: var(--accent); color: #070810; }
.btn-primary:hover { background: #ffc233; transform: translateY(-1px); }

.btn-card { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-border); font-size: 13.5px; padding: 9px 18px; }
.btn-card:hover { background: var(--accent); color: #070810; border-color: var(--accent); }

.btn-card:disabled {
  cursor: not-allowed;
  background: rgba(245,168,0,.08);
  color: #e4b64c;
  border-color: rgba(245,168,0,.25);
  transform: none;
}
.card-foot { flex-wrap: wrap; }
.card-price { font-size: 14px; color: #aeb3c3; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Services band ---------- */

.services { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-soft); }

.services-inner { max-width: 760px; margin: 0 auto; text-align: center; padding: 0 24px; display: grid; gap: 20px; justify-items: center; }
.services-inner .eyebrow { margin-bottom: 0; }
.services-text { color: var(--text-muted); font-size: 17px; max-width: 58ch; }

/* ---------- FAQ ---------- */

.faq-list { max-width: 780px; margin: 0 auto; padding: 0 24px; display: grid; gap: 12px; }

.faq-list details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--accent); font-size: 20px; font-weight: 700; }
.faq-list details[open] summary::after { content: "–"; }

.faq-list p { margin-top: 14px; color: var(--text-muted); font-size: 15px; }

/* ---------- Footer ---------- */

.footer {
  padding: 44px 24px 32px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13.5px;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--border);
}

.footer a { color: var(--text-muted); text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer-note { font-size: 12.5px; }

/* ---------- Checkout modal ---------- */

.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }

.modal[hidden] { display: none; }

.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 5, 10, 0.78); backdrop-filter: blur(6px); }

.modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 720px);
  overflow-y: auto;
  background: #0d0f1c;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #0d0f1c;
  z-index: 1;
}

.modal-head h2 { font-family: var(--font-display); font-size: 19px; font-weight: 600; }

.modal-close {
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  width: 34px; height: 34px;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.modal-close:hover { color: var(--text); border-color: var(--accent); }

.modal-body { padding: 20px 22px 26px; }

.checkout-container { min-height: 380px; }

.checkout-notice {
  border: 1px dashed var(--accent-border);
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 22px;
  color: var(--text-muted);
  font-size: 14.5px;
}

.checkout-notice strong { color: var(--accent); display: block; margin-bottom: 8px; font-family: var(--font-display); font-size: 17px; }

/* ---------- Return page ---------- */

.return-wrap { max-width: 640px; margin: 0 auto; padding: 140px 24px 100px; text-align: center; }

.return-status { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 28px; font-size: 34px; }

.return-status.ok { background: rgba(62, 207, 142, 0.12); border: 1px solid rgba(62, 207, 142, 0.4); color: var(--ok); }
.return-status.err { background: rgba(255, 107, 107, 0.12); border: 1px solid rgba(255, 107, 107, 0.4); color: var(--err); }
.return-status.pending { background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--accent); }

.return-wrap h1 { font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); font-weight: 600; margin-bottom: 14px; }
.return-wrap p { color: var(--text-muted); font-size: 17px; max-width: 46ch; margin: 0 auto 30px; }
.return-id { font-size: 13px; color: var(--text-faint); word-break: break-all; }

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .header { padding: 14px 18px; }
  .hero { min-height: 62vh; }
  .hero-content { padding: 64px 20px; }
  .section { padding: 64px 0; }
  .card-foot { flex-direction: column; align-items: stretch; text-align: center; }
  .modal-panel { max-height: 92vh; }
}

/* ---------- Live AI category ---------- */
.hero-cta { margin-top: 26px; }
.section-sub { color: var(--text-muted); max-width: 640px; margin: 12px 0 0; font-size: 16px; }
.ai-section { scroll-margin-top: 80px; }
.ai-grid .card-media { aspect-ratio: 16 / 9; }
.card-price.is-live { color: var(--accent); font-size: 16px; font-weight: 600; }
.btn-live { text-decoration: none; }
.card-live { border-color: var(--accent-border); }
