/* TechStore - CSS Simplificado y Funcional */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Variables CSS */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #f59e0b;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background: white;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn.success {
  background: var(--success);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  color: white;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.1;
}

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  opacity: 0.6;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
}

.highlight {
  background: linear-gradient(135deg, var(--secondary), #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 32px;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 32px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--secondary);
}

.stat-label {
  font-size: 14px;
  opacity: 0.8;
  text-transform: uppercase;
}

.hero-visual {
  position: relative;
}

.hero-image {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-glow {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background: conic-gradient(from 0deg, var(--secondary), var(--primary), var(--secondary));
  border-radius: 30px;
  z-index: -1;
  opacity: 0.3;
  animation: rotate 4s linear infinite;
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}

/* Secciones */
.features-section,
.categories-section,
.products-section {
  padding: 80px 0;
}

.features-section {
  background: var(--gray-50);
}

.products-section {
  background: var(--gray-50);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.2rem;
  color: var(--gray-600);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.feature-card {
  background: white;
  padding: 32px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: all 0.3s ease;
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.feature-icon.shipping { background: var(--primary); }
.feature-icon.warranty { background: var(--success); }
.feature-icon.returns { background: var(--warning); }
.feature-icon.support { background: var(--info); }

.feature-content h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--gray-900);
}

.feature-content p {
  color: var(--gray-600);
  margin-bottom: 16px;
}

.feature-tag {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

/* Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.category-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.category-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.category-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 3rem;
}

.category-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
  font-weight: 600;
}

.category-card:hover .category-overlay {
  opacity: 1;
}

.category-card:hover .category-image img {
  transform: scale(1.1);
}

.category-info {
  padding: 24px;
}

.category-info h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.category-info p {
  color: var(--gray-600);
  font-size: 14px;
}

/* Products Section */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 48px;
  text-align: left;
}

.view-all {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: gap 0.3s ease;
}

.view-all:hover {
  gap: 12px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  position: relative;
  border: 1px solid var(--gray-100);
  width: 100%;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.badge-sale {
  background: var(--error);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.product-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 1.2rem;
  gap: 6px;
}

.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
  opacity: 1;
}

.product-card:hover .product-img {
  transform: scale(1.1);
}

.overlay-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--gray-700);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn:hover {
  background: white;
  transform: scale(1.1);
}

.product-info {
  padding: 16px;
}

.product-category {
  color: var(--gray-500);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  margin-bottom: 6px;
}

.product-title {
  margin-bottom: 12px;
}

.product-title a {
  color: var(--gray-900);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-title a:hover {
  color: var(--primary);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.stars {
  color: var(--warning);
  display: flex;
  gap: 1px;
  font-size: 14px;
}

.rating-text {
  color: var(--gray-500);
  font-size: 12px;
}

.product-price {
  margin-bottom: 16px;
}

.price-old {
  text-decoration: line-through;
  color: var(--gray-400);
  font-size: 14px;
  margin-right: 6px;
}

.price-new {
  color: var(--error);
  font-weight: 700;
  font-size: 1.1rem;
}

.price-current {
  color: var(--gray-900);
  font-weight: 700;
  font-size: 1.1rem;
}

.add-to-cart {
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
}

/* Newsletter Section */
.newsletter-section {
  background: var(--gray-900);
  color: white;
  padding: 80px 0;
}

.newsletter-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.newsletter-icon {
  width: 80px;
  height: 80px;
  background: var(--primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 24px;
}

.newsletter-info h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.newsletter-info p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.newsletter-form {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 32px;
}

.form-group {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.form-group input {
  flex: 1;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 16px;
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.2);
}

.form-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

/* Notificaciones */
.notifications {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notification {
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 300px;
  border-left: 4px solid var(--info);
  animation: slideIn 0.3s ease-out;
}

.notification.success { border-left-color: var(--success); }
.notification.error { border-left-color: var(--error); }
.notification.warning { border-left-color: var(--warning); }

.notification-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notification-content i {
  font-size: 1.2rem;
}

.notification.success i { color: var(--success); }
.notification.error i { color: var(--error); }
.notification.warning i { color: var(--warning); }
.notification.info i { color: var(--info); }

.notification-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--gray-500);
  padding: 4px;
}

@keyframes slideIn {
  from { 
    transform: translateX(100%); 
    opacity: 0; 
  }
  to { 
    transform: translateX(0); 
    opacity: 1; 
  }
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .newsletter-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .section-header {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .form-group {
    flex-direction: column;
  }
  
  .features-grid,
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .notifications {
    left: 16px;
    right: 16px;
  }
  
  .notification {
    min-width: auto;
  }
}

/* Animaciones adicionales */
@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.btn:active {
  animation: bounce 0.2s ease-out;
}

/* Estados hover mejorados */
.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

.product-card:hover .product-title a {
  color: var(--primary);
}

/* Mejoras de accesibilidad */
.btn:focus,
.action-btn:focus,
input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Carga de imágenes */
img {
  max-width: 100%;
  height: auto;
}

/* Utilidades */
.text-center { text-align: center; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }

/* CSS ADICIONAL - Agregar al final del archivo styles.css */
/* FORZAR 4 COLUMNAS EN PRODUCTOS - MÁXIMA PRIORIDAD */

.products-section .products-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr 1fr !important;
  gap: 20px !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
}

.products-section .product-card {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: none !important;
}

/* Responsive ESPECÍFICO para productos */
@media screen and (max-width: 1024px) {
  .products-section .products-grid {
    grid-template-columns: 1fr 1fr 1fr !important;
  }
}

@media screen and (max-width: 768px) {
  .products-section .products-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media screen and (max-width: 480px) {
  .products-section .products-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Debug - Para verificar que se está aplicando */
.products-section .products-grid::before {
  content: "4 COLUMNAS ACTIVAS";
  position: absolute;
  top: -30px;
  left: 0;
  background: red;
  color: white;
  padding: 5px;
  font-size: 12px;
  z-index: 1000;
}

