/* CineStore — estilos globales (variables, box model, selectores requeridos) */

:root {
  --color-primario: #1a3a5c;
  --color-secundario: #e8b84b;
  --color-texto: #374151;
  --cs-bg: #0d1117;
  --cs-surface: #161b22;
  --cs-card: #1e2a3a;
  --cs-accent: #e94560;
  --cs-gold: #f5a623;
  --cs-muted: #7a7570;
  --cs-text: #e8e4dc;
}

* {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
}

body.site-body {
  background: var(--cs-bg);
  color: var(--cs-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.site-body main {
  flex: 1;
}

.site-body .table {
  background: transparent;
  color: var(--cs-text);
}

.site-body .table td,
.site-body .table th {
  border-color: rgba(255, 255, 255, 0.08);
}

.site-body .table thead th {
  color: var(--cs-muted);
}

.site-body .table.is-striped tbody tr:not(.is-selected):nth-child(even) {
  background-color: rgba(255, 255, 255, 0.04);
}

.site-body .input {
  background: #252d3a;
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--cs-text);
}

.site-body .input::placeholder {
  color: var(--cs-muted);
}

.site-body .select select {
  background: #252d3a;
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--cs-text);
}

/* Tarjeta de catálogo — box model explícito (requisito) */
.movie-card {
  margin: 1rem;
  padding: 1.5rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: var(--cs-card);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Selector de atributo */
input[type="email"] {
  background: #252d3a;
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--cs-text);
}

input[type="email"]::placeholder {
  color: var(--cs-muted);
}

/* Pseudo-clases de estado */
.btn-filter:hover {
  border-color: var(--cs-accent);
  color: var(--cs-text);
}

button:active {
  transform: scale(0.98);
}

/* Pseudo-clase estructural (columnas Bulma dentro de .columns) */
.columns .column:nth-child(odd) {
  background: transparent;
}

/* Combinador descendiente */
.card .card-content p {
  color: var(--cs-muted);
  font-size: 0.9rem;
}

/* Grid catálogo */
.movies-grid {
  display: grid;
  gap: 1.5rem;
}

/* Flexbox — cuerpo de tarjeta y filtros */
.movie-card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.filter-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Navbar flex explícito (complemento a Bulma) */
.navbar-inner-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.navbar-brand-flex {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo-img {
  max-height: 36px;
  width: auto;
}

.brand-cine {
  color: var(--cs-text);
  font-weight: 700;
}

.brand-store {
  color: var(--cs-accent);
  font-weight: 700;
}

.navbar.is-cs {
  background: #0a0e14;
  border-bottom: 2px solid var(--cs-accent);
}

.navbar.is-cs .navbar-item {
  color: var(--cs-muted);
}

.navbar.is-cs .navbar-item:hover,
.navbar.is-cs .navbar-item.is-active {
  color: var(--cs-text);
  background: transparent;
}

.cart-badge {
  background: var(--cs-accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.25rem;
}

.footer-cs {
  background: #0a0e14;
  border-top: 2px solid var(--cs-accent);
  color: var(--cs-muted);
  padding: 1.5rem 1rem;
}

.footer-cs strong {
  color: var(--cs-text);
}

.footer-cs .footer-store {
  color: var(--cs-accent);
}

/* Mobile first */
.hero-title {
  font-size: 1.8rem;
}

.movies-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

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

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3.5rem;
  }

  .movies-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* Páginas orden / éxito */
.page-banner {
  background: var(--cs-surface);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 1.25rem 0;
}

.order-box {
  background: var(--cs-card);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  margin-bottom: 1rem;
}

.order-box-hdr {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.order-box-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--cs-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.order-id-chip {
  background: rgba(233, 69, 96, 0.15);
  border: 1px solid rgba(233, 69, 96, 0.35);
  color: var(--cs-accent);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-family: ui-monospace, monospace;
}

.price-gold {
  color: var(--cs-gold);
  font-weight: 700;
}

.success-wrap {
  padding: 2.5rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 420px;
  margin: 0 auto;
}

.success-icon {
  width: 72px;
  height: 72px;
  background: rgba(34, 197, 94, 0.12);
  border: 3px solid rgba(34, 197, 94, 0.45);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #22c55e;
  margin-bottom: 1rem;
}

.success-order-chip {
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.35);
  color: var(--cs-gold);
  font-family: ui-monospace, monospace;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 1.25rem;
}

.receipt-box {
  background: var(--cs-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  width: 100%;
  text-align: left;
  margin-bottom: 1rem;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.receipt-row:last-child {
  border-bottom: none;
}

.sum-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  font-weight: 700;
}
