/* === Layout de columnas === */

#productos-container {
    margin: 0 auto;
}


/* Cada producto ocupa 2 por fila en móvil y 4 en escritorio */

.col-producto {
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .col-producto {
        flex: 0 0 50%;
        max-width: 50%;
    }
}


/* === Cards de producto === */

.producto-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-transform: capitalize;
    background-color: #fff;
}

.producto-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}


/* Imagen del producto */

.producto-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}


/* Título y texto */

.producto-card .card-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.4rem;
    text-transform: capitalize;
}

.producto-card .card-text {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}


/* Precio */

.producto-card .fw-bold {
    font-size: 1rem;
    color: #198754 !important;
}


/* Botones */

.producto-card .btn {
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: capitalize;
}

.producto-card .btn-dark {
    background-color: #212529;
    border: none;
}

.producto-card .btn-dark:hover {
    background-color: #000;
}

.producto-card .btn-outline-secondary {
    border: 1px solid #ddd;
    color: #333;
}

.producto-card .btn-outline-secondary:hover {
    background-color: #f8f9fa;
}


/* === Badges === */

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    color: #fff;
    z-index: 2;
}

.badge-nuevo {
    background-color: #0d6efd;
}

.badge-oferta {
    background-color: #dc3545;
    left: auto;
    right: 10px;
}


/* === Efecto Fade === */

.fade-in {
    animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* === Botón flotante de WhatsApp === */

.btn-whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: white;
    font-size: 24px;
    padding: 12px 16px;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 999;
}

.btn-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    color: white;
}

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    text-decoration: none;
    color: #fff;
}


/* === Carrito lateral === */

.carrito-lateral {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    max-width: 90%;
    height: 100%;
    background-color: #f8f9fa;
    box-shadow: -3px 0 10px rgba(0, 0, 0, 0.2);
    padding: 20px;
    overflow-y: auto;
    transition: right 0.3s ease-in-out;
    z-index: 1050;
}

.carrito-lateral.abierto {
    right: 0;
}

.carrito-lateral h4 {
    margin: 0;
}

#carrito-items {
    margin-top: 10px;
}

.carrito-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}


/* === Nav general === */

.navbar-nav .nav-link {
    color: #fff;
    transition: color 0.2s;
}

.navbar-nav .nav-link:hover {
    color: #ffc107;
}


/* Botones de usuario y carrito */

.navbar .btn {
    white-space: nowrap;
}


/* Ajustes responsive del nav */

@media (max-width: 992px) {
    #navbarUsuarioContainer {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    #navbarUsuarioContainer .nav-item {
        width: 100%;
    }
    #navbarUsuarioContainer .nav-link,
    #navbarUsuarioContainer .btn {
        display: block;
        width: 100% !important;
        text-align: center;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}


/* === Texto fijo sobre el carrusel === */

.carousel-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px 40px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    animation: fadeUp 1s ease forwards;
}

.text-shadow {
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
}


/* Animación de entrada del texto */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}


/* === Ajustes responsive === */

@media (max-width: 768px) {
    .carousel-overlay-text {
        width: 95%;
        padding: 15px;
        top: 30%;
        /* evita que se superponga con el navbar */
    }
    .carousel-overlay-text h1 {
        font-size: 1.6rem;
    }
    .carousel-overlay-text p {
        font-size: 1rem;
    }
}


/* === Carrusel principal === */

#carouselFeria {
    margin-top: 56px;
    /* altura del navbar Bootstrap */
    position: relative;
}

@media (max-width: 768px) {
    #carouselFeria {
        margin-top: 70px;
        /* mayor separación en móviles */
    }
}

.modal p::first-letter,
.modal .modal-body::first-letter,
#detalleNombre::first-letter {
    text-transform: uppercase;
}