/* store.css — Tienda pública MAVIMA */

:root {
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --primary-glow: rgba(124, 58, 237, 0.35);
  --emerald: #10b981;
  --mp-blue: #009ee3;
  --bg-dark: #080b11;
  --bg-card: rgba(17, 24, 39, 0.72);
  --border-card: rgba(255, 255, 255, 0.08);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --radius-lg: 16px;
  --radius-md: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-dark);
  background-image:
    radial-gradient(at 0% 0%, rgba(124, 58, 237, 0.18) 0, transparent 55%),
    radial-gradient(at 100% 100%, rgba(0, 158, 227, 0.1) 0, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
}

.store-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-card);
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.store-brand {
  position: relative;
}

.brand-glow {
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--mp-blue));
  box-shadow: 0 0 18px var(--primary-glow);
}

.store-brand h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding-left: 12px;
}

.store-brand p {
  padding-left: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.store-trust {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.mp-badge {
  background: rgba(0, 158, 227, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(0, 158, 227, 0.35);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-weight: 600;
}

.store-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.catalog-intro {
  margin-bottom: 1.75rem;
}

.catalog-intro h2 {
  font-size: 1.75rem;
  margin-bottom: 0.35rem;
}

.catalog-intro p {
  color: var(--text-muted);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.product-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 58, 237, 0.35);
}

.product-icon {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(0, 158, 227, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.product-card h3 {
  font-size: 1.1rem;
  line-height: 1.35;
}

.product-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
  flex: 1;
}

.product-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--emerald);
}

.btn-buy {
  width: 100%;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), #5b21b6);
  color: white;
  transition: opacity 0.2s;
}

.btn-buy:hover {
  opacity: 0.92;
}

.loading-state,
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
}

.checkout-section {
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  margin-bottom: 1rem;
  padding: 0;
}

.btn-text:hover {
  color: var(--text-main);
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.25rem;
  align-items: start;
}

.product-summary {
  padding: 1.5rem;
}

.product-summary h3 {
  margin-bottom: 0.5rem;
}

.product-summary .summary-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--emerald);
  margin: 0.75rem 0;
}

.product-summary .summary-copy {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.checkout-form {
  padding: 1.5rem;
}

.checkout-form h3 {
  margin-bottom: 0.25rem;
}

.form-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.checkout-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.btn-mp {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--mp-blue), #007eb5);
  color: white;
  margin-top: 0.5rem;
}

.btn-mp:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.legal-note {
  margin-top: 0.85rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.consent-box {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  background: rgba(124, 58, 237, 0.08);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
  cursor: pointer;
}

.consent-box input {
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--primary);
}

.consent-box a {
  color: #a78bfa;
}

.payment-result {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.5;
}

.payment-result.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.payment-result.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.payment-result.pending {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

.store-footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border-card);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.store-footer a {
  color: var(--primary);
  text-decoration: none;
}

.store-footer a:hover {
  text-decoration: underline;
}

.footer-muted {
  margin-top: 0.35rem;
  font-size: 0.82rem;
}

@media (max-width: 768px) {
  .store-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}
