/* ============================================================
   style.css — Tienda pública
   Paleta: oscura con acento verde eléctrico / cyan
   ============================================================ */

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --bg:        #0a0a0f;
  --surface:   #111118;
  --card:      #16161f;
  --card-h:    #1c1c28;
  --border:    #222230;
  --primary:   #00f5a0;
  --primary-d: #00c97f;
  --secondary: #00d4ff;
  --text:      #e2e2e8;
  --muted:     #6b6b85;
  --danger:    #ef4444;
  --radius:    14px;
  --shadow:    0 8px 32px rgba(0,0,0,.4);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ── Header / Navbar ────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0;
  background: rgba(10,10,15,.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 200;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 800;
}
.nav-logo-icon { color: var(--primary); font-size: 22px; }
.nav-logo-text { color: var(--text); }
.nav-logo-text span { color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.cart-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: 14px; font-weight: 600;
  transition: border-color .2s, background .2s;
}
.cart-btn:hover { border-color: var(--primary); }
.cart-count {
  background: var(--primary); color: #000;
  font-size: 11px; font-weight: 800;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  min-width: 20px;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  padding: 100px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 800px 400px at 50% 0%, rgba(0,245,160,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: rgba(0,245,160,.1); border: 1px solid rgba(0,245,160,.25);
  border-radius: 20px; font-size: 13px; font-weight: 600; color: var(--primary);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 800; line-height: 1.1;
  max-width: 800px; margin: 0 auto 20px;
  letter-spacing: -1.5px;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--muted); max-width: 560px; margin: 0 auto 40px;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 32px;
  background: var(--primary); color: #000;
  border-radius: 50px; font-size: 15px; font-weight: 700;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 24px rgba(0,245,160,.3);
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,245,160,.4); }

/* ── Sección Servicios ──────────────────────────────────────── */
.services-section {
  max-width: 1200px; margin: 0 auto;
  padding: 24px 24px 80px;
}
.section-title {
  font-size: 28px; font-weight: 800; margin-bottom: 6px;
  letter-spacing: -.5px;
}
.section-sub { color: var(--muted); margin-bottom: 32px; }

/* Filtros de categoría */
.cat-filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 32px;
}
.cat-btn {
  padding: 8px 18px; border-radius: 50px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--muted); font-size: 13px; font-weight: 600;
  transition: all .2s;
}
.cat-btn:hover { border-color: var(--primary); color: var(--primary); }
.cat-btn.active {
  background: var(--primary); border-color: var(--primary);
  color: #000;
}

/* Grid de servicios */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* Card de servicio */
.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  cursor: default;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0,245,160,.3);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}

/* Imagen de la card */
.card-img {
  width: 100%; height: 180px; overflow: hidden;
  flex-shrink: 0;
}
.card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
  display: block;
}
.service-card:hover .card-img img { transform: scale(1.04); }
.card-img-placeholder {
  display: flex; align-items: center; justify-content: center;
}
.card-img-icon { font-size: 48px; opacity: .5; }

/* Contenido de la card */
.card-body {
  padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1;
}

.card-cat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
  padding: 4px 10px; border-radius: 6px;
  align-self: flex-start;
}
.cat-diseno     { background: rgba(168,85,247,.15); color: #a855f7; }
.cat-marketing  { background: rgba(0,212,255,.15);  color: #00d4ff; }
.cat-desarrollo { background: rgba(0,245,160,.15);  color: #00f5a0; }

.card-name { font-size: 17px; font-weight: 700; line-height: 1.3; }
.card-desc { font-size: 13px; color: var(--muted); flex: 1; }
.card-entrega {
  font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 5px;
}
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border);
  margin-top: auto; /* empuja el footer al fondo de .card-body */
}
.card-price {
  font-size: 22px; font-weight: 800;
}
.card-price span {
  font-size: 13px; font-weight: 500; color: var(--muted);
}
.btn-add {
  padding: 9px 16px; border-radius: 8px;
  background: rgba(0,245,160,.12); border: 1px solid rgba(0,245,160,.3);
  color: var(--primary); font-size: 13px; font-weight: 700;
  transition: all .2s;
}
.btn-add:hover { background: var(--primary); color: #000; }
.btn-add.added { background: var(--primary); color: #000; border-color: var(--primary); }

/* Estado de carga */
.loading-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 80px 24px; color: var(--muted);
}
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Carrito lateral ────────────────────────────────────────── */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 300; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-panel {
  position: fixed; top: 0; right: 0;
  width: 420px; max-width: 100%;
  height: 100vh;
  background: var(--surface); border-left: 1px solid var(--border);
  z-index: 400;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.cart-panel.open { transform: translateX(0); }

.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.cart-header h2 { font-size: 17px; font-weight: 700; }
.btn-close {
  background: var(--card); border: 1px solid var(--border);
  width: 32px; height: 32px; border-radius: 8px;
  font-size: 16px; color: var(--muted); display: flex; align-items: center; justify-content: center;
  transition: color .2s;
}
.btn-close:hover { color: var(--text); }

.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.cart-empty { text-align: center; padding: 60px 0; color: var(--muted); }
.cart-empty .empty-icon { font-size: 48px; margin-bottom: 12px; }

.cart-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px; background: var(--card); border-radius: 10px;
  border: 1px solid var(--border);
}
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.cart-item-price { font-size: 13px; color: var(--primary); font-weight: 700; }
.btn-remove {
  background: none; border: none; color: var(--muted);
  font-size: 16px; line-height: 1; padding: 2px 4px;
  transition: color .2s;
}
.btn-remove:hover { color: var(--danger); }

.cart-footer { padding: 20px 24px; border-top: 1px solid var(--border); }
.cart-total {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px;
}
.cart-total-label { font-size: 14px; color: var(--muted); }
.cart-total-value { font-size: 26px; font-weight: 800; }
.btn-checkout {
  width: 100%; padding: 14px;
  background: var(--primary); color: #000;
  border: none; border-radius: 10px;
  font-size: 15px; font-weight: 700;
  transition: opacity .2s, transform .2s;
}
.btn-checkout:hover { opacity: .9; transform: translateY(-1px); }

/* ── Modal Checkout ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.checkout-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(20px); transition: transform .3s;
}
.modal-overlay.open .checkout-modal { transform: translateY(0); }

.modal-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-top h2 { font-size: 17px; font-weight: 700; }
.modal-body { padding: 24px; }

/* Pasos del checkout */
.step-indicator {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 24px;
}
.step {
  flex: 1; height: 3px; border-radius: 2px; background: var(--border);
  transition: background .3s;
}
.step.done  { background: var(--primary); }
.step.active{ background: var(--secondary); }

/* Formulario */
.checkout-form .field { margin-bottom: 16px; }
.checkout-form label {
  display: block; font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px;
}
.checkout-form input,
.checkout-form textarea {
  width: 100%; padding: 11px 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 9px; color: var(--text); font-size: 14px;
  font-family: inherit; transition: border-color .2s;
}
.checkout-form input:focus,
.checkout-form textarea:focus { outline: none; border-color: var(--primary); }

/* Selección de pago */
.payment-options { display: flex; flex-direction: column; gap: 10px; }
.payment-opt {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--card);
  cursor: pointer; transition: border-color .2s, background .2s;
  text-align: left; width: 100%;
}
.payment-opt:hover { border-color: rgba(255,255,255,.15); background: var(--card-h); }
.payment-opt.selected { border-color: var(--primary); background: rgba(0,245,160,.07); }
.pay-icon { font-size: 26px; flex-shrink: 0; }
.pay-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.pay-desc { font-size: 12px; color: var(--muted); }

/* Info de pago confirmado */
.pay-info-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px; margin-top: 16px;
}
.pay-info-box h4 { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 12px; }
.info-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.info-row strong { color: var(--muted); font-size: 12px; min-width: 90px; }
.btn-copy {
  padding: 5px 10px; border-radius: 6px;
  background: rgba(0,245,160,.12); border: 1px solid rgba(0,245,160,.25);
  color: var(--primary); font-size: 11px; font-weight: 700;
  margin-left: auto; cursor: pointer; transition: background .2s;
}
.btn-copy:hover { background: var(--primary); color: #000; }

.success-box {
  text-align: center; padding: 24px;
}
.success-icon { font-size: 56px; margin-bottom: 12px; }
.success-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.success-msg   { color: var(--muted); font-size: 14px; }

.modal-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 16px 24px; border-top: 1px solid var(--border);
}

/* Botones checkout */
.btn-primary-f {
  padding: 11px 22px; border-radius: 9px;
  background: var(--primary); color: #000;
  border: none; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: opacity .2s;
}
.btn-primary-f:hover { opacity: .85; }
.btn-secondary-f {
  padding: 11px 22px; border-radius: 9px;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: color .2s;
}
.btn-secondary-f:hover { color: var(--text); }

.btn-wa {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 9px;
  background: #25d366; color: #fff; border: none;
  font-size: 14px; font-weight: 700; cursor: pointer;
  text-decoration: none; transition: opacity .2s;
}
.btn-wa:hover { opacity: .85; }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--muted); font-size: 13px;
}
footer a { color: var(--primary); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero { padding: 60px 20px 50px; }
  .cart-panel { width: 100%; }
  .services-grid { grid-template-columns: 1fr; }
}
