:root {
    --color-primary: #F28C38;
    --color-secondary: #4A4A4A;
    --color-light: #FFFFFF;
    --color-beige: #F5E8C7;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--color-secondary);
    padding-top: 120px; /* Ajustado para móvil */
}

@media (min-width: 992px) {
    body {
        padding-top: 90px; /* Ajustado para desktop */
    }
}

.navbar {
    background: linear-gradient(135deg, var(--color-primary), #ff4d4d) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease-in-out; /* Animación suave */
    transform: translateY(0); /* Posición inicial */
    padding-top: 2px;
    padding-bottom: 2px;
}

/* Navbar visible */
.navbar-visible {
    transform: translateY(0) !important;
}

/* Navbar oculto */
.navbar-hidden {
    transform: translateY(-100%) !important;
}

.navbar-brand {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: white !important; /* Color blanco para logo */
}

.navbar .container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100%;
    padding-top: 1px;
    padding-bottom: 1px;
}

.navbar-toggler {
    border: 2px solid white;
    padding: 8px 12px;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='white' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-brand img {
    max-height: 60px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.2); /* Hacer logo más brillante */
}

.nav-link {
    color: white !important; /* Links blancos */
    font-weight: 500;
}

.nav-link:hover, .nav-link.active {
    color: #330000 !important; /* Hover amarillo */
}

/* Botón login */
.btn-login {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-login:hover {
    background: white;
    color: var(--color-primary);
}

.btn-login i {
    font-size: 1.1rem;
}

.divider {
    position: relative;
    text-align: center;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #dee2e6;
}

.divider-text {
    background: white;
    padding: 0 1rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.nav-pills .nav-link {
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-pills .nav-link.active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.input-group .btn {
    border-color: #ced4da;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(242, 140, 56, 0.25);
}

.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-color: #d7751e;
    border-color: #d7751e;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

@media (max-width: 576px) {
    .modal-dialog {
        margin: 1rem 0.5rem;
    }
    
    .nav-pills .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Carrito actualizado */
.cart-btn {
    position: relative;
    background: #ffc107;
    border: none;
    color: var(--color-dark);
    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cart-btn:hover {
    background: #ffcd39;
    transform: translateY(-1px);
}

.cart-counter {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: white;
    color: var(--color-primary);
    border-radius: 50%;
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    border: 2px solid var(--color-primary);
}

.checkout-step {
    min-height: 400px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.delivery-option{
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
}

.payment-option {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.payment-option:hover {
    border-color: #0d6efd;
    box-shadow: 0 0 10px rgba(13, 110, 253, 0.2);
}

.payment-option.active {
    border-color: #0d6efd !important;
    background-color: #f8f9fa !important;
}

.payment-option input[type="radio"] {
    position: absolute;
    top: 10px;
    right: 10px;
}

.payment-option label {
    cursor: pointer;
    margin: 0;
    display: block;
}

.delivery-option:hover, .payment-option:hover {
    border-color: var(--color-primary);
    background-color: #f8f9fa;
}

.delivery-option.active, .payment-option.active {
    border-color: var(--color-primary);
    background-color: rgba(242, 140, 56, 0.1);
}

.delivery-option input[type="radio"], .payment-option input[type="radio"] {
    margin-top: 0;
}

.order-items {
    max-height: 300px;
    overflow-y: auto;
}

.order-item {
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
}

.order-item:last-child {
    border-bottom: none;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(242, 140, 56, 0.25);
}

.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-color: #d7751e;
    border-color: #d7751e;
}

@media (max-width: 991px) {
    .modal-dialog {
        max-width: 95%;
        margin: 1rem auto;
    }
    
    .modal-body .row {
        margin: 0;
    }
    
    .modal-body .col-lg-8,
    .modal-body .col-lg-4 {
        padding: 0;
    }
}

/* Buscador separado - Solo móvil */
.search-section {
    background: transparent !important; /* TRANSPARENTE */
    padding: 5px 0 8px 0;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* Buscador integrado en navbar - Solo PC */
.search-navbar {
    display: none;
}

.search-wrapper {
    display: flex;
    width: 100%;
}

.search-input {
    flex: 1;
    border: none;
    border-radius: 25px 0 0 25px;
    padding: 14px 25px;
    font-size: 1.1rem;
    outline: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-btn {
    background: #ffc107;
    border: none;
    border-radius: 0 25px 25px 0;
    padding: 14px 25px;
    color: var(--color-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    min-width: 60px;
}

.search-btn:hover {
    background: #ffcd39;
    transform: translateY(-1px);
}

.search-btn i {
    font-size: 1.2rem;
}

/* PC: Buscador integrado en navbar */
@media (min-width: 992px) {
    /* Ocultar buscador móvil */
    .search-section {
        display: none;
    }
    
    .navbar {
        padding-top: 3px;
        padding-bottom: 3px;
    }
    
    .navbar .container {
        padding-top: 2px;
        padding-bottom: 2px;
    }
    
    /* Mostrar buscador integrado */
    .search-navbar {
        display: flex !important;
        flex: 1;
        max-width: 400px; /* Más ancho en PC */
        margin: 0 30px; /* Espaciado lateral */
    }
    
    .search-navbar .search-input {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .search-navbar .search-btn {
        padding: 12px 20px;
        min-width: 50px;
    }
    
    .search-navbar .search-btn i {
        font-size: 1.1rem;
    }
}

.mayorista-link {
    /* Empuja el enlace al extremo derecho, anulando estilos previos */
    margin-left: auto !important; 
}

/* Opcional: para que se vea como un botón */
.mayorista-link .nav-link {
    border: 1px solid #ffffff;
    border-radius: 8px;
    padding: 8px 16px;
    background-color: #ff6347; /* Un color que destaque */
    color: #ffffff;
}

/* Categorías */
.category-selector {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

.category-buttons-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-outline-secondary {
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.main-category-btn {
    background: linear-gradient(135deg, var(--color-primary), #ff4d4d);
    border: none;
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(213, 38, 0, 0.3);
    transition: all 0.3s ease;
    min-height: 55px;
    min-width: 180px;
}

.main-category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(213, 38, 0, 0.4);
}

.dropdown-category-btn {
    background: white;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    min-height: 55px;
    min-width: 200px;
}

.dropdown-category-btn:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

/* Dropdown con X para cerrar */
.categories-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    padding: 0;
    margin-top: 15px;
    width: 320px;
    max-height: 400px;
    overflow: hidden;
    z-index: 1060 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 2px solid #eee;
}

.categories-dropdown.show {
    z-index: 99999 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#categoriesDropdown {
    z-index: 99999 !important;
}

/* Header del dropdown con X */
.dropdown-header {
    background: var(--color-primary);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 13px 13px 0 0;
}

.dropdown-header h6 {
    margin: 0;
    font-weight: 600;
}

.close-dropdown {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-dropdown:hover {
    background: rgba(255,255,255,0.2);
}

/* Contenido del dropdown */
.dropdown-content {
    max-height: 320px;
    overflow-y: auto;
    padding: 10px 0;
}

.dropdown-content::-webkit-scrollbar {
    width: 4px;
}

.dropdown-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 10px;
}

.category-item {
    padding: 12px 20px;
    color: var(--color-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    margin: 0 10px;
    border-radius: 8px;
    font-size: 1rem;
}

.category-item:hover {
    background: #f8f9fa;
    color: var(--color-primary);
    transform: translateX(5px);
}

.category-badge {
    background: #e9ecef;
    color: #6c757d;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: auto;
    min-width: 30px;
    text-align: center;
}

.category-item:hover .category-badge {
    background: var(--color-primary);
    color: white;
}

/* Móvil */
@media (max-width: 991px) {
    .btn-login {
        padding: 10px;
        min-width: 45px;
        justify-content: center;
    }
    
    .btn-login i {
        font-size: 1.2rem;
    }
    
    .category-buttons-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-category-btn,
    .dropdown-category-btn {
        width: 100%;
        max-width: 280px;
        padding: 16px 25px;
        min-height: 55px;
    }
    
    .categories-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 320px;
        max-height: 70vh;
        z-index: 99999 !important;
    }
}
        
        /* Hero */
        .hero {
            height: 500px;
            margin-top: -76px;
            background-position: center;
            background-size: cover;
            display: flex;
            align-items: center;
            position: relative;
        }
        
        .hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.4);
        }
        
        .hero-content {
            position: relative;
            color: white;
            text-align: center;
            z-index: 1;
        }
        
        /* Botones */
        .btn-primary {
            background-color: var(--color-primary);
            border-color: var(--color-primary);
            padding: 0.75rem 2rem;
            border-radius: 50px;
        }
        
        .btn-primary:hover {
            background-color: #e07e30;
            border-color: #e07e30;
        }
        
        /* Productos */
        .section-title {
            position: relative;
            padding-bottom: 1rem;
            margin-bottom: 2rem;
            text-align: center;
        }
        
        .section-title::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 80px;
            height: 3px;
            background-color: var(--color-primary);
        }
        

        /* 🎨 CSS PARA PILLS CON SCROLL HORIZONTAL */

.family-pills-container {
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.family-pills-scroll {
    display: flex;
    overflow-x: auto;
    padding: 15px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 15px;
}

/* Scrollbar personalizada */
.family-pills-scroll::-webkit-scrollbar {
    height: 6px;
}

.family-pills-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.family-pills-scroll::-webkit-scrollbar-thumb {
    background: #d52600;
    border-radius: 10px;
}

.family-pills-scroll::-webkit-scrollbar-thumb:hover {
    background: #b81f00;
}

/* Estilos de las pills */
.family-pill {
    background: white;
    border: 2px solid #e9ecef;
    color: #6c757d;
    padding: 12px 20px;
    border-radius: 25px;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    min-width: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.family-pill:hover {
    border-color: #d52600;
    color: #d52600;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(213, 38, 0, 0.2);
    text-decoration: none;
}

.family-pill.active {
    background: linear-gradient(135deg, #d52600, #ff4d4d);
    border-color: #d52600;
    color: white;
    box-shadow: 0 4px 15px rgba(213, 38, 0, 0.3);
}

.family-pill .badge {
    margin-left: 8px;
    font-size: 0.75rem;
}

.family-pill:not(.active) .badge {
    background-color: #e9ecef !important;
    color: #6c757d !important;
}

.family-pill.active .badge {
    background-color: rgba(255,255,255,0.2) !important;
    color: white !important;
}

/* Responsive */
@media (max-width: 768px) {
    .family-pill {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .family-pills-scroll {
        padding: 10px 0;
        gap: 10px;
    }
}


        .product-card {
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(0,0,0,0.08);
            height: 100%;
            transition: transform 0.3s;
        }
        
        .product-card:hover {
            transform: translateY(-5px);
        }
        
        .product-img-container {
            height: 200px;
            overflow: hidden;
        }
        
        .product-img {
    width: 100%;
    height: 100%;
    object-fit: scale-down; /* Esta opción es ideal para productos */
    transition: transform 0.5s;
}
        
        .product-card:hover .product-img {
            transform: scale(1.05);
        }
        
        .product-info {
            padding: 1.5rem;
        }
        
        .product-category {
            color: var(--color-primary);
            font-size: 0.85rem;
            font-weight: 600;
            text-transform: uppercase;
        }
        
        .product-price {
            font-size: 1.3rem;
            font-weight: 700;
            margin: 0.5rem 0 1rem;
        }
        
        /* Sobre nosotros */
        .about-section {
            background-color: var(--color-beige);
        }
        
        /* Contacto */
        .contact-section {
            background-color: #f8f9fa;
        }
        
        .contact-info-item {
            display: flex;
            margin-bottom: 1.5rem;
        }
        
        .contact-info-icon {
            width: 50px;
            height: 50px;
            background-color: var(--color-primary);
            color: white;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-right: 1rem;
        }
        
        /* Footer */
        footer {
            background-color: var(--color-secondary);
            color: white;
        }
        
        .footer-links {
            list-style: none;
            padding: 0;
        }
        
        .footer-links a {
            color: rgba(255,255,255,0.8);
            text-decoration: none;
        }
        
        .footer-links a:hover {
            color: var(--color-primary);
        }
        
        .social-links {
            display: flex;
            gap: 1rem;
        }
        
        .social-link {
            width: 40px;
            height: 40px;
            background-color: rgba(255,255,255,0.1);
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            color: white;
            text-decoration: none;
        }
        
        .social-link:hover {
            background-color: var(--color-primary);
            color: white;
        }

        .whatsapp-float {
    position: fixed;
    z-index: 10000000000000;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out;
    text-decoration: none;
}

.whatsapp-float img {
    width: 40px;
    height: 40px;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    text-decoration: none;
}