.store-page {
  min-height: 100vh;
  padding: calc(var(--header-h) + 2rem) 0 4rem;
}

.store-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.store-card h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.store-muted {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.product-grid {
  display: grid;
  gap: 1rem;
}

.product-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  background: var(--bg-elevated);
}

.product-row h2 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.product-row .price {
  font-family: var(--mono);
  color: var(--cyan);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.stock-badge {
  font-size: 0.72rem;
  font-family: var(--font, sans-serif);
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.stock-badge.low {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
  animation: pulse-low 2s infinite;
}

.stock-badge.available {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

@keyframes pulse-low {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.steam-official-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.steam-official-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.steam-official-info svg {
  width: 32px;
  height: 32px;
  fill: #38bdf8;
  flex-shrink: 0;
}

.steam-official-info h4 {
  margin: 0 0 0.15rem;
  font-size: 0.95rem;
  color: #f8fafc;
}

.instant-delivery-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1.2rem;
  letter-spacing: 0.02em;
}

.instant-delivery-pill svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.steam-official-info p {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.steam-key-box {
  margin: 1.5rem 0;
  padding: 1.2rem;
  border-radius: var(--radius);
  background: #050508;
  border: 1px dashed rgba(45, 212, 191, 0.45);
  font-family: var(--mono);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  word-break: break-all;
}

.store-status {
  margin-top: 1rem;
  color: var(--orange);
  min-height: 1.4em;
  font-size: 0.95rem;
}

/* Selector de idiomas */
.lang-switch {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
}

.lang-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn:hover {
  background: rgba(30, 41, 59, 0.8);
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.4);
}

.lang-btn.active {
  background: rgba(6, 182, 212, 0.2);
  color: #38bdf8;
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

/* --- Términos y Checkbox de no reembolso --- */
.terms-consent-box {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.terms-consent-box.terms-error {
  border-color: #f87171;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.25);
}

.terms-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #cbd5e1;
  user-select: none;
}

.terms-checkbox-label input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 18px;
  height: 18px;
  accent-color: var(--cyan, #06b6d4);
  cursor: pointer;
  flex-shrink: 0;
}

.terms-links {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.terms-links a {
  color: var(--cyan, #38bdf8);
  text-decoration: underline;
  cursor: pointer;
}

/* --- Acordeón de Política de No Reembolso Multilingüe --- */
.policy-section {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.policy-details {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.4);
  overflow: hidden;
}

.policy-summary {
  padding: 0.85rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s, color 0.15s;
}

.policy-summary:hover {
  background: rgba(30, 41, 59, 0.5);
  color: #f1f5f9;
}

.policy-content {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 0.8rem;
  line-height: 1.5;
  color: #94a3b8;
}

.policy-lang-block {
  margin-bottom: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.1);
}

.policy-lang-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.policy-lang-title {
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* --- Diseño de Entrega de Claves (Payment Success) --- */
.success-header-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.keys-container {
  display: grid;
  gap: 1.25rem;
  margin: 1.75rem 0;
}

.key-card {
  background: #090c15;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-lg, 12px);
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.key-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #06b6d4, #3b82f6, #8b5cf6);
}

.key-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.key-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f8fafc;
  margin: 0;
}

.key-type-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.key-box-row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
  flex-wrap: wrap;
}

.key-display {
  flex: 1;
  min-width: 220px;
  background: #020408;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius, 8px);
  padding: 0.75rem 1rem;
  font-family: var(--mono, monospace);
  font-size: 1.15rem;
  font-weight: 600;
  color: #38bdf8;
  letter-spacing: 0.1em;
  text-align: center;
  user-select: all;
  display: flex;
  align-items: center;
  justify-content: center;
  word-break: break-all;
}

.btn-copy-individual {
  padding: 0 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius, 8px);
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.btn-copy-individual:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #ffffff;
}

.btn-copy-individual.copied {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  color: #4ade80;
}

.activation-box {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius, 8px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.activation-box-text h3 {
  font-size: 0.95rem;
  margin: 0 0 0.25rem;
  color: #f1f5f9;
}

.activation-box-text p {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0;
}

.admin-login,
.admin-panel {
  margin-top: 1rem;
}

.admin-login input,
.admin-login button {
  width: 100%;
}

.admin-login input {
  margin: 0.6rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #050508;
  color: var(--text);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.8rem;
  margin: 1.2rem 0;
}

.stat {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem;
}

.stat strong {
  display: block;
  font-size: 1.3rem;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  overflow-x: auto;
  display: block;
}

.orders-table th,
.orders-table td {
  text-align: left;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.store-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (≤ 1024px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .store-card {
    padding: 1.5rem;
  }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Mobile (≤ 768px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .store-page {
    padding: calc(var(--header-h) + 1rem) 0 2rem;
  }

  .store-card {
    padding: 1.25rem;
    border-radius: var(--radius);
  }

  .store-card h1 {
    font-size: 1.4rem;
  }

  /* Product rows: stack vertically */
  .product-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
  }

  .product-row .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Instant delivery pill: allow wrapping */
  .instant-delivery-pill {
    font-size: 0.72rem;
    padding: 0.35rem 0.65rem;
    white-space: normal;
    display: flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    line-height: 1.35;
    border-radius: 12px;
  }

  /* Steam card: stack vertically */
  .steam-official-card {
    flex-direction: column;
    align-items: stretch;
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .steam-official-card .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Terms box */
  .terms-consent-box {
    padding: 0.85rem 1rem;
  }

  .terms-checkbox-label {
    font-size: 0.8rem;
  }

  /* Policy section */
  .policy-summary {
    font-size: 0.78rem;
    padding: 0.75rem 0.9rem;
  }

  .policy-content {
    padding: 0.85rem 1rem;
    font-size: 0.75rem;
  }

  /* Key delivery cards (payment success) */
  .key-box-row {
    flex-direction: column;
  }

  .key-display {
    min-width: unset;
    font-size: 0.95rem;
  }

  .btn-copy-individual {
    width: 100%;
    padding: 0.6rem 1rem;
  }

  .activation-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .activation-box .btn {
    width: 100%;
    text-align: center;
  }

  /* Stats grid in admin */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Orders table scroll */
  .orders-table {
    font-size: 0.75rem;
  }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Small phones (≤ 480px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .store-card {
    padding: 1rem;
  }

  .store-card h1 {
    font-size: 1.2rem;
  }

  .product-row h2 {
    font-size: 1rem;
  }

  .product-row .price {
    font-size: 0.85rem;
  }

  .instant-delivery-pill {
    font-size: 0.68rem;
    gap: 0.35rem;
  }

  .stock-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
  }

  .steam-official-info svg {
    width: 24px;
    height: 24px;
  }

  .steam-official-info h4 {
    font-size: 0.85rem;
  }

  .steam-official-info p {
    font-size: 0.72rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .key-display {
    font-size: 0.82rem;
    padding: 0.6rem 0.75rem;
    letter-spacing: 0.06em;
  }
}


