@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ==========================================================================
   Variables y Reset
   ========================================================================== */
:root {
  --bg-color: #0a0a0a;
  --surface-color: #1a1a1a;
  --surface-light: #111111;
  --accent-color: #FF1744;
  --accent-hover: #D50000;
  --text-main: #ffffff;
  --text-secondary: #aaaaaa;
  --text-muted: #888888;
  --text-dark: #666666;
  --border-light: rgba(255, 23, 68, 0.12);
  --border-medium: #2a2a2a;
  --border-input: #333333;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* Para compensar navbar fixed */
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background-color: rgba(255, 23, 68, 0.3);
  color: var(--text-main);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ==========================================================================
   Scrollbar Personalizada
   ========================================================================== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--border-input);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* ==========================================================================
   Utilidades
   ========================================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Barra de Anuncios
   ========================================================================== */
.announcement-bar {
  background-color: var(--accent-color);
  color: var(--text-main);
  width: 100%;
  position: fixed;
  top: 0;
  z-index: 1000;
  padding: 10px;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
}

/* ==========================================================================
   Navegación
   ========================================================================== */
.navbar {
  position: sticky;
  top: 40px; /* Debajo de la barra de anuncios */
  background-color: var(--surface-light);
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
}

.logo {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-main);
}

.logo span {
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent-color);
}

.cart-btn {
  background: transparent;
  border: 2px solid var(--accent-color);
  padding: 8px 20px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
}

.cart-btn:hover {
  background-color: rgba(255, 23, 68, 0.1);
}

.cart-count {
  background-color: var(--accent-color);
  color: var(--text-main);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* ==========================================================================
   Contenido Principal
   ========================================================================== */
.main-content {
  padding-top: 60px; /* Ajuste para navbar */
}

.section-header h1 {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-secondary);
  margin-bottom: 40px;
}

/* ==========================================================================
   Sección Hero / Pack
   ========================================================================== */
.pack-hero {
  background-color: var(--surface-color);
  border: 1px solid rgba(255, 23, 68, 0.25);
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(255, 23, 68, 0.1);
  display: flex;
  flex-direction: column;
}

.pack-image {
  flex: 1;
  min-height: 400px;
  background-color: var(--surface-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pack-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.pack-details {
  flex: 1;
  padding: 24px;
}

.pack-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.badge {
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.badge-pack {
  background-color: var(--accent-color);
  color: var(--text-main);
}

.badge-recommended {
  border: 1px solid var(--text-main);
  color: var(--text-main);
  background: transparent;
}

.pack-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.offer-badge {
  background-color: var(--accent-color);
  color: var(--text-main);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.price-old .price-label,
.price-new .price-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
}

.price-old .price-value {
  font-size: 1.2rem;
  color: var(--text-dark);
  text-decoration: line-through;
}

.price-arrow {
  color: var(--text-dark);
  font-size: 1.2rem;
}

.price-new .price-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
}

.savings-badge {
  background-color: rgba(255, 23, 68, 0.15);
  color: var(--accent-color);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 12px;
  display: inline-block;
}

.pack-description p {
  color: #ccc;
  line-height: 1.6;
  margin-top: 16px;
}

.pack-description p strong {
  color: var(--text-main);
}

.pack-features {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.pack-features li {
  padding: 8px 0 8px 28px;
  position: relative;
  color: #ccc;
}

.pack-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

.btn-add-pack {
  background-color: var(--accent-color);
  color: var(--text-main);
  border: none;
  padding: 16px 32px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  margin-top: 20px;
  transition: all 0.2s;
}

.btn-add-pack:hover {
  background-color: var(--accent-hover);
  transform: scale(1.02);
}

.delivery-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 12px;
}

/* ==========================================================================
   Cuadrícula de Productos
   ========================================================================== */
.products-section h2 {
  font-size: 1.8rem;
  margin: 50px 0 24px;
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.product-card {
  background-color: var(--surface-color);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: all 0.3s;
  position: relative;
}

.product-card:hover {
  border-color: rgba(255, 23, 68, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(255, 23, 68, 0.1);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: var(--accent-color);
  color: var(--text-main);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  z-index: 1;
}

.product-image-wrapper {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background-color: var(--surface-light);
}

.product-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-image-wrapper img {
  transform: scale(1.05);
}

.product-info {
  padding: 16px;
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}

.product-pricing {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

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

.current-price {
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.1rem;
}

.btn-add {
  background: transparent;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  width: 100%;
}

.btn-add:hover {
  background-color: var(--accent-color);
  color: var(--text-main);
}

/* ==========================================================================
   Preguntas Frecuentes (FAQ)
   ========================================================================== */
#faq {
  padding: 60px 0;
  max-width: 800px;
  margin: 0 auto;
}

#faq h2 {
  font-size: 1.8rem;
  margin-bottom: 32px;
}

.faq-item {
  border-bottom: 1px solid var(--border-medium);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  transition: color 0.3s;
}

.faq-question:hover {
  color: var(--accent-color);
}

.faq-icon {
  font-size: 1.5rem;
  color: var(--accent-color);
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

.faq-answer p {
  padding: 0 0 20px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Carrito de Compras (Sidebar)
   ========================================================================== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--surface-light);
  z-index: 2000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-medium);
}

.cart-header h3 {
  font-size: 1.2rem;
}

.cart-close {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-empty {
  color: var(--text-dark);
  text-align: center;
  padding: 40px 0;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--surface-color);
  align-items: center;
}

.cart-item-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  background-color: var(--surface-color);
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-item-price {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item-quantity button {
  background-color: var(--surface-color);
  border: 1px solid var(--border-input);
  color: var(--text-main);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}

.cart-item-quantity span {
  min-width: 20px;
  text-align: center;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px;
  transition: color 0.2s;
}

.cart-item-remove:hover {
  color: var(--accent-color);
}

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-medium);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.cart-legal {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.cart-legal input[type="checkbox"] {
  accent-color: var(--accent-color);
  margin-top: 2px;
  flex-shrink: 0;
}

.btn-checkout {
  background-color: var(--accent-color);
  color: var(--text-main);
  border: none;
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
}

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

.btn-checkout:disabled {
  background-color: var(--border-input);
  color: var(--text-dark);
  cursor: not-allowed;
}

.cart-help {
  text-align: center;
  margin-top: 12px;
}

.cart-help a {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: color 0.2s;
}

.cart-help a:hover {
  color: var(--accent-color);
}

.cart-status,
.cart-delivery-note {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  margin-top: 8px;
}

/* ==========================================================================
   Página de Contacto
   ========================================================================== */
.contact-section {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 24px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form input,
.contact-form textarea {
  background-color: var(--surface-color);
  border: 1px solid var(--border-input);
  color: var(--text-main);
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent-color);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.btn-submit {
  background-color: var(--accent-color);
  color: var(--text-main);
  border: none;
  padding: 16px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
}

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

/* ==========================================================================
   Pie de Página (Footer)
   ========================================================================== */
.footer {
  background-color: var(--surface-light);
  padding: 40px 24px;
  margin-top: 60px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 24px;
  margin-bottom: 24px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-main);
}

.payment-icons {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.payment-icons img {
  height: 28px;
  border-radius: 4px;
}

.footer-disclaimer {
  max-width: 800px;
  margin: 0 auto 16px;
  text-align: center;
  color: var(--text-dark);
  font-size: 0.75rem;
  line-height: 1.5;
}

.footer-copyright {
  text-align: center;
  color: var(--text-dark);
  font-size: 0.8rem;
}

/* ==========================================================================
   Media Queries (Responsive)
   ========================================================================== */

/* Tablet y Desktop pequeño */
@media (min-width: 769px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .pack-hero {
    flex-direction: row;
  }
  
  .pack-details {
    padding: 40px;
  }
  
  .pack-title {
    font-size: 2rem;
  }
  
  .price-new .price-value {
    font-size: 2.5rem;
  }
  
  .cart-sidebar {
    width: 420px;
  }
  
  .section-header h1 {
    font-size: 2.5rem;
  }
  
  .announcement-bar {
    font-size: 0.85rem;
  }
}

/* Desktop grande */
@media (min-width: 1025px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    gap: 16px;
    font-size: 0.85rem;
  }
  
  .announcement-bar {
    font-size: 0.75rem;
  }
  
  .section-header h1 {
    font-size: 1.8rem;
  }
}
