/* ============================================
   VARIABLES Y RESET
   ============================================ */
:root {
    /* Colores principales */
    --primary-color: #4CAF50;          /* Verde principal */
    --primary-dark: #388E3C;           /* Verde oscuro */
    --primary-light: #C8E6C9;          /* Verde claro */
    --secondary-color: #FF9800;        /* Naranja */
    --accent-color: #FF5722;           /* Naranja fuerte */
    --dark-color: #333333;             /* Negro suave */
    --light-color: #F5F5F5;            /* Fondo claro */
    --gray-color: #757575;             /* Gris */
    --light-gray: #E0E0E0;             /* Gris claro */
    --white: #FFFFFF;                  /* Blanco */
    --success: #4CAF50;                /* Verde éxito */
    --warning: #FFC107;                /* Amarillo advertencia */
    --danger: #F44336;                 /* Rojo peligro */
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.1);
    --shadow-xl: 0 12px 24px rgba(0,0,0,0.1);
    
    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER MODERNO
   ============================================ */
.site-header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-normal);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--dark-color);
}

.logo-img {
    height: 60px;
    width: auto;
}

.logo-text h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
    line-height: 1.2;
}

.logo-text p {
    font-size: 0.9rem;
    color: var(--gray-color);
    font-weight: 400;
}

/* Navegación principal */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 8px 0;
    position: relative;
    transition: var(--transition-fast);
}

.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-normal);
}

.main-nav a:hover::after {
    width: 100%;
}

/* Icono del carrito */
.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-icon i {
    font-size: 1.4rem;
}

.cart-count {
    background-color: var(--accent-color);
    color: var(--white);
    font-size: 0.8rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    position: absolute;
    top: -8px;
    right: -8px;
}

/* Botón menú móvil */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
    padding: 5px;
}

/* ============================================
   HERO / SLIDER
   ============================================ */
.hero-section {
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: 0 0 20px 20px;
    margin-bottom: 50px;
}

.hero-slider {
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide.active {
    opacity: 1;
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    width: 90%;
    max-width: 800px;
    z-index: 2;
}

.slide-content h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.slide-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    opacity: 0.9;
}

/* Overlay para mejor legibilidad */
.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.7), rgba(0,0,0,0.4));
    z-index: 1;
}

/* Controles del slider */
.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition-fast);
}

.slider-dot.active {
    background-color: var(--white);
    transform: scale(1.2);
}

/* ============================================
   SECCIÓN DE CATEGORÍAS
   ============================================ */
.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    display: inline-block;
}

.section-title p {
    color: var(--gray-color);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin: 15px auto;
    border-radius: 2px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.category-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    text-decoration: none;
    color: inherit;
    position: relative;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    z-index: 1;
}

.category-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.category-content {
    padding: 25px;
}

.category-content h3 {
    font-size: 1.4rem;
    color: var(--dark-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.category-content p {
    color: var(--gray-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ============================================
   PRODUCTOS
   ============================================ */
.products-section {
    padding: 80px 0;
    background-color: var(--light-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.product-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: var(--transition-normal);
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-info {
    padding: 25px;
}

.product-category {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
    line-height: 1.3;
}

.product-description {
    color: var(--gray-color);
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-line-clamp: 2;
    -moz-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.product-stock {
    font-size: 0.9rem;
    font-weight: 600;
}

.product-stock.in-stock {
    color: var(--success);
}

.product-stock.out-of-stock {
    color: var(--danger);
}

.btn-add-to-cart {
    width: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-to-cart:hover {
    background: linear-gradient(to right, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
}

.btn-add-to-cart:disabled {
    background: var(--light-gray);
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   BOTONES GENERALES
   ============================================ */
.btn {
    display: inline-block;
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 14px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--primary-dark), var(--primary-color));
    transition: var(--transition-normal);
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: linear-gradient(to right, var(--secondary-color), var(--accent-color));
}

.btn-secondary::before {
    background: linear-gradient(to right, var(--accent-color), var(--secondary-color));
}

/* ============================================
   FOOTER MODERNO
   ============================================ */
.site-footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.4rem;
    color: var(--primary-light);
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.footer-section p {
    color: #aaa;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-section ul li i {
    width: 20px;
    color: var(--primary-color);
}

/* Redes sociales */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition-fast);
}

.social-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Copyright */
.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #777;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 992px) {
    .slide-content h2 {
        font-size: 2.8rem;
    }
    
    .slide-content p {
        font-size: 1.1rem;
    }
    
    .section-title h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white);
        transition: var(--transition-normal);
        z-index: 999;
        box-shadow: var(--shadow-lg);
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: 30px;
        gap: 0;
    }
    
    .main-nav li {
        width: 100%;
        border-bottom: 1px solid var(--light-gray);
    }
    
    .main-nav a {
        display: block;
        padding: 15px 0;
        font-size: 1.2rem;
    }
    
    .hero-section {
        height: 400px;
    }
    
    .slide-content h2 {
        font-size: 2.2rem;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 1.5rem;
    }
    
    .hero-section {
        height: 350px;
    }
    
    .slide-content h2 {
        font-size: 1.8rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   UTILIDADES
   ============================================ */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.1);
    border-left: 4px solid var(--success);
    color: var(--success);
}

.alert-danger {
    background-color: rgba(244, 67, 54, 0.1);
    border-left: 4px solid var(--danger);
    color: var(--danger);
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   ESTILOS PARA ADMIN (si los necesitas en frontend)
   ============================================ */
.admin-badge {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}
/* Estilos para filtros de categorías */
.filters-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 1.5rem 0;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.2rem;
    background-color: var(--light-gray);
    color: var(--dark-color);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: var(--primary-color);
    color: white;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-btn i {
    margin-right: 8px;
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    animation: slideIn 0.3s ease;
    max-width: 300px;
}

.notification.success {
    background-color: var(--success-color);
    color: white;
}

.notification.error {
    background-color: var(--danger-color);
    color: white;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
/* estilos.css */
.ofertas-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 0;
}

.product-card.oferta {
    position: relative;
    border: 2px solid var(--primary-color);
    transition: transform 0.3s;
}

.product-card.oferta:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.descuento-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 1;
}

.precios {
    margin: 10px 0;
}

.precio-anterior {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    margin-right: 10px;
}

.precio-actual {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: bold;
}

.filtros-ofertas {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
}

.filtro-btn {
    padding: 8px 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 30px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.filtro-btn:hover,
.filtro-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Badges para estados de pedido */
.badge.estado-pendiente { background: #ffc107; color: #000; }
.badge.estado-confirmado { background: #17a2b8; color: white; }
.badge.estado-preparando { background: #007bff; color: white; }
.badge.estado-en_camino { background: #6f42c1; color: white; }
.badge.estado-entregado { background: #28a745; color: white; }
.badge.estado-cancelado { background: #dc3545; color: white; }

/* Progress bar para reportes */
.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
}
/* Estilos para promociones */
.promocion-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.8rem;
    z-index: 1;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
}

.promocion-badge i {
    margin-right: 5px;
}

.promocion-info {
    margin-top: 5px;
}

.badge-promocion {
    display: inline-block;
    background: #ffc107;
    color: #212529;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 5px;
}

/* Estilos para precios con descuento */
.precio-anterior {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 2px;
}

.precio-actual {
    color: #dc3545;
    font-size: 1.3rem;
    font-weight: bold;
    display: block;
}

.product-card-con-promocion {
    border: 2px solid #ffc107;
    position: relative;
    overflow: hidden;
}

.product-card-con-promocion::before {
    content: "OFERTA";
    position: absolute;
    top: 15px;
    left: -30px;
    background: #dc3545;
    color: white;
    padding: 5px 40px;
    transform: rotate(-45deg);
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
}