:root {
  --bg: #10141c;
  --bg-soft: #161c26;
  --surface: #1c2330;
  --surface-2: #232b3a;
  --border: #2d3547;
  --border-soft: #252c3c;
  --text: #f9fbff;
  --muted: #b0b8cc;
  --dim: #838ca3;
  --accent: #2fc0ff;
  --accent-dim: #17a3e6;
  --accent-ink: #041521;
  --accent-soft: rgba(47, 192, 255, 0.16);
  --red: #ff5c72;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
  --max: 1280px;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: "Baloo 2", var(--font);
  font-family: var(--font);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
h1, h2, h3, .footer-brand span { font-family: var(--font-heading); }

/* Navbar */
.navbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(16, 20, 28, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.navbar__inner {
  max-width: var(--max); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 28px;
}
.navbar__links { display: flex; align-items: center; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.navbar__links::-webkit-scrollbar { display: none; }
.navbar__link {
  padding: 11px 16px; border-radius: 10px; white-space: nowrap;
  color: var(--muted); font-weight: 700; font-size: 15px;
  border: 1px solid transparent; transition: background 0.15s ease, color 0.15s ease;
}
.navbar__link:hover { color: var(--text); background: var(--surface); }
.navbar__link.active { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.navbar__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.ip-pill {
  display: none; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-size: 13.5px; font-weight: 800; cursor: pointer; letter-spacing: 0.2px;
}
.ip-pill:hover { border-color: var(--accent); color: var(--text); }
@media (min-width: 640px) { .ip-pill { display: inline-flex; } }

.cart-button {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
}
.cart-button:hover { border-color: var(--accent); }
.cart-button svg { width: 20px; height: 20px; }
.cart-button__count {
  position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 4px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}

.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
}
.menu-toggle svg { width: 20px; height: 20px; }

.navbar__mobile {
  display: none; flex-direction: column; padding: 6px 16px 14px; border-top: 1px solid var(--border-soft);
}
.navbar__mobile.open { display: flex; }
.navbar__mobile .navbar__link { padding: 12px 10px; font-size: 15px; }

@media (min-width: 861px) { .menu-toggle, .navbar__mobile { display: none !important; } }
@media (max-width: 860px) { .navbar__links { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 800; font-size: 15.5px; cursor: pointer; white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.08s ease;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: #5ccdff; }
.btn--ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* View transitions */
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.view > * { animation: viewIn 0.28s ease both; }
.card { animation: cardIn 0.3s ease both; }
@media (prefers-reduced-motion: reduce) { .view > *, .card { animation: none; } }

.view { min-height: 60vh; }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero__media { position: absolute; inset: 0; background-size: cover; background-position: center 40%; }
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12, 16, 24, 0.18) 0%, rgba(12, 16, 24, 0.58) 55%, rgba(12, 16, 24, 0.93) 88%, var(--bg) 100%);
}
.hero__inner {
  position: relative; max-width: 720px; margin: 0 auto; padding: 96px 24px 64px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero__logo { width: 168px; height: 168px; object-fit: contain; filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.55)); margin: 0 0 6px; }
.hero__sub { margin: 0 0 28px; color: var(--muted); font-size: 17px; max-width: 480px; line-height: 1.6; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: center; }
.hero__ip {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px;
  border-radius: 12px; background: rgba(16, 20, 28, 0.55); border: 1px solid var(--border);
}
.hero__ip span { font-weight: 800; font-size: 14.5px; letter-spacing: 0.2px; }
.hero__ip button {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 8px 14px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer;
}
.hero__ip button:hover { border-color: var(--accent); color: var(--accent); }

/* Trust bar */
.trust-bar { border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.trust-bar__inner {
  max-width: var(--max); margin: 0 auto; padding: 24px 24px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.trust-item { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 14.5px; font-weight: 700; }
.trust-item svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
@media (max-width: 700px) { .trust-bar__inner { grid-template-columns: 1fr; gap: 12px; } }

/* Sections */
.section { max-width: var(--max); margin: 0 auto; padding: 56px 24px; }
.section--tight { padding-top: 48px; }
.section__head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-bottom: 26px; }
.section__head h2 { font-family: var(--font-heading); font-size: 24px; font-weight: 800; margin: 0; }
.section__head p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* Category showcase cards (home) */
.cat-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.cat-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  flex: 1 1 230px; max-width: 280px; aspect-ratio: 16 / 10; display: flex; align-items: flex-end; padding: 18px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.cat-card__bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.6; }
.cat-card__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(8, 10, 14, 0.85) 100%); }
.cat-card__body { position: relative; width: 100%; text-align: center; }
.cat-card__name { font-family: var(--font-heading); font-weight: 700; font-size: 17px; margin: 0 0 2px; }
.cat-card__count { font-size: 13px; color: var(--muted); font-weight: 700; }

/* Top customer shoutout */
.top-customer {
  max-width: 300px; margin: 0 auto; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px;
}
.top-customer__badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 12.5px;
  letter-spacing: 0.3px; text-transform: uppercase;
}
.top-customer__skin { width: 84px; height: auto; margin: 16px auto 10px; image-rendering: pixelated; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5)); }
.top-customer__name { font-family: var(--font-heading); font-weight: 700; font-size: 18px; }
.top-customer__spent { color: var(--accent); font-weight: 800; font-size: 14.5px; margin-top: 2px; }

/* Info cards */
.info-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.info-card { border-radius: var(--radius); padding: 24px 26px; border: 1px solid var(--border); background: var(--surface); text-align: center; }
.info-card__head { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: 15.5px; margin-bottom: 10px; }
.info-card__head svg { width: 19px; height: 19px; }
.info-card p { margin: 0 auto; max-width: 340px; color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.info-card--support .info-card__head { color: var(--accent); }
.info-card--refund .info-card__head { color: var(--muted); }
@media (max-width: 700px) { .info-cards { grid-template-columns: 1fr; } }

/* Category page */
.page-head { padding: 40px 0 8px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 13.5px; font-weight: 700; margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--accent); }
.page-head__row { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.page-head__icon { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; background: var(--surface); image-rendering: pixelated; }
.page-head h1 { font-family: var(--font-heading); font-size: 30px; font-weight: 800; margin: 0 0 4px; }
.page-head p { color: var(--muted); margin: 0; font-size: 14.5px; }
.status { margin: 32px 0; padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface); }

.grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; padding: 28px 0 0; }

.card {
  position: relative; display: flex; flex-direction: column; cursor: pointer;
  flex: 1 1 250px; max-width: 320px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: transform 0.14s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.card__media { aspect-ratio: 4 / 3; background: var(--bg-soft); overflow: hidden; border-bottom: 1px solid var(--border); }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__media--empty { display: flex; align-items: center; justify-content: center; color: var(--dim); }
.card__media--empty svg { width: 36px; height: 36px; }
.card__media--bundle { position: relative; }
.card__media--bundle img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; animation-duration: 7.8s; animation-iteration-count: infinite; animation-fill-mode: backwards;
}
.bundle--1 img { opacity: 1; animation: none; }
.bundle--2 img { animation-name: bundleFade2; animation-duration: 5.2s; }
.bundle--3 img { animation-name: bundleFade3; }
@keyframes bundleFade2 { 0% { opacity: 0 } 6% { opacity: 1 } 44% { opacity: 1 } 50% { opacity: 0 } 100% { opacity: 0 } }
@keyframes bundleFade3 { 0% { opacity: 0 } 4% { opacity: 1 } 29% { opacity: 1 } 33% { opacity: 0 } 100% { opacity: 0 } }
@media (prefers-reduced-motion: reduce) {
  .card__media--bundle img { animation: none; opacity: 0; }
  .card__media--bundle img:first-child { opacity: 1; }
}
.card__body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__name { font-family: var(--font-heading); font-size: 17px; font-weight: 700; margin: 0; }
.card__desc {
  color: var(--muted); font-size: 14px; flex: 1; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; gap: 10px; }
.card__price { font-size: 19px; font-weight: 800; color: var(--text); }
.card__add {
  padding: 10px 18px; border-radius: 9px; border: 1px solid var(--accent);
  background: var(--accent-soft); color: var(--accent); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer;
}
.card__add:hover { background: var(--accent); color: var(--accent-ink); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); margin-top: 40px; }
.site-footer__inner {
  max-width: var(--max); margin: 0 auto; padding: 48px 24px 28px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; text-align: center;
}
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: 17px; margin-bottom: 12px; }
.footer-brand img { width: 30px; height: 30px; }
.site-footer p { color: var(--muted); font-size: 13.5px; max-width: 300px; line-height: 1.65; margin: 0 auto; }
.site-footer h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--dim); margin: 0 0 14px; font-weight: 800; }
.site-footer nav { display: flex; flex-direction: column; align-items: center; }
.site-footer nav a { color: var(--muted); font-size: 14.5px; font-weight: 700; padding: 6px 0; }
.site-footer nav a:hover { color: var(--text); }
.site-footer__bottom {
  border-top: 1px solid var(--border); padding: 18px 24px; max-width: var(--max); margin: 0 auto;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--dim); font-size: 12.5px;
}
@media (max-width: 760px) { .site-footer__inner { grid-template-columns: 1fr; gap: 26px; } }

/* Cart drawer */
.cart {
  position: fixed; top: 0; right: 0; z-index: 90; width: min(400px, 92vw); height: 100%;
  background: var(--bg-soft); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.25s ease;
}
.cart.open { transform: translateX(0); }
.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--border); }
.cart__head h2 { margin: 0; font-size: 19px; }
.cart__close { background: none; border: none; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.cart__close:hover { color: var(--text); }
.cart__items { flex: 1; overflow-y: auto; padding: 12px 20px; display: flex; flex-direction: column; gap: 12px; }
.cart__empty { color: var(--muted); text-align: center; padding: 40px 0; font-size: 14px; }
.cart-line { display: flex; gap: 12px; align-items: center; }
.cart-line__info { flex: 1; }
.cart-line__name { font-weight: 700; font-size: 14px; }
.cart-line__meta { color: var(--muted); font-size: 13px; }
.cart-line__remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 18px; }
.cart-line__remove:hover { color: var(--red); }
.cart__foot { padding: 20px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }
.cart__total { display: flex; justify-content: space-between; font-size: 17px; font-weight: 800; }
.cart__msg { margin: 0; font-size: 13px; color: var(--red); }

.overlay { position: fixed; inset: 0; z-index: 70; background: rgba(3, 4, 8, 0.6); backdrop-filter: blur(2px); }

/* Product detail modal */
.product-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(3, 4, 8, 0.72); backdrop-filter: blur(4px); }
.product-modal.open { display: flex; animation: fadeIn 0.18s ease both; }
.product-modal.open .product-modal__box { animation: modalIn 0.2s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .product-modal.open, .product-modal.open .product-modal__box { animation: none; } }
.product-modal__box {
  position: relative; width: min(880px, 100%); max-height: 88vh; overflow: auto;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-lg);
  display: grid; grid-template-columns: 1fr 1fr; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.product-modal__close {
  position: absolute; top: 12px; right: 14px; z-index: 2; background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border); color: var(--text); width: 32px; height: 32px; border-radius: 50%;
  font-size: 20px; line-height: 1; cursor: pointer;
}
.product-modal__close:hover { border-color: var(--accent); color: var(--accent); }
.product-modal__media { background: var(--surface); display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; padding: 28px; border-right: 1px solid var(--border); }
.product-modal__thumbs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.product-thumb {
  width: 74px; height: 56px; padding: 0; overflow: hidden; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft);
  transition: border-color 0.15s ease;
}
.product-thumb:hover { border-color: var(--accent); }
.product-thumb.active { border-color: var(--accent); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-modal__media img { max-width: 100%; max-height: 400px; object-fit: contain; }
.product-modal__info { padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.product-modal__name { font-size: 25px; font-weight: 800; margin: 0; }
.product-modal__price { font-size: 22px; font-weight: 800; color: var(--accent); }
.product-modal__desc { color: var(--muted); font-size: 14.5px; line-height: 1.75; flex: 1; }
.product-modal__desc p { margin: 0 0 10px; }
.product-modal__desc ul { margin: 0 0 10px; padding-left: 18px; }
.product-modal__info .btn { margin-top: 4px; }

@media (max-width: 720px) {
  .product-modal__box { grid-template-columns: 1fr; }
  .product-modal__media { border-right: none; border-bottom: 1px solid var(--border); padding: 22px; }
  .product-modal__media img { max-height: 260px; }
  .product-modal__info { padding: 24px 22px; }
}

@media (max-width: 640px) {
  .hero__inner { padding: 56px 20px 40px; }
  .section { padding: 40px 20px; }
  .page-head { padding: 28px 0 4px; }
}

.card__add:disabled,
#productAdd:disabled {
  opacity: 0.55;
  cursor: default;
}

.cart__user {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font: inherit;
}
.cart__user::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
.cart__user:focus {
  outline: 2px solid rgb(47, 192, 255);
  border-color: transparent;
}

.type-tabs {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.type-tab {
  padding: 9px 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}
.type-tab:hover {
  background: rgba(255, 255, 255, 0.12);
}
.type-tab.active {
  background: rgb(47, 192, 255);
  border-color: transparent;
  color: #06121f;
}
