/* Variables y Reset */
        :root {
            --primary: #4a7c59;
            --primary-dark: #3a6547;
            --secondary: #8d9f87;
            --accent: #d0b49f;
            --light: #f4f1e9;
            --dark: #2d3319;
            --gray: #7d8c7d;
            --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            --radius: 8px;
            --transition: all 0.3s ease;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background-color: var(--light);
            color: var(--dark);
            line-height: 1.6;
        }
        
        /* Navegación */
        nav {
            background-color: white;
            box-shadow: var(--shadow);
            position: sticky;
            top: 0;
            z-index: 100;
            padding: 1rem 5%;
        }
        
        .nav-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            max-width: 1400px;
            margin: 0 auto;
        }
        
        .logo {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 700;
            font-size: 1.5rem;
            color: var(--primary);
            text-decoration: none;
        }
        
        .logo i {
            font-size: 1.8rem;
        }
        
        .nav-links {
            display: flex;
            gap: 2rem;
            list-style: none;
        }
        
        .nav-links a {
            text-decoration: none;
            color: var(--dark);
            font-weight: 500;
            transition: var(--transition);
            position: relative;
            padding: 0.5rem 0;
        }
        
        .nav-links a:hover {
            color: var(--primary);
        }
        
        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background-color: var(--primary);
            transition: var(--transition);
        }
        
        .nav-links a:hover::after {
            width: 100%;
        }
        
        .cart-icon {
            position: relative;
            cursor: pointer;
        }
        
        .cart-count {
            position: absolute;
            top: -8px;
            right: -8px;
            background-color: var(--primary);
            color: white;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 0.7rem;
            font-weight: bold;
        }
        
        .hamburger {
            display: none;
            cursor: pointer;
            font-size: 1.5rem;
        }
        
        /* Secciones */
        section {
            display: none;
            padding: 3rem 5%;
            max-width: 1400px;
            margin: 0 auto;
        }
        
        section.active {
            display: block;
        }
        
        /* Banner de Inicio */
        .banner {
            height: 50vh;
            background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('img/fondo.avif');
            background-size: cover;
            background-position: center;
            border-radius: var(--radius);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            padding: 2rem;
            color: white;
            margin-bottom: 2rem;
        }
        
        .banner h1 {
            font-size: 3.5rem;
            margin-bottom: 1.5rem;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }
        
        .banner p {
            font-size: 1.5rem;
            max-width: 800px;
            margin-bottom: 2rem;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }
        
        .btn {
            background-color: var(--primary);
            color: white;
            border: none;
            padding: 0.8rem 2rem;
            border-radius: var(--radius);
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            text-decoration: none;
            display: inline-block;
        }
        
        .btn:hover {
            background-color: #a0e1b4;
            color: #2d3319;
            transform: translateY(-3px);
            box-shadow: var(--shadow);
        }
        
        /* Tienda - Categorías */
        .categories-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 2rem;
            margin-top: 2rem;
        }
        
        .category-card {
            height: 250px;
            border-radius: var(--radius);
            overflow: hidden;
            position: relative;
            box-shadow: var(--shadow);
            cursor: pointer;
            transition: var(--transition);
        }

        /* Agrega esto en la sección de estilos */
        .product-count {
            position: absolute;
            top: 10px;
            right: 10px;
            background-color: var(--primary);
            color: white;
            padding: 4px 8px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: bold;
        }
        
        .category-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
        }
        
        .category-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: var(--transition);
        }
        
        .category-card:hover .category-image{
            transform: scale(1.05);
        }
        
        .category-name {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
            color: white;
            padding: 1.5rem 1rem;
            font-size: 1.5rem;
            font-weight: 600;
            text-align: center;
            text-shadow: 0 3px 5px rgba(0, 0, 0, 0.5);
        }
        
        /* Productos */
        .products-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 2rem;
            margin-top: 2rem;
        }
        
        .product-card {
            background-color: white;
            border-radius: var(--radius);
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: var(--transition);
            position: relative; /* Asegura que el badge se posicione correctamente */
        }
        
        .product-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
        }
        
        .product-image {
            width: 100%;
            height: 200px;
            object-fit: cover;
        }
        
        .product-info {
            padding: 1.5rem;
        }
        
        .product-name {
            font-size: 1.2rem;
            margin-bottom: 0.5rem;
            color: var(--dark);
        }
        
        .product-actions {
            display: flex;
            gap: 0.5rem;
            margin-top: 1rem;
        }
        
        .quantity-select {
            flex: 1;
            padding: 0.5rem;
            border: 1px solid #ddd;
            border-radius: var(--radius);
            font-size: 1rem;
        }

        /* Indicador de producto en carrito */
        .in-cart-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            background: var(--primary);
            color: white;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 5px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
            z-index: 10;
        }
        
        .add-to-cart {
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: var(--radius);
            padding: 0.5rem 1rem;
            cursor: pointer;
            transition: var(--transition);
        }
        
        .add-to-cart:hover {
            background-color: #3a6547;
        }
        
        /* Carrito */
        .cart-container {
            display: flex;
            flex-direction: column;
            gap: 2rem;
            max-width: 1000px;
            margin: 0 auto;
        }
        
        .cart-items {
            background-color: white;
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 1.5rem;
        }
        
        .cart-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid #eee;
        }
        
        .cart-title {
            font-size: 1.8rem;
            color: var(--primary);
        }
        
        .empty-cart {
            background-color: #f8d7da;
            color: #721c24;
            border: none;
            padding: 0.5rem 1rem;
            border-radius: var(--radius);
            cursor: pointer;
            transition: var(--transition);
        }
        
        .empty-cart:hover {
            background-color: #f5c6cb;
        }
        
        .cart-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 0;
            border-bottom: 1px solid #eee;
        }
        
        .item-info {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        
        .item-image {
            width: 60px;
            height: 60px;
            object-fit: cover;
            border-radius: var(--radius);
        }
        
        .item-details {
            display: flex;
            flex-direction: column;
        }
        
        .item-name {
            font-weight: 600;
        }
        
        .item-quantity {
            color: var(--gray);
        }
        
        .item-price {
            font-weight: 600;
            color: var(--primary);
        }
        
        .remove-item {
            background: none;
            border: none;
            color: #dc3545;
            cursor: pointer;
            font-size: 1.2rem;
            margin-left: 1rem;
        }
        
        .cart-summary {
            background-color: white;
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 1.5rem;
        }
        
        .summary-title {
            font-size: 1.5rem;
            margin-bottom: 1.5rem;
            color: var(--primary);
        }
        
        .summary-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.8rem;
        }
        
        .summary-label {
            color: var(--gray);
        }
        
        .summary-value {
            font-weight: 600;
        }
        
        .total-row {
            border-top: 1px solid #eee;
            padding-top: 1rem;
            margin-top: 1rem;
            font-size: 1.2rem;
        }
        
        .total-value {
            color: var(--primary);
            font-weight: 700;
        }
        
        .customer-info {
            background-color: white;
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 1.5rem;
        }
        
        .info-title {
            font-size: 1.5rem;
            margin-bottom: 1.5rem;
            color: var(--primary);
        }
        
        .form-group {
            margin-bottom: 1.5rem;
        }
        
        .form-label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
        }
        
        .form-input {
            width: 100%;
            padding: 0.8rem;
            border: 1px solid #ddd;
            border-radius: var(--radius);
            font-size: 1rem;
        }
        
        .form-input:focus {
            border-color: var(--primary);
            outline: none;
        }
        
        .required::after {
            content: " *";
            color: #dc3545;
        }
        
        .checkout-btn {
            background-color: var(--primary);
            color: white;
            border: none;
            padding: 1rem 2rem;
            border-radius: var(--radius);
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            width: 100%;
            margin-top: 1rem;
        }
        
        .checkout-btn:hover {
            background-color: #3a6547;
        }
        
        .checkout-btn:disabled {
            background-color: var(--gray);
            cursor: not-allowed;
        }
        
        /* Footer */
        footer {
            background-color: var(--dark);
            color: white;
            padding: 3rem 5%;
            margin-top: 3rem;
        }
        
        .footer-container {
            display: grid;
            /*grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));*/
            gap: 2rem;
            max-width: 1400px;
            justify-content: center;
            margin: auto;
        }
        
        .footer-section h3 {
            font-size: 1.5rem;
            margin-bottom: 1.5rem;
            justify-content: center;
            color: var(--accent);
        }
        
        .footer-links {
            list-style: none;
        }
        
        .footer-links li {
            margin-bottom: 0.8rem;
        }
        
        .footer-links a {
            color: var(--light);
            text-decoration: none;
            transition: var(--transition);
        }
        
        .footer-links a:hover {
            color: var(--accent);
        }
        
        .contact-info {
            display: flex;
            flex-direction:column;
            gap: 0.8rem;
            justify-content: center;
        }
        
        .contact-item {
            display: flex;
            align-items: center;
            gap: 0.8rem;
        }
        
        /*.social-icons {
            display: flex;
            gap: 1rem;
            margin-top: 1rem;
        }*/

        .whatsapp-float {
            position: fixed;
            width: 60px;
            height: 60px;
            bottom: 40px;
            right: 40px;
            background-color: #31b461;
            color: #ffffff;
            border-radius: 50px;
            text-align: center;
            font-size: 30px;
            box-shadow: 2px 2px 3px #999;
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
        }

        .fa-whatsapp {
            color: #ddd;
            transition: transform 0.3s;
        }

        .whatsapp-float:hover .fa-whatsapp {
            transform: scale(1.2);
        }
        
        /*.social-icons a {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 40px;
            height: 40px;
            background-color: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            color: white;
            font-size: 1.2rem;
            transition: var(--transition);
        }*/
        
        /*.social-icons a:hover {
            background-color: var(--primary);
            transform: translateY(-3px);
        }*/
        
        .copyright {
            text-align: center;
            padding-top: 2rem;
            margin-top: 2rem;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            color: var(--light);
        }
        
        /* Nuevos estilos para login/registro */
        .auth-container {
            max-width: 500px;
            margin: 3rem auto;
            background-color: white;
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 2rem;
        }
        
        .auth-title {
            color: var(--primary);
            margin-bottom: 1.5rem;
            text-align: center;
        }
        
        .auth-switch {
            text-align: center;
            margin-top: 1.5rem;
        }
        
        .auth-switch a {
            color: var(--primary);
            text-decoration: none;
            font-weight: 600;
        }
        
        .auth-switch a:hover {
            text-decoration: underline;
        }
        
        .error-message {
            color: #dc3545;
            margin-top: 0.5rem;
            display: none;
        }
        
        .profile-container {
            max-width: 600px;
            margin: 3rem auto;
            background-color: white;
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 2rem;
        }
        
        .profile-actions {
            margin-top: 2rem;
            display: flex;
            gap: 1rem;
        }
        
        .btn-logout {
            background-color: #dc3545;
            color: white;
        }
        
        .btn-logout:hover {
            background-color: #bd2130;
        }
        
        /* Estilos para los pedidos en el perfil */
        .order-status {
            padding: 4px 8px;
            border-radius: 20px;
            font-weight: 600;
            display: inline-block;
            margin-top: 5px;
        }
        
        .status-pendiente {
            background-color: #ffc107;
            color: #212529;
        }
        
        .status-aceptado {
            background-color: #0d6efd;
            color: white;
        }
        
        .status-completado {
            background-color: #198754;
            color: white;
        }
        
        .status-rechazado {
            background-color: #dc3545;
            color: white;
        }
        
        .user-orders {
            margin-top: 2rem;
        }
        
        .order-card {
            background-color: #f9f9f9;
            border-radius: var(--radius);
            padding: 1rem;
            margin-bottom: 1rem;
            box-shadow: var(--shadow);
        }
        
        .order-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.5rem;
        }
        
        .order-date {
            color: var(--gray);
        }

        .order-products-list {
            margin-top: 10px;
            padding: 0;
        }

        .order-product-item {
            display: flex;
            justify-content: space-between;
            padding: 8px 10px;
            margin-bottom: 5px;
            background-color: #f8f9fa;
            border-radius: var(--radius);
            border-left: 3px solid var(--primary);
        }

        .product-name {
            flex-grow: 1;
        }

        .product-quantity {
            font-weight: 600;
            color: var(--primary);
        }

        .profile-navigation {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            border-bottom: 1px solid #eee;
            padding-bottom: 10px;
        }

        .profile-tab {
            background: none;
            border: none;
            padding: 10px 15px;
            border-radius: var(--radius);
            cursor: pointer;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: var(--transition);
        }

        .profile-tab.active {
            background-color: var(--primary);
            color: white;
        }

        .profile-tab:hover:not(.active) {
            background-color: var(--light-gray);
        }

        .profile-section {
            padding: 15px;
            border-radius: var(--radius);
            background: white;
            box-shadow: var(--shadow);
            margin-bottom: 20px;
        }

        .order-products-list {
            list-style: none;
            padding: 0;
            margin-top: 10px;
        }

        .order-product-item {
            display: flex;
            justify-content: space-between;
            padding: 8px 10px;
            margin-bottom: 5px;
            background-color: #f8f9fa;
            border-radius: var(--radius);
            border-left: 3px solid var(--primary);
        }

        .product-name {
            flex-grow: 1;
        }

        .product-quantity {
            font-weight: 600;
            color: var(--primary);
        }

        /* Agrega esto en la sección de estilos */
        button {
            transition: var(--transition);
        }

        button:hover {
            opacity: 0.8;
        }
        
        /* MEJORA: Toast notifications */
        #toast-container {
            position: fixed;
            top: 1rem;
            right: 1rem;
            z-index: 2000;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        .toast {
            background: #333;
            color: #fff;
            padding: 1rem 1.5rem;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
            opacity: 0.95;
            font-size: 1rem;
            animation: fadeInOut 3.5s;
        }
        .toast-success { background: #4a7c59; }
        .toast-error { background: #dc3545; }
        .toast-info { background: #007bff; }
        @keyframes fadeInOut {
            0% { opacity: 0; transform: translateY(-20px);}
            10% { opacity: 1; transform: translateY(0);}
            90% { opacity: 1;}
            100% { opacity: 0; transform: translateY(-20px);}
        }

        /* MEJORA: Accesibilidad para focus */
        .category-card:focus, .product-card:focus {
            outline: 2px solid var(--primary);
            outline-offset: 2px;
        }

        /* Responsive */
        @media (max-width: 992px) {
            .banner h1 {
                font-size: 2.8rem;
            }
            
            .banner p {
                font-size: 1.2rem;
            }
        }
        
        @media (max-width: 768px) {
            .hamburger {
                display: block;
            }
            
            .nav-links {
                position: fixed;
                top: 70px;
                left: 0;
                background-color: white;
                width: 100%;
                flex-direction: column;
                align-items: center;
                padding: 2rem 0;
                gap: 1.5rem;
                box-shadow: var(--shadow);
                transform: translateY(-150%);
                transition: var(--transition);
                z-index: 99;
            }
            
            .nav-links.active {
                transform: translateY(0);
            }
            
            .banner {
                height: 60vh;
            }
            
            .banner h1 {
                font-size: 2.2rem;
            }
            
            .products-grid {
                grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            }

            .whatsapp-float {
                width: 50px;
                height: 50px;
                bottom: 20px;
                right: 20px;
                font-size: 25px;
            }
            
            .profile-actions {
                flex-direction: column;
            }

            .horarios-container {
                grid-template-columns: 1fr !important;
            }
        }
        
        @media (max-width: 576px) {
            .banner {
                height: 50vh;
            }
            
            .banner h1 {
                font-size: 1.8rem;
            }
            
            .banner p {
                font-size: 1rem;
            }
            
            .categories-grid {
                grid-template-columns: 1fr;
            }
            
            .cart-item {
                flex-direction: column;
                align-items: flex-start;
                gap: 1rem;
            }
            
            .item-actions {
                display: flex;
                width: 100%;
                justify-content: space-between;
            }
        }

        /* Agregar en tu archivo CSS */
        .quantity-container {
            display: flex;
            align-items: center;
            gap: 8px;
            width: 100%;
        }

        .quantity-select {
            flex: 1;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
        }

        .quantity-or {
            font-size: 12px;
            color: #777;
        }

        .quantity-custom {
            flex: 1;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            width: 40%;
        }

        /* Para que el input numérico no muestre flechas en algunos navegadores */
        .quantity-custom::-webkit-outer-spin-button,
        .quantity-custom::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        .quantity-custom {
            -moz-appearance: textfield;
            appearance: textfield;
        }
