:root {
  --color-primary: #0f172a;
  --color-primary-soft: #1e293b;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-bg: #ffffff;
  --color-surface: #f8fafc;
  --color-surface-alt: #f1f5f9;
  --color-border: #e2e8f0;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-whatsapp: #16a34a;
  --color-whatsapp-hover: #15803d;
  --color-danger: #dc2626;
  --color-warning-bg: #fef3c7;
  --color-warning-text: #92400e;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --transition: 0.18s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 1rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--color-primary);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-logo:hover {
  text-decoration: none;
}

.brand-logo strong {
  color: var(--color-accent);
  font-weight: 800;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
}

.brand-logo-light {
  color: #ffffff;
}

.brand-logo-light .brand-mark {
  background: var(--color-accent);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
}

.main-nav {
  display: none;
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-md);
}

.main-nav.is-open {
  display: flex;
}

.nav-link {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4rem 0;
}

.nav-link:hover,
.nav-link-strong {
  color: var(--color-primary);
  text-decoration: none;
}

.nav-logout-form {
  margin: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: var(--color-accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-border);
}

.btn-outline:hover {
  background: var(--color-surface);
  border-color: var(--color-primary-soft);
}

.btn-whatsapp {
  background: var(--color-whatsapp);
  color: #ffffff;
}

.btn-whatsapp:hover {
  background: var(--color-whatsapp-hover);
}

/* Badges & Pills */
.badge {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.badge-whatsapp {
  background: #dcfce7;
  color: var(--color-whatsapp);
}

.status-pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-positive {
  background: #dcfce7;
  color: var(--color-whatsapp);
}

.status-neutral {
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
}

/* Hero */
.hero {
  padding: 3.5rem 0 4rem;
  text-align: center;
}

.hero-content {
  max-width: 760px;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--color-primary);
}

.hero-subtitle {
  margin: 0 auto 2rem;
  max-width: 620px;
  font-size: 1.05rem;
  color: var(--color-text-muted);
}

.hero-search {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 560px;
  margin: 0 auto 1.25rem;
  padding: 0.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.hero-search input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.65rem 0.85rem;
  font-size: 0.98rem;
  color: var(--color-text);
  outline: none;
}

.search-feedback {
  max-width: 560px;
  margin: 0 auto 1.5rem;
  padding: 0.75rem 1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--color-primary);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-surface {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.25rem;
}

.section-header h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.section-header p {
  margin: 0;
  color: var(--color-text-muted);
}

/* Grids & Cards */
.steps-grid,
.categories-grid,
.benefits-grid,
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.card,
.category-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover,
.category-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card h3,
.category-card h3,
.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.12rem;
  color: var(--color-primary);
}

.card p,
.category-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
}

.category-icon {
  font-size: 1.75rem;
  margin-bottom: 0.65rem;
}

.benefit-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--color-surface-alt);
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

/* CTA */
.cta-box {
  background: var(--color-primary);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
  justify-content: space-between;
}

.cta-box h2 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
}

.cta-box p {
  margin: 0;
  color: #cbd5e1;
  max-width: 560px;
}

/* Auth Pages */
.auth-page {
  padding: 3rem 0;
  background: var(--color-surface);
}

.auth-container {
  max-width: 480px;
}

.auth-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-md);
}

.auth-header {
  margin-bottom: 1.5rem;
}

.auth-header h1 {
  margin: 0 0 0.45rem;
  font-size: 1.55rem;
  color: var(--color-primary);
}

.auth-header p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.94rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-primary);
}

.form-group input {
  width: 100%;
  padding: 0.68rem 0.85rem;
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.form-actions-inline {
  display: flex;
  justify-content: flex-end;
}

.text-link {
  font-size: 0.88rem;
  font-weight: 500;
}

.auth-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

/* Alerts */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1.15rem;
  border: 1px solid transparent;
}

.alert-error {
  background: #fef2f2;
  color: var(--color-danger);
  border-color: #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: var(--color-whatsapp);
  border-color: #bbf7d0;
}

.alert-warning {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
  border-color: #fde68a;
}

/* Dashboard */
.dashboard-page {
  padding: 2.5rem 0 4rem;
  background: var(--color-surface);
}

.dashboard-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  color: var(--color-primary);
}

.dashboard-subtitle {
  margin: 0;
  color: var(--color-text-muted);
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-surface-alt);
}

.info-list dt {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.info-list dd {
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
}

.muted-text {
  color: var(--color-text-muted);
  font-size: 0.94rem;
}

.store-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.store-item {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.store-item span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Error Pages */
.error-page {
  padding: 4.5rem 0;
  text-align: center;
}

.error-box {
  max-width: 520px;
}

.error-box h1 {
  margin: 0 0 0.75rem;
  color: var(--color-primary);
}

.error-box p {
  margin: 0 0 1.5rem;
  color: var(--color-text-muted);
}

/* Footer */
.site-footer {
  background: var(--color-primary);
  color: #cbd5e1;
  padding-top: 3rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-tagline {
  margin: 0.75rem 0 0;
  max-width: 340px;
  font-size: 0.92rem;
  color: #94a3b8;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 1.5rem;
}

.footer-links h4 {
  margin: 0 0 0.75rem;
  color: #ffffff;
  font-size: 0.95rem;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid var(--color-primary-soft);
  padding: 1.1rem 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

.footer-bottom p {
  margin: 0;
}

/* Responsive Breakpoints (Mobile-first) */
@media (min-width: 640px) {
  .hero-search {
    flex-direction: row;
  }

  .hero-actions {
    flex-direction: row;
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .main-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    background: transparent;
    border-bottom: none;
    padding: 0;
    box-shadow: none;
    gap: 1.5rem;
  }

  .steps-grid,
  .categories-grid,
  .dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cta-box {
    flex-direction: row;
    align-items: center;
    padding: 2.5rem;
  }

  .dashboard-header {
    flex-direction: row;
    align-items: center;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Sprint 2 — Panel lateral, asistente, métricas y catálogo público */
.panel-shell {
  background: var(--color-surface);
  padding: 1.5rem 0 3rem;
}

.panel-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.panel-sidebar {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  height: fit-content;
}

.panel-store-switcher {
  padding-bottom: 1rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.sidebar-link {
  padding: 0.48rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.sidebar-link:hover,
.sidebar-link.is-active {
  background: #eff6ff;
  color: var(--color-accent);
  text-decoration: none;
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.metric-label {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.metric-value {
  font-size: 1.55rem;
  color: var(--color-primary);
}

.metric-sub {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.form-select,
textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--color-bg);
  color: var(--color-text);
}

.wizard-steps-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.wizard-step-pill {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}

.wizard-step-pill.is-active {
  background: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
}

.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.phone-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.store-hero-top {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
}

.product-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.product-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0.5rem 0;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  justify-content: flex-end;
  z-index: 100;
}

.cart-drawer-card {
  width: 100%;
  max-width: 420px;
  height: 100%;
  overflow-y: auto;
  border-radius: 0;
}

@media (min-width: 768px) {
  .panel-layout {
    grid-template-columns: 250px 1fr;
    align-items: start;
  }

  .sidebar-nav {
    flex-direction: column;
  }

  .metrics-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .store-hero-top {
    flex-direction: row;
    align-items: center;
  }
}

/* Mejoras visuales del catálogo público, tarjetas de producto y drawer del carrito */
.catalog-page {
  background: var(--color-surface);
  padding: 1.5rem 0 4rem;
}

.storefront-hero {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.storefront-cover {
  height: 140px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  background-size: cover;
  background-position: center;
}

.storefront-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.storefront-identity {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.storefront-avatar {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  background: var(--color-primary);
  color: #ffffff;
  border: 3px solid #ffffff;
  margin-top: -2.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.35rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.storefront-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.storefront-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.storefront-title-row h1 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  color: var(--color-primary);
}

.storefront-desc {
  margin: 0.35rem 0 0.65rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.storefront-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.storefront-payments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.meta-chip {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--color-surface-alt);
  color: var(--color-primary-soft);
}

.storefront-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cart-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.catalog-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.catalog-search-form {
  display: flex;
  gap: 0.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.4rem;
}

.catalog-search-form input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-pill {
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  background: var(--color-bg);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

.category-pill:hover,
.category-pill.is-active {
  background: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
  text-decoration: none;
}

.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.product-card-modern {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.product-card-modern:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--color-surface-alt);
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
}

.product-badges {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  display: flex;
  gap: 0.4rem;
}

.product-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  color: #ffffff;
}

.product-badge-featured {
  background: var(--color-primary);
}

.product-badge-promo {
  background: var(--color-whatsapp);
}

.product-content {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.65rem;
}

.product-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.product-head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--color-primary);
}

.product-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-surface-alt);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.product-pricing {
  display: flex;
  flex-direction: column;
}

.price-old {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.price-current {
  font-size: 1.1rem;
  color: var(--color-primary);
}

.catalog-empty {
  text-align: center;
  padding: 3rem 1.5rem;
}

/* Cart Drawer */
.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}

.cart-drawer-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  height: 100%;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.16);
}

.cart-drawer-header {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-drawer-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.cart-drawer-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.cart-items-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cart-empty-item {
  padding: 1.25rem;
  text-align: center;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
}

.cart-item-variant,
.cart-item-unit {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  color: var(--color-primary);
}

.qty-stepper span {
  min-width: 22px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.cart-item-subtotal {
  font-size: 0.88rem;
  min-width: 56px;
  text-align: right;
}

.cart-remove-btn {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem;
}

.cart-summary-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  color: var(--color-primary);
}

.cart-min-note {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.checkout-section-title {
  margin: 0;
  font-size: 0.98rem;
  color: var(--color-primary);
}

@media (min-width: 640px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .storefront-body {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .catalog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Panel Administrativo fluido: tabs, filtros en vivo y tablas responsivas */
.admin-role-box {
  display: flex;
  flex-direction: column;
  padding-bottom: 1rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.admin-operator-name {
  font-size: 1rem;
  color: var(--color-primary);
}

.admin-tab-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.tab-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--color-accent);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
}

.admin-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.admin-filter-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  min-width: 220px;
}

.admin-filter-select {
  width: auto;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.75rem 0.65rem;
  border-bottom: 1px solid var(--color-surface-alt);
  vertical-align: middle;
}

.admin-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
}

.admin-row-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .admin-toolbar {
    flex-direction: row;
    align-items: center;
  }
}

/* Estilos personalizables de tienda ("Editar mi tienda") */
.store-theme-preview {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.store-theme-preview-banner {
  padding: 0.9rem 1rem;
  color: #ffffff;
}

.store-theme-preview-body {
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.catalog-cards-sharp .product-card-modern,
.catalog-cards-sharp .storefront-hero {
  border-radius: 2px;
}

.catalog-cards-elevated .product-card-modern {
  box-shadow: var(--shadow-md);
}

.catalog-btns-pill .btn {
  border-radius: 999px;
}

.catalog-btns-square .btn {
  border-radius: 2px;
}

@media (min-width: 960px) {
  .catalog-layout-minimal .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .catalog-layout-compact .catalog-grid {
    grid-template-columns: 1fr;
  }

  .catalog-layout-compact .product-card-modern {
    flex-direction: row;
  }

  .catalog-layout-compact .product-media {
    width: 220px;
    flex-shrink: 0;
  }
}

.catalog-headings-uppercase h1,
.catalog-headings-uppercase h2,
.catalog-headings-uppercase h3 {
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.catalog-headings-bold h1,
.catalog-headings-bold h2,
.catalog-headings-bold h3 {
  font-weight: 800;
}

/* Sprint 3: Planes comerciales y pantalla de transferencia */
.billing-toggle {
  display: inline-flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.35rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-top: 4px solid var(--color-accent);
}

.plan-color-blue {
  border-top-color: #2563eb;
}

.plan-color-violet {
  border-top-color: #7c3aed;
}

.plan-color-gold {
  border-top-color: #d97706;
}

.plan-recommended {
  box-shadow: var(--shadow-md);
  border-color: #c4b5fd;
}

.plan-rec-badge {
  position: absolute;
  top: -12px;
  right: 1rem;
  background: #7c3aed;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.plan-price-block {
  margin: 1.25rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--color-surface-alt);
  border-bottom: 1px solid var(--color-surface-alt);
}

.plan-price-amount {
  font-size: 1.9rem;
  color: var(--color-primary);
}

.plan-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.transfer-data-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.transfer-field {
  padding: 0.85rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.transfer-field span {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.transfer-field > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .plans-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .transfer-data-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Refinamiento visual global — CatálogoYA */
.site-header {
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.04);
}

.hero {
  background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.07) 0%, rgba(255, 255, 255, 0) 65%);
}

.hero-search {
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.hero-search:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.14);
}

.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #eff6ff;
  font-size: 1.5rem;
}

.metric-card {
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--color-accent);
}

.metric-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.panel-sidebar {
  box-shadow: var(--shadow-sm);
}

.sidebar-link {
  transition: background-color var(--transition), color var(--transition), transform var(--transition);
}

.sidebar-link.is-active {
  font-weight: 600;
  border-left: 3px solid var(--color-accent);
}

.admin-table tbody tr {
  transition: background-color var(--transition);
}

.admin-table tbody tr:hover {
  background-color: var(--color-surface);
}

input[type='file'] {
  padding: 0.55rem;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: 0.88rem;
  cursor: pointer;
}

input[type='file']:hover {
  border-color: var(--color-accent);
}

input[type='color'] {
  height: 42px;
  padding: 0.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  cursor: pointer;
}

@media (min-width: 768px) {
  .panel-sidebar {
    position: sticky;
    top: 84px;
  }
}

/* Sprint 4: Identidad visual CataYA (azul oscuro, azul eléctrico, dorado, blanco) */
.cataya-shell {
  background: radial-gradient(circle at 20% 0%, #172554 0%, #0f172a 60%);
  color: #ffffff;
  min-height: 85vh;
  padding: 1.75rem 0 4rem;
}

.cataya-sim-banner {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid #f59e0b;
  color: #fde68a;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.5rem;
}

.cataya-hero {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.cataya-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.45), rgba(56, 189, 248, 0.25));
  border: 1px solid rgba(96, 165, 250, 0.8);
  color: #e0f2fe;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
  margin-bottom: 0.5rem;
}

.cataya-gold {
  color: #f59e0b;
}

.cataya-subtitle,
.cataya-muted {
  color: #cbd5e1;
  font-size: 0.92rem;
}

.cataya-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.cataya-btn-gold {
  background: #f59e0b;
  color: #0f172a;
  font-weight: 700;
}

.cataya-btn-gold:hover {
  background: #d97706;
  color: #0f172a;
}

.cataya-btn-light {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
}

.cataya-btn-light:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cataya-play-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.cataya-card {
  background: rgba(30, 41, 59, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-md);
  padding: 1.35rem;
}

.cataya-card h2 {
  margin: 0 0 0.5rem;
  color: #ffffff;
}

.cataya-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cataya-selected-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 36px;
  margin-bottom: 1rem;
}

.cataya-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid #f59e0b;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.88rem;
}

.cataya-grid-100 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.45rem;
}

.cataya-num-btn {
  padding: 0.55rem 0.25rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #0f172a;
  color: #e2e8f0;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cataya-num-btn:hover {
  border-color: #3b82f6;
}

.cataya-num-btn.is-selected {
  background: #2563eb;
  border-color: #f59e0b;
  color: #ffffff;
  transform: scale(1.03);
}

.cataya-packages-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cataya-pkg-option {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #0f172a;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cataya-pkg-option:hover,
.cataya-pkg-option:has(input:checked) {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

.cataya-step-card {
  padding: 1.05rem 1.15rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.cataya-winner-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
  padding: 0.85rem 1.35rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.92));
  border: 1px solid #f59e0b;
  min-width: 210px;
}

.cataya-winner-code {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #f59e0b;
}

.brand-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.brand-logo-light .brand-logo-img {
  background: rgba(255, 255, 255, 0.96);
  padding: 0.3rem 0.65rem;
  border-radius: 10px;
}

.cataya-brand-img {
  height: 76px;
  width: auto;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.96);
  padding: 0.45rem 0.85rem;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

.cataya-brand-img-sm {
  height: 54px;
  width: auto;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.96);
  padding: 0.3rem 0.65rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
}

/* Contraste seguro dentro del módulo oscuro CataYA */
.cataya-shell h1,
.cataya-shell h2,
.cataya-shell h3,
.cataya-shell label,
.cataya-shell strong {
  color: #f8fafc;
}

.cataya-shell .cataya-gold,
.cataya-shell strong.cataya-gold {
  color: #f59e0b;
}

.cataya-shell input[type="text"],
.cataya-shell input[type="email"],
.cataya-shell input[type="tel"],
.cataya-shell input[type="number"],
.cataya-shell input[type="search"],
.cataya-shell input[type="datetime-local"],
.cataya-shell select,
.cataya-shell textarea {
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.cataya-shell input::placeholder,
.cataya-shell textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.cataya-shell select option {
  background: #0f172a;
  color: #f8fafc;
}

.cataya-shell .btn-outline,
.cataya-shell .cataya-btn-light {
  color: #f8fafc;
  border-color: rgba(248, 250, 252, 0.35);
  background: transparent;
}

.cataya-shell .btn-outline:hover,
.cataya-shell .cataya-btn-light:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(248, 250, 252, 0.6);
}

.cataya-shell .status-neutral {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.55);
  font-weight: 700;
}

.cataya-shell .status-positive {
  background: rgba(22, 163, 74, 0.25);
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, 0.65);
  font-weight: 700;
}

.cataya-shell .status-negative {
  background: rgba(220, 38, 38, 0.25);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.65);
  font-weight: 700;
}

.cataya-shell code {
  background: rgba(15, 23, 42, 0.85);
  color: #fbbf24;
  padding: 0.12rem 0.38rem;
  border-radius: 5px;
}

.cataya-live-slots {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem auto;
}

.cataya-slot-box {
  width: 68px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  font-weight: 800;
  color: #64748b;
  background: #0f172a;
  border: 2px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cataya-slot-box.is-spinning {
  border-color: #38bdf8;
  color: #38bdf8;
  transform: scale(1.06);
}

.cataya-slot-box.is-revealed {
  border-color: #f59e0b;
  color: #f59e0b;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.35);
}

.cataya-slot-sep {
  font-size: 2.2rem;
  font-weight: 800;
  color: #f59e0b;
  padding: 0 0.2rem;
}

.cataya-ticket-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cataya-ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

@media (min-width: 640px) {
  .cataya-grid-100 {
    grid-template-columns: repeat(10, 1fr);
  }
}

@media (min-width: 960px) {
  .cataya-hero {
    flex-direction: row;
    align-items: center;
  }

  .cataya-play-layout {
    grid-template-columns: 1fr 1.15fr;
    align-items: start;
  }
}
