:root {
  --primary-color: #38bdf8;
  --primary-color-soft: rgba(56,189,248,0.12);
  --accent-gold: #ffb020;
  --accent-gold-soft: rgba(255,176,32,0.12);
  --bg-dark: #09090b;
  --bg-panel-actual: #121214;
  --bg-card: #18181b;
  --bg-card-alt: #1e1e22;
  --text-muted: #8b8b93;
  --text-faint: #5c5c63;
  --border-soft: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
}

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

body {
  background: var(--bg-dark);
  color: #f2f2f3;
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
}

h1, h2, .logo {
  font-family: 'Press Start 2P', cursive;
}

a { color: inherit; }

/* ============ NAV ============ */

nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 6%;
  background: rgba(9,9,11,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}

.logo {
  font-size: 0.85rem;
  color: #fff;
  letter-spacing: 1px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo .logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 0 10px var(--primary-color);
}

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

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: #d4d4d8;
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.9;
  transition: opacity .2s, color .2s;
}

.nav-links a:hover { opacity: 1; color: var(--primary-color); }

/* ============ HERO (landing) ============ */

.hero-banner {
  margin: 130px auto 0;
  max-width: 720px;
  padding: 0 6%;
  text-align: center;
}

.hero-banner h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: #fff;
  line-height: 1.35;
  margin-bottom: 18px;
}

.hero-banner h1 span { color: var(--primary-color); }

.hero-banner p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto;
}

.hero-goal-slim {
  max-width: 360px;
  margin: 30px auto 0;
}

.hero-goal-slim .goal-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  gap: 10px;
}

.hero-goal-slim .goal-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

.hero-goal-slim .goal-pct {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 0.9rem;
}

.goal-track {
  width: 100%;
  height: 7px;
  background: var(--bg-card-alt);
  border-radius: 6px;
  overflow: hidden;
}

.goal-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), #bae6fd);
  border-radius: 6px;
}

/* ============ SECCIONES / FRANJAS (pagina principal) ============
   Envuelven hero/pagos/features/categorias en franjas de ancho
   completo, alternando fondo para separar visualmente cada bloque
   y dar mas aire entre secciones. */

.section-band {
  padding: 64px 0;
}

.section-band.band-alt {
  background: var(--bg-panel-actual);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.section-band .store-hero.landing { padding-top: 0; }
.section-band .category { padding-top: 10px; }

/* ============ FEATURES ROW ============ */

.features-row {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 6%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-item .f-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1rem;
}

.feature-item h4 {
  font-size: 0.98rem;
  font-weight: 600;
  color: #fff;
}

.feature-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============ PAYMENT METHODS ============ */

.payment-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 6%;
}

.payment-section .p-eyebrow {
  color: var(--primary-color);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  margin-bottom: 6px;
}

.payment-section h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 22px;
}

.payment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 14px;
}

.payment-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 14px 10px;
  font-size: 0.82rem;
  color: #d4d4d8;
}

.payment-chip i { font-size: 1.1rem; color: var(--text-muted); }

/* ============ BREADCRUMB / PAGE HEADER ============ */

.breadcrumb {
  padding: 90px 6% 0;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-color); }

.store-hero {
  padding: 40px 6% 10px;
  text-align: center;
}

.store-hero.landing { padding-top: 0; }

.store-hero h1 {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.6;
}

.store-hero h1 span { color: var(--primary-color); }

.store-hero p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  font-size: 0.95rem;
}

/* ============ CATEGORY GRID ============ */

.category {
  padding: 30px 6% 10px;
  max-width: 1200px;
  margin: 0 auto;
}

.category h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.category h2 i { color: var(--primary-color); font-size: 1rem; }
.category h2 i.accent-gold { color: var(--accent-gold); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 10px;
}

/* ============ PACKAGE CARDS ============ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: transform .18s, border-color .18s;
}

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

.card.accent-gold:hover {
  border-color: rgba(255,176,32,0.4);
}

.card.featured {
  border-color: rgba(255,176,32,0.5);
  box-shadow: 0 0 0 1px rgba(255,176,32,0.12), 0 12px 28px rgba(255,176,32,0.08);
}

.card.featured::before {
  content: "MAS ELEGIDO";
  position: absolute;
  top: 12px;
  right: -32px;
  background: var(--accent-gold);
  color: #3a2400;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 4px 36px;
  transform: rotate(35deg);
}


.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-soft);
  color: var(--primary-color);
  font-size: 1.1rem;
  overflow: hidden;
}

.card-icon img { width: 100%; height: 100%; object-fit: contain; }

.card-icon.accent-gold { color: var(--accent-gold); }

/* Cuando el paquete/categoria ya tiene una imagen propia: la
   mostramos mas grande, centrada y sin el cuadro de fondo, para
   que se vea como arte del rango en vez de un icono chico. */
.card-icon.has-image {
  width: 100%;
  height: 110px;
  background: transparent;
  border: none;
}

.card-clickable { cursor: pointer; }
.card-clickable .buy-btn { cursor: pointer; }

.card h3 {
  font-size: 1.02rem;
  font-weight: 600;
  color: #fff;
}

.card .desc {
  color: var(--text-muted);
  font-size: 0.83rem;
  flex-grow: 1;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-row .old-price {
  color: var(--text-faint);
  text-decoration: line-through;
  font-size: 0.85rem;
}

.price-row .price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
}

.price-row .price.accent-gold { color: var(--accent-gold); }

.price-row .price .cur {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.buy-btn {
  background: var(--primary-color);
  color: #062033;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: filter .15s, opacity .15s;
}

.buy-btn:hover { filter: brightness(1.1); }
.buy-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.buy-btn.accent-gold { background: var(--accent-gold); color: #3a2400; }

/* ============ CATEGORY LINK CARDS (landing) ============ */

.cat-link-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  text-decoration: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: transform .18s, border-color .18s;
}

.cat-link-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56,189,248,0.4);
}

.cat-link-card.accent-gold:hover {
  border-color: rgba(255,176,32,0.45);
}

.cat-link-card .card-icon {
  width: 56px;
  height: 56px;
  font-size: 1.4rem;
}

.cat-link-card h3 { font-size: 1.05rem; }

.cat-link-card p {
  color: var(--text-muted);
  font-size: 0.83rem;
}

.cat-link-card .go.accent-gold { color: var(--accent-gold); }

.cat-link-card .go {
  margin-top: 4px;
  color: var(--primary-color);
  font-size: 0.83rem;
  font-weight: 600;
}

/* ============ CATEGORY SWITCHER (floating, subpages) ============ */

.cat-switch-btn {
  position: fixed;
  left: 24px;
  bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: #fff;
  padding: 12px 18px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 150;
}

.cat-switch-btn i { color: var(--primary-color); }
.cat-switch-btn:hover { border-color: var(--primary-color); }

.cat-switch-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,5,6,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s;
  z-index: 310;
  padding: 20px;
}

.cat-switch-overlay.show { opacity: 1; pointer-events: auto; }

.cat-switch-box {
  background: var(--bg-panel-actual);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 26px;
  max-width: 460px;
  width: 100%;
}

.cat-switch-box h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 18px;
}

.cat-switch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cat-switch-item {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 16px 10px;
  text-align: center;
  text-decoration: none;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cat-switch-item i { color: var(--primary-color); font-size: 1.2rem; }
.cat-switch-item:hover { border-color: var(--primary-color); }
.cat-switch-item.active { border-color: var(--primary-color); background: var(--primary-color-soft); }

.cat-switch-close {
  display: block;
  margin: 18px auto 0;
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  padding: 9px 20px;
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
}

/* ============ SESION: nav login ============ */

.nav-login-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color .15s;
  white-space: nowrap;
}

.nav-login-btn:hover { border-color: var(--primary-color); }

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.nav-user i { color: var(--primary-color); }
.nav-user:hover { border-color: var(--primary-color); }

/* --- boton "Canasta" (destacado en azul) --- */

.nav-basket-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-color);
  color: #062033;
  border: none;
  padding: 9px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: filter .15s;
  white-space: nowrap;
}

.nav-basket-btn:hover { filter: brightness(1.1); }

.basket-count {
  background: #062033;
  color: var(--primary-color);
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.login-panel {
  position: fixed;
  top: 68px;
  right: 6%;
  background: var(--bg-panel-actual);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 24px 22px;
  width: 300px;
  max-width: calc(100vw - 32px);
  text-align: left;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 300;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

.login-panel.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.login-panel h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.login-panel p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.login-panel input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--bg-dark);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.login-panel input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-btn {
  flex: 1;
  border: none;
  padding: 11px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: filter .15s;
}

.modal-btn:hover { filter: brightness(1.1); }

.modal-btn.primary {
  background: var(--primary-color);
  color: #062033;
}

.modal-btn.secondary {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
}

/* ============ INFO POPOVER (paquete) ============ */

.info-panel {
  position: fixed;
  inset: 0;
  background: rgba(5,5,6,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s;
  z-index: 310;
  padding: 20px;
}

.info-panel.show { opacity: 1; pointer-events: auto; }

.info-panel-box {
  background: var(--bg-panel-actual);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 26px;
  max-width: 800px;
  width: 100%;
}

.info-panel-box .modal-actions .buy-btn { flex: 1; }

.info-panel-box h4 {
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 10px;
}

.info-panel-box { max-height: 80vh; overflow-y: auto; }

#info-panel-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 20px;
}

#info-panel-desc p { margin-bottom: 10px; }
#info-panel-desc ul, #info-panel-desc ol { margin: 0 0 10px 18px; }
#info-panel-desc strong, #info-panel-desc b { color: #fff; }
#info-panel-desc a { color: var(--primary-color); }
#info-panel-desc img { max-width: 100%; border-radius: 8px; margin: 8px 0; }

/* ============ FOOTER ============ */

footer {
  max-width: 1200px;
  margin: 80px auto 0;
  padding: 0 6% 40px;
  border-top: 1px solid var(--border-soft);
}

.footer-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 30px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #fff;
  font-size: 1rem;
  text-transform: lowercase;
}

.footer-payment-icons {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-payment-icons i {
  font-size: 1.3rem;
  color: var(--text-muted);
}

.footer-payment-icons img {
  height: 22px;
  width: auto;
  object-fit: contain;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-columns .f-eyebrow {
  color: var(--primary-color);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
  margin-bottom: 6px;
}

.footer-columns h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}

.footer-columns p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-columns a { color: var(--primary-color); text-decoration: none; }
.footer-columns a:hover { text-decoration: underline; }

.footer-thanks {
  text-align: center;
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 22px 0;
  border-top: 1px solid var(--border-soft);
}

.footer-legal-bar {
  background: var(--bg-panel-actual);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.footer-legal-text {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
  max-width: 480px;
}

.footer-legal-text i { color: var(--primary-color); margin-right: 6px; }
.footer-legal-text strong { color: #fff; }

.footer-legal-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-legal-links a {
  color: var(--text-muted);
  text-decoration: underline;
  font-size: 0.78rem;
  white-space: nowrap;
}

.footer-legal-links a:hover { color: var(--primary-color); }

.footer-copy {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.8rem;
}

/* ============ TOAST ============ */

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: #fff;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 400;
  max-width: 90%;
  text-align: center;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#toast.error { border-color: #ff5555; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .store-hero h1 { font-size: 1.1rem; }
  .hero-banner { flex-direction: column; align-items: stretch; }
  .cat-switch-grid { grid-template-columns: 1fr; }
}
