:root,
html[data-theme="zain"] {
  --bg: #fce7f3;
  --bg-mid: #fdf2f8;
  --bg-end: #fff7fb;
  --glow: rgba(176, 0, 120, 0.32);
  --panel: #ffffff;
  --panel-soft: #fce7f3;
  --panel-grad: #fff0f7;
  --text: #831843;
  --muted: #6b7280;
  --primary: #b00078;
  --primary-dark: #9d0068;
  --primary-deep: #6b0048;
  --accent: #e879c0;
  --lime: #f9a8d4;
  --banner-bg: #fce7f3;
  --banner-text: #9d0068;
  --chip-bg: #6b0048;
  --chip-text: #fbcfe8;
  --cta-start: #9d0068;
  --cta-end: #e879c0;
  --float-text: #6b0048;
  --overlay: rgba(107, 0, 72, 0.55);
  --border: rgba(176, 0, 120, 0.18);
  --shadow: 0 24px 70px rgba(176, 0, 120, 0.22);
  --theme-rgb: 176, 0, 120;
}

html[data-theme="stc"] {
  --bg: #f3e8ff;
  --bg-mid: #faf5ff;
  --bg-end: #fcfaff;
  --glow: rgba(79, 0, 140, 0.34);
  --panel: #ffffff;
  --panel-soft: #efe0ff;
  --panel-grad: #f5eeff;
  --text: #3b0764;
  --muted: #6b7280;
  --primary: #4f008c;
  --primary-dark: #3d006e;
  --primary-deep: #2e0054;
  --accent: #9b4dff;
  --lime: #c4b5fd;
  --banner-bg: #efe0ff;
  --banner-text: #3d006e;
  --chip-bg: #2e0054;
  --chip-text: #e9d5ff;
  --cta-start: #3d006e;
  --cta-end: #9b4dff;
  --float-text: #2e0054;
  --overlay: rgba(46, 0, 84, 0.55);
  --border: rgba(79, 0, 140, 0.18);
  --shadow: 0 24px 70px rgba(79, 0, 140, 0.24);
  --theme-rgb: 79, 0, 140;
}

html[data-theme="mobily"] {
  --bg: #e0f2fe;
  --bg-mid: #f0f9ff;
  --bg-end: #f8fbff;
  --glow: rgba(0, 87, 184, 0.32);
  --panel: #ffffff;
  --panel-soft: #dbeafe;
  --panel-grad: #eef6ff;
  --text: #0c4a6e;
  --muted: #54758a;
  --primary: #0057b8;
  --primary-dark: #004494;
  --primary-deep: #00306b;
  --accent: #3b82f6;
  --lime: #93c5fd;
  --banner-bg: #dbeafe;
  --banner-text: #004494;
  --chip-bg: #00306b;
  --chip-text: #bfdbfe;
  --cta-start: #004494;
  --cta-end: #3b82f6;
  --float-text: #00306b;
  --overlay: rgba(0, 48, 107, 0.55);
  --border: rgba(0, 87, 184, 0.18);
  --shadow: 0 24px 70px rgba(0, 87, 184, 0.22);
  --theme-rgb: 0, 87, 184;
}

html[data-theme="salam"] {
  --bg: #dcfce7;
  --bg-mid: #f0fdf4;
  --bg-end: #f7fff9;
  --glow: rgba(0, 166, 81, 0.34);
  --panel: #ffffff;
  --panel-soft: #bbf7d0;
  --panel-grad: #eafff1;
  --text: #14532d;
  --muted: #4b6354;
  --primary: #00a651;
  --primary-dark: #008f45;
  --primary-deep: #006b34;
  --accent: #22c55e;
  --lime: #86efac;
  --banner-bg: #dcfce7;
  --banner-text: #006b34;
  --chip-bg: #006b34;
  --chip-text: #bbf7d0;
  --cta-start: #008f45;
  --cta-end: #4ade80;
  --float-text: #006b34;
  --overlay: rgba(0, 107, 52, 0.55);
  --border: rgba(0, 166, 81, 0.18);
  --shadow: 0 24px 70px rgba(0, 166, 81, 0.22);
  --theme-rgb: 0, 166, 81;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 12px;
  background:
    radial-gradient(circle at top, var(--glow), transparent 42%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-mid) 45%, var(--bg-end) 100%);
  background-color: var(--bg);
  color: var(--text);
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  transition:
    background 0.85s ease,
    background-color 0.85s ease,
    color 0.55s ease;
}

.disclosure-banner {
  margin: 0;
  padding: 10px 18px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: var(--banner-bg);
  color: var(--banner-text);
  font-size: 12px;
  line-height: 1.65;
  text-align: center;
  transition: background 0.45s ease, color 0.45s ease, border-color 0.45s ease;
}

.site-footer {
  margin: 0;
  padding: 16px 18px 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.site-footer p {
  margin: 0 0 8px;
}

.site-footer nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--primary-deep);
  text-decoration: none;
  font-weight: 700;
}

.site-footer a:hover {
  text-decoration: underline;
}

.legal-page {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.legal-page h1 {
  margin-bottom: 8px;
  font-size: clamp(24px, 5vw, 32px);
}

.legal-page h2 {
  margin: 24px 0 8px;
  font-size: 18px;
}

.legal-page p,
.legal-page li {
  color: var(--muted);
  line-height: 1.8;
}

.updated {
  color: var(--muted);
  font-size: 14px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.notice-body a {
  color: var(--primary-dark);
  font-weight: 700;
}

a,
button {
  font: inherit;
}

.phone-frame {
  width: min(100%, 430px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 34px;
  background: linear-gradient(180deg, #ffffff 0%, var(--panel-grad) 100%);
  box-shadow: var(--shadow);
  margin-bottom: 88px;
  transition: border-color 0.45s ease, box-shadow 0.45s ease, background 0.45s ease;
}

.hero {
  position: relative;
  padding: 26px 22px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -120px 40px auto;
  height: 240px;
  border-radius: 999px;
  background: var(--glow);
  filter: blur(48px);
  pointer-events: none;
  transition: background 0.7s ease;
}

.top-badge {
  position: relative;
  width: fit-content;
  margin: 0 auto 18px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--primary-dark);
  background: rgba(var(--theme-rgb), 0.12);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.45s ease;
}

.product-visual {
  position: relative;
  width: min(100%, 270px);
  margin: 0 auto 18px;
  padding: 18px 14px 42px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 30%, rgba(var(--theme-rgb), 0.35), transparent 55%),
    linear-gradient(160deg, var(--banner-bg), var(--panel-soft));
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  perspective: 900px;
  transition: background 0.7s ease, border-color 0.45s ease;
}

.router-stage {
  width: 180px;
  height: 180px;
  margin: 0 auto;
  perspective: 1000px;
  animation: cubeIdle 5.5s ease-in-out infinite;
}

.router-cube {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.cube-face {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 28px rgba(var(--theme-rgb), 0.2);
  backface-visibility: hidden;
}

.cube-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 20px;
}

.face-front {
  transform: rotateY(0deg) translateZ(90px);
}

.face-right {
  transform: rotateY(90deg) translateZ(90px);
}

.face-back {
  transform: rotateY(180deg) translateZ(90px);
}

.face-left {
  transform: rotateY(-90deg) translateZ(90px);
}

.product-chip {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(var(--theme-rgb), 0.4);
  white-space: nowrap;
  z-index: 2;
  transition: background 0.45s ease, color 0.45s ease, border-color 0.45s ease;
}

.brand-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.brand-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(var(--theme-rgb), 0.25);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.brand-dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

@keyframes cubeIdle {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-weight: 800;
  transition: color 0.45s ease;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(28px, 7vw, 36px);
  line-height: 1.15;
  font-weight: 900;
  color: var(--primary-deep);
  transition: color 0.45s ease;
}

.lead,
.content-card p,
.info-box p,
.features p,
.notice-body p {
  color: var(--muted);
  line-height: 1.75;
}

.lead {
  max-width: 340px;
  margin: 0 auto 20px;
  font-size: 15px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px;
  border-radius: 22px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  transition: background 0.45s ease, border-color 0.45s ease;
}

.quick-actions button {
  border: 0;
  cursor: pointer;
  display: grid;
  gap: 3px;
  padding: 11px 8px;
  border-radius: 16px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  transition: 0.2s ease;
}

.quick-actions button.active,
.quick-actions button:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.content-card,
.info-box,
.features,
.notice {
  margin: 16px;
}

.content-card,
.info-box,
.notice {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  transition: border-color 0.45s ease;
}

.content-card {
  padding: 22px;
  text-align: center;
}

.content-card h2 {
  margin-bottom: 8px;
  font-size: 24px;
  color: var(--primary-deep);
  transition: color 0.45s ease;
}

.cta-group {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px 18px;
  border-radius: 18px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  transition: background 0.45s ease, box-shadow 0.45s ease;
}

.cta strong {
  font-size: 14px;
  opacity: 0.9;
}

.cta.primary {
  background: linear-gradient(135deg, var(--cta-start), var(--primary));
}

.cta.whatsapp {
  background: linear-gradient(135deg, #128c7e, #25d366);
}

.cta.order {
  background: linear-gradient(135deg, var(--cta-start), var(--cta-end));
  box-shadow: 0 10px 28px rgba(var(--theme-rgb), 0.35);
}

.info-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.info-box h2,
.features h3 {
  margin-bottom: 6px;
  font-size: 18px;
  color: var(--primary-deep);
  transition: color 0.45s ease;
}

.info-box p,
.features p {
  margin-bottom: 0;
  font-size: 14px;
}

.shield {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--lime));
  font-weight: 900;
  transition: background 0.45s ease;
}

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.features article {
  min-height: 148px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, var(--panel-grad));
  transition: border-color 0.45s ease, background 0.45s ease;
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: var(--panel-soft);
  transition: background 0.45s ease;
}

.notice {
  margin-bottom: 0;
}

.notice-toggle {
  width: 100%;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  color: var(--text);
  background: transparent;
  font-weight: 800;
}

.chevron {
  transition: transform 0.2s ease;
}

.notice.open .chevron {
  transform: rotate(180deg);
}

.notice-body {
  padding: 0 18px 18px;
}

.notice-body p {
  margin-bottom: 0;
  font-size: 13px;
}

.notice-body p + p {
  margin-top: 12px;
}

.float-actions {
  position: fixed;
  z-index: 1000;
  left: 16px;
  right: 16px;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
}

.float-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 12px 28px rgba(var(--theme-rgb), 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.45s ease;
}

.float-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(var(--theme-rgb), 0.34);
}

.float-call,
.float-whatsapp {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.float-call {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-deep));
}

.float-whatsapp {
  background: linear-gradient(135deg, #16a34a, #128c7e);
}

.float-order {
  min-height: 56px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--lime));
  font-weight: 900;
  font-size: 15px;
  white-space: nowrap;
  color: var(--float-text);
}

.float-btn svg {
  width: 26px;
  height: 26px;
}

.admin-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--overlay);
  padding: 16px;
}

.admin-gate.open {
  display: flex;
}

.admin-gate-card {
  width: min(100%, 360px);
  background: #fff;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.admin-gate-card h3 {
  margin: 0 0 8px;
  color: var(--primary-deep);
}

.admin-gate-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.admin-gate-card input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  margin-bottom: 12px;
  text-align: center;
}

.admin-gate-card .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.admin-gate-card button {
  border: 0;
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.admin-gate-card .submit {
  background: var(--primary);
  color: #fff;
}

.admin-gate-card .cancel {
  background: var(--panel-soft);
  color: var(--primary-deep);
}

.admin-gate-error {
  color: #b91c1c !important;
  font-size: 13px !important;
  display: none;
}

.admin-gate-hint {
  margin-top: 12px !important;
}

.admin-gate-hint button {
  background: none;
  border: 0;
  color: var(--primary-dark);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

@media (max-width: 380px) {
  body {
    padding: 0;
  }

  .phone-frame {
    min-height: 100vh;
    border-radius: 0;
    margin-bottom: 88px;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .float-actions {
    left: 12px;
    right: 12px;
    bottom: 14px;
  }

  .float-order {
    padding: 0 16px;
    font-size: 14px;
  }
}
