/* ===== XgameHub / Pontifex — shared stylesheet ===== */

:root {
  --bg: #0b0d14;
  --bg-alt: #12151f;
  --card: #171b28;
  --border: #262b3a;
  --text: #e9ebf3;
  --text-dim: #9aa0b4;
  --accent: #7c5cff;
  --accent-2: #00e5c7;
  --danger: #ff5c7a;
  --radius: 10px;
  --max-width: 1180px;
  --shadow: 0 8px 30px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

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

a { color: inherit; text-decoration: none; }

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

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
p { color: var(--text-dim); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  color: var(--accent-2);
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .75em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #5a3df0); color: #fff; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); }
.btn-block { width: 100%; }
.btn-sm { padding: .5em 1.1em; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,13,20,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: .6em;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: .02em;
}
.brand img {
  width: 38px; height: 38px; border-radius: 8px; object-fit: cover;
}
.brand span.accent { color: var(--accent-2); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: .95rem;
  color: var(--text-dim);
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); border-color: var(--accent); }

.nav-right { display: flex; align-items: center; gap: 16px; }

.cart-btn {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .55em .9em;
  cursor: pointer;
  color: var(--text);
  font-size: 1rem;
}
.cart-count {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--accent);
  color: #fff;
  font-size: .68rem;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  padding: 0 4px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1.2rem;
  padding: 6px 10px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border); width: 100%; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 90px 0 70px;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(124,92,255,0.25), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(0,229,199,0.18), transparent 40%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.hero-media img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  aspect-ratio: 3/4;
  object-fit: cover;
}
.hero-media img:nth-child(2) { margin-top: 32px; }

.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 42px; }
.section-head p { margin-top: .5em; }

/* ---------- Cards / Grid ---------- */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

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

.card-media {
  aspect-ratio: 1/1;
  background: #0e1119;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-weight: 700; font-size: 1rem; }
.card-desc { font-size: .88rem; color: var(--text-dim); flex: 1; }
.card-price { font-weight: 800; color: var(--accent-2); font-size: 1.05rem; }
.card-tag {
  display: inline-block;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  background: rgba(124,92,255,0.12);
  padding: 3px 9px;
  border-radius: 999px;
  width: fit-content;
}

/* ---------- Filters (shop) ---------- */
.shop-layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
@media (max-width: 780px) { .shop-layout { grid-template-columns: 1fr; } }
.filters {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: 90px;
}
.filters h4 { margin-bottom: 10px; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
.filter-option {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: .92rem; cursor: pointer;
}
.filter-option input { accent-color: var(--accent); }

/* ---------- Pricing ---------- */
.plan-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  max-width: 380px;
  margin: 0 auto;
}
.plan-price { font-size: 2.6rem; font-weight: 800; margin: 12px 0 0; }
.plan-price span { font-size: 1rem; color: var(--text-dim); font-weight: 500; }
.plan-list { list-style: none; padding: 0; margin: 24px 0; text-align: left; }
.plan-list li { padding: 8px 0; border-bottom: 1px solid var(--border); color: var(--text-dim); }
.plan-list li:last-child { border-bottom: none; }

/* ---------- Services (book online) ---------- */
.service-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 26px; margin-bottom: 16px; flex-wrap: wrap;
}
.service-info h3 { margin-bottom: 4px; }
.service-meta { font-size: .85rem; color: var(--text-dim); }
.service-price { font-weight: 800; color: var(--accent-2); font-size: 1.3rem; margin-right: 18px; }
.service-actions { display: flex; gap: 10px; }

/* ---------- Blog ---------- */
.blog-card .card-media img { object-fit: cover; }
.blog-meta { font-size: .8rem; color: var(--text-dim); }
.post-body { max-width: 760px; margin: 0 auto; }
.post-body img { border-radius: var(--radius); margin-bottom: 24px; border: 1px solid var(--border); }
.post-body p { color: var(--text); font-size: 1.05rem; }

/* ---------- Groups ---------- */
.group-card {
  display: flex; align-items: center; gap: 18px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; max-width: 520px; margin: 0 auto 20px;
}
.group-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-alt); }
.group-info { flex: 1; }
.group-meta { font-size: .82rem; color: var(--text-dim); }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; text-align: left; }
.field label { display: block; font-size: .85rem; color: var(--text-dim); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: .7em .9em; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-alt); color: var(--text); font-size: .95rem;
  font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }

/* ---------- Newsletter ---------- */
.newsletter { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; flex-wrap: wrap; }
.newsletter input { flex: 1; min-width: 180px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 56px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; margin-bottom: 32px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { color: var(--text-dim); font-size: .92rem; }
.footer-col ul a:hover { color: var(--accent-2); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: .82rem; color: var(--text-dim);
}
.social-icons { display: flex; gap: 12px; }
.social-icons a {
  width: 34px; height: 34px; border-radius: 50%; background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.social-icons a:hover { border-color: var(--accent); }

/* ---------- Cart drawer ---------- */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: -420px; width: min(420px, 100%); height: 100%;
  background: var(--bg-alt); border-left: 1px solid var(--border);
  z-index: 201; transition: right .25s ease; display: flex; flex-direction: column;
}
.cart-drawer.open { right: 0; }
.cart-drawer-head { padding: 20px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.cart-drawer-foot { padding: 18px 22px; border-top: 1px solid var(--border); }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-item img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; background: #0e1119; }
.cart-item-info { flex: 1; }
.cart-item-title { font-weight: 600; font-size: .92rem; }
.cart-item-meta { font-size: .78rem; color: var(--text-dim); }
.cart-item-qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-btn { background: var(--card); border: 1px solid var(--border); color: var(--text); border-radius: 6px; width: 24px; height: 24px; cursor: pointer; }
.remove-link { font-size: .78rem; color: var(--danger); cursor: pointer; background: none; border: none; padding: 0; }
.cart-empty { text-align: center; color: var(--text-dim); padding: 40px 0; }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 14px; font-size: 1.05rem; }
.close-btn { background: none; border: none; color: var(--text-dim); font-size: 1.3rem; cursor: pointer; }
.close-btn:hover { color: var(--text); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--card); border: 1px solid var(--accent); color: var(--text);
  padding: 12px 22px; border-radius: 999px; font-size: .9rem; z-index: 300;
  opacity: 0; pointer-events: none; transition: all .25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Misc ---------- */
.badge-notice {
  background: rgba(0,229,199,0.1); border: 1px solid rgba(0,229,199,0.35);
  color: var(--accent-2); border-radius: var(--radius); padding: 14px 18px; font-size: .88rem; margin-bottom: 24px;
}
.breadcrumb { font-size: .85rem; color: var(--text-dim); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--accent-2); }
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
