:root {
  --color-primary: #3D5AFE;
  --color-secondary: #00C853;
  --color-bg-light: #F5F7FA;
  --color-bg-card: #FFFFFF;
  --color-bg-dark: #121212;
  --color-bg-card-dark: #1E1E1E;
  --color-border: #E0E0E0;
  --color-text-main: #1C1C1C;
  --color-text-secondary: #6E6E6E;
  --color-text-light: #F5F5F5;
  --color-footer: #F5F5F5;
  --radius-main: 16px;
  --shadow-main: 0 4px 24px rgba(61,90,254,0.08), 0 1.5px 4px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 32px rgba(61,90,254,0.12);
}

body {
  background: var(--color-bg-light);
  color: var(--color-text-main);
  font-family: 'Inter', 'Poppins', 'Roboto', Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}
body.dark {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
}

/* Header */
.header {
  background: var(--color-bg-card);
  box-shadow: var(--shadow-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
}
body.dark .header {
  background: var(--color-bg-card-dark);
  border-bottom: 1px solid #232323;
}
.header-logo {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.header-search {
  flex: 1;
  max-width: 420px;
  margin: 0 2rem;
  position: relative;
}
.header-search input {
  width: 100%;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-main);
  border: 1.5px solid var(--color-border);
  font-size: 1rem;
  background: #f8fafc;
  transition: border 0.2s;
}
body.dark .header-search input {
  background: #232323;
  color: var(--color-text-light);
  border: 1.5px solid #232323;
}
.header-actions {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}
.header-actions .btn {
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-card);
  box-shadow: var(--shadow-main);
  border: none;
  color: var(--color-primary);
  font-size: 1.3rem;
  transition: background 0.2s, color 0.2s;
}
.header-actions .btn:hover {
  background: var(--color-primary);
  color: #fff;
}
body.dark .header-actions .btn {
  background: var(--color-bg-card-dark);
  color: var(--color-primary);
}

/* Hero / Banner */
.hero {
  background: linear-gradient(90deg, #3D5AFE 0%, #00C853 100%);
  color: #fff;
  border-radius: var(--radius-main);
  margin: 2rem auto 2.5rem auto;
  max-width: 1200px;
  padding: 2.5rem 2rem 2.5rem 2rem;
  box-shadow: var(--shadow-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  animation: fadeInUp 0.7s;
}
.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.hero-content p {
  font-size: 1.2rem;
  color: #e0e0e0;
}
.hero-img {
  max-width: 320px;
  border-radius: var(--radius-main);
  box-shadow: var(--shadow-main);
}

/* Categorías y productos destacados */
.section {
  max-width: 1200px;
  margin: 0 auto 2.5rem auto;
  padding: 0 1rem;
}
.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--color-text-main);
}
body.dark .section-title {
  color: var(--color-text-light);
}
.categories-scroll {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}
.category-card {
  min-width: 180px;
  background: var(--color-bg-card);
  border-radius: var(--radius-main);
  box-shadow: var(--shadow-main);
  padding: 1.2rem 1rem;
  text-align: center;
  color: var(--color-text-main);
  font-weight: 600;
  border: 1.5px solid var(--color-border);
  transition: box-shadow 0.2s, background 0.2s;
  cursor: pointer;
}
.category-card:hover {
  box-shadow: var(--shadow-hover);
  background: #F0F4FF;
}
body.dark .category-card {
  background: var(--color-bg-card-dark);
  color: var(--color-text-light);
  border: 1.5px solid #232323;
}

/* Tarjetas de producto */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.product-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-main);
  box-shadow: var(--shadow-main);
  padding: 1.5rem 1rem 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1.5px solid var(--color-border);
  transition: box-shadow 0.2s, background 0.2s, transform 0.2s;
  position: relative;
  min-height: 380px;
  max-height: 420px;
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
  background: #F0F4FF;
  transform: translateY(-6px) scale(1.03);
}
body.dark .product-card {
  background: var(--color-bg-card-dark);
  color: var(--color-text-light);
  border: 1.5px solid #232323;
}
.product-img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  margin-bottom: 1.2rem;
  border-radius: 16px;
  background: #f8fafc;
  box-shadow: 0 4px 16px rgba(61,90,254,0.08);
  transition: transform 0.3s ease;
}
.product-card:hover .product-img {
  transform: scale(1.05);
}
.product-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--color-text-main);
  text-align: center;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
body.dark .product-name {
  color: var(--color-text-light);
}
.product-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
}
.product-badge {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  background: var(--color-secondary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0,200,83,0.15);
  z-index: 2;
}
.product-card .btn-add {
  margin-top: auto;
  width: 100%;
  padding: 0.9rem 0;
  border-radius: 1.2rem;
  background: linear-gradient(90deg, #3D5AFE 0%, #00C853 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  box-shadow: 0 2px 8px rgba(61,90,254,0.10);
  transition: all 0.2s ease;
  cursor: pointer;
}
.product-card .btn-add:hover {
  background: linear-gradient(90deg, #00C853 0%, #3D5AFE 100%);
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(61,90,254,0.20);
}

/* Sidebar de filtros */
.sidebar {
  background: var(--color-bg-card);
  border-radius: var(--radius-main);
  box-shadow: var(--shadow-main);
  padding: 2rem 1.2rem;
  min-width: 260px;
  border: 1.5px solid var(--color-border);
  position: sticky;
  top: 90px;
  animation: fadeInUp 0.7s;
}
body.dark .sidebar {
  background: var(--color-bg-card-dark);
  color: var(--color-text-light);
  border: 1.5px solid #232323;
}

/* Carrito deslizante */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100vh;
  background: var(--color-bg-card);
  box-shadow: -8px 0 32px rgba(61,90,254,0.12);
  border-top-left-radius: var(--radius-main);
  border-bottom-left-radius: var(--radius-main);
  z-index: 9999;
  transition: right 0.4s cubic-bezier(.77,0,.18,1);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem 1.5rem 1.5rem;
}
.cart-drawer.open {
  right: 0;
}
body.dark .cart-drawer {
  background: var(--color-bg-card-dark);
  color: var(--color-text-light);
}

/* Toasts */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  min-width: 260px;
  background: var(--color-bg-card);
  color: var(--color-text-main);
  border-radius: 1.2rem;
  box-shadow: var(--shadow-main);
  padding: 1rem 1.5rem;
  font-weight: 600;
  z-index: 99999;
  opacity: 0.98;
  animation: fadeInUp 0.5s;
}
body.dark .toast {
  background: var(--color-bg-card-dark);
  color: var(--color-text-light);
}

/* Footer */
.footer {
  background: var(--color-footer);
  color: var(--color-text-secondary);
  padding: 2.5rem 0 1.5rem 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
  margin-top: 4rem;
}
body.dark .footer {
  background: #181818;
  color: #bdbdbd;
  border-top: 1px solid #232323;
}
.footer-socials {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 1rem;
}
.footer-socials .icon {
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: background 0.2s, transform 0.2s;
}
.footer-socials .icon:hover {
  background: var(--color-secondary);
  transform: scale(1.1);
}

/* Utilidades */
::-webkit-scrollbar {
  width: 8px;
  background: #e0e0e0;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb {
  background: #cfd8dc;
  border-radius: 8px;
}
body.dark ::-webkit-scrollbar {
  background: #232323;
}
body.dark ::-webkit-scrollbar-thumb {
  background: #333;
}

@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: center; }
  .hero-img { max-width: 220px; }
  .sidebar { display: none; }
  .cart-drawer { width: 100vw; min-width: 0; border-radius: 0; }
  .products-grid { 
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
  }
  .product-card {
    min-height: 360px;
    max-height: 400px;
  }
  .product-img {
    width: 160px;
    height: 160px;
  }
}
@media (max-width: 600px) {
  .header { flex-direction: column; gap: 1rem; padding: 1rem 0.5rem; }
  .hero { padding: 1.2rem 0.5rem; }
  .section { padding: 0 0.2rem; }
  .products-grid { 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem; 
  }
  .product-card {
    min-height: 340px;
    max-height: 380px;
    padding: 1.2rem 0.8rem 1rem 0.8rem;
  }
  .product-img {
    width: 140px;
    height: 140px;
    margin-bottom: 1rem;
  }
  .product-name {
    font-size: 1rem;
    margin-bottom: 0.6rem;
  }
  .product-price {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
  }
  .cart-drawer { padding: 1rem 0.5rem; }
}
@media (max-width: 480px) {
  .products-grid { 
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.8rem; 
  }
  .product-card {
    min-height: 320px;
    max-height: 360px;
    padding: 1rem 0.6rem 0.8rem 0.6rem;
  }
  .product-img {
    width: 120px;
    height: 120px;
    margin-bottom: 0.8rem;
  }
  .product-name {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
  }
  .product-price {
    font-size: 1.1rem;
    margin-bottom: 0.7rem;
  }
  .product-card .btn-add {
    padding: 0.7rem 0;
    font-size: 0.9rem;
  }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Reset y base */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #1a202c;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Secciones */
.section {
    margin: 3rem 0;
    padding: 2rem 0;
}

.section h1 {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: #23272f;
}

.section h2 {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    color: #23272f;
}

.lead {
    font-size: 1.3rem;
    color: #374151;
    margin-bottom: 3rem;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Filtros */
.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-color: transparent;
    text-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* Productos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.product-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-image {
    text-align: center;
    margin-bottom: 1.5rem;
}

.emoji {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.product-info h3 {
    color: #23272f;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category {
    color: #4f46e5;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.description {
    color: #374151;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.price {
    color: #23272f;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.add-to-cart-form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.quantity-input {
    width: 80px;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    transition: border-color 0.3s ease;
}

.quantity-input:focus {
    outline: none;
    border-color: #667eea;
}

.add-to-cart-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* Carrito */
.cart-items {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item:hover {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.cart-item-info .emoji {
    font-size: 2.5rem;
    margin: 0;
}

.cart-item-info h4 {
    color: #23272f;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-info p {
    color: #374151;
    font-size: 1rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-item-total {
    color: #23272f;
    font-size: 1.2rem;
    font-weight: 700;
}

.remove-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.cart-summary {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-total h3 {
    color: #2d3748;
    font-size: 1.8rem;
    font-weight: 700;
}

.place-order-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.place-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.empty-cart, .empty-orders {
    text-align: center;
    color: #718096;
    font-size: 1.2rem;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Pedidos */
.orders-list {
    display: grid;
    gap: 1.5rem;
}

.order-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.order-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.order-header h4 {
    color: #23272f;
    font-size: 1.3rem;
    font-weight: 600;
}

.order-status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-status.procesando {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.order-status.enviado {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.order-details p {
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.order-details strong {
    color: #23272f;
}

/* Footer */
.footer {
    background: rgba(26, 32, 44, 0.95);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 2.5rem 0 1.5rem;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu { 
        display: none; 
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .section h1 {
        font-size: 2.5rem;
    }
    
    .section h2 {
        font-size: 2rem;
    }
    
    .filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .cart-summary {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .cart-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cart-item-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container { 
        padding: 0 15px; 
    }
    
    .logo { 
        font-size: 1.4rem; 
    }
    
    .header { 
        padding: 0.8rem 0; 
    }
    
    .section h1 {
        font-size: 2rem;
    }
    
    .product-card {
        padding: 1.5rem;
    }
    
    .add-to-cart-form {
        flex-direction: column;
    }
    
    .quantity-input {
        width: 100%;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card, .cart-item, .order-item {
    animation: fadeInUp 0.6s ease-out;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; } 