﻿/* ================== GLOBAL ================== */
body {
    font-family: "Segoe UI", Arial, sans-serif;
}

/* --- Cards promos --- */
.section-container .row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    /*margin: -10px;*/ /* compensa el padding de las columnas */
}

.section-container .col-md-5,
.section-container .col-md-4,
.section-container .col-md-3 {
    flex: 1 1 auto;
    max-width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

/* Desktop: 3 por fila */
@media (min-width: 992px) {
    .section-container .col-md-5,
    .section-container .col-md-4,
    .section-container .col-md-3 {
        flex: 0 0 30%;
        max-width: 30%;
    }
}

/* Tablet: 2 por fila */
@media (max-width: 991px) and (min-width: 577px) {
    .section-container .col-md-5,
    .section-container .col-md-4,
    .section-container .col-md-3 {
        flex: 0 0 45%;
        max-width: 45%;
        margin: 0 auto;
    }
}

/* Móvil: 1 centrada */
@media (max-width: 576px) {
    .section-container .col-md-5,
    .section-container .col-md-4,
    .section-container .col-md-3 {
        flex: 0 0 90%;
        max-width: 90%;
        margin: 0 auto;
    }
}

/* ================== CARDS GENERALES ================== */
.card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

    .card:hover {
        transform: translateY(-6px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    }

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #222;
    text-align: center;
}

.card-text {
    font-size: 14px;
    color: #555;
    margin-bottom: 12px;
    flex-grow: 1;
    text-align: justify;
}

.info-text {
    font-size: 13px;
    color: #444;
    margin-bottom: 4px;
}

.price-tag {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ff6a00, #ff3c78);
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    padding: 8px 14px;
    border-radius: 8px;
    z-index: 10;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}

.price-desde {
    font-size: 12px;
    display: block;
    font-weight: 400;
}

.card-img-container {
    position: relative;
    height: 220px;
    overflow: hidden;
}

    .card-img-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.6s ease;
    }

.card:hover .card-img-container img {
    transform: scale(1.08);
}

.product-type-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #007bff;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.btn-outline-primary {
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-outline-primary:hover {
        background-color: #007bff;
        color: #fff;
        transform: scale(1.05);
    }

/* ================== SECCIONES ================== */
.section-container {
    margin-bottom: 60px;
}

.section-title {
    margin-bottom: 30px;
    text-align: center;
    font-weight: bold;
    font-size: 28px;
    color: #222;
    position: relative;
}

    .section-title::after {
        content: "";
        width: 60px;
        height: 3px;
        background: #007bff;
        display: block;
        margin: 8px auto 0;
        border-radius: 2px;
    }

/* ================== CARRUSEL BANNERS ================== */
#carouselHome {
    height: 500px;
    position: relative;
}

    #carouselHome .carousel-item {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transition: opacity 0.6s ease-in-out;
    }

    #carouselHome .carousel-fade .carousel-item {
        opacity: 0;
    }

        #carouselHome .carousel-fade .carousel-item.active {
            opacity: 1;
            position: relative;
        }

    #carouselHome .carousel-control-prev-icon,
    #carouselHome .carousel-control-next-icon {
        background-color: rgba(0,0,0,0.5);
        border-radius: 50%;
    }

/* ================== CARRUSEL COMENTARIOS ================== */
#commentsCarousel {
    min-height: 250px;
    max-width: 1024px;
    margin: 0 auto;
    position: relative;
}

    #commentsCarousel .carousel-item {
        position: relative;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }

        #commentsCarousel .carousel-item.active {
            opacity: 1;
        }

    #commentsCarousel .row {
        display: flex;
        justify-content: center;
        align-items: stretch;
        flex-wrap: wrap;
        gap: 1rem;
    }

    #commentsCarousel .comment-card {
        flex: 1 1 auto;
        border-radius: 16px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.15);
        background: #fff;
        padding: 1.5rem;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    #commentsCarousel .carousel-control-prev-icon,
    #commentsCarousel .carousel-control-next-icon {
        background-color: rgba(0,0,0,0.5);
        border-radius: 50%;
        width: 40px;
        height: 40px;
    }

/* ================== RESPONSIVE ================== */
@media (max-width: 1200px) {
    #carouselHome {
        height: 400px;
    }

    .card-img-container {
        height: 200px;
    }

    .section-title {
        font-size: 24px;
    }
}

@media (max-width: 992px) {
    #carouselHome {
        height: 320px;
    }

    .card-img-container {
        height: 180px;
    }

    .card-title {
        font-size: 16px;
    }

    .card-text {
        font-size: 13px;
    }

    .price-tag {
        font-size: 14px;
        padding: 6px 10px;
    }

    .section-title {
        font-size: 22px;
    }

    /* Comentarios: tablet 2 por fila */
    #commentsCarousel .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 576px) {
    #carouselHome {
        height: 240px;
    }

    .card-img-container {
        height: 160px;
    }

    .card-title {
        font-size: 15px;
    }

    .card-text {
        font-size: 13px;
        text-align: left;
    }

    .price-tag {
        font-size: 13px;
        right: 8px;
        bottom: 8px;
        padding: 5px 8px;
    }

    .section-title {
        font-size: 20px;
    }

    /* Promos centradas */
    .section-container .row.justify-content-center {
        justify-content: center;
    }

    .section-container .col-md-4 {
        flex: 0 0 90%;
        max-width: 90%;
        margin: 0 auto;
    }

    /* Comentarios: móvil 1 por fila */
    #commentsCarousel .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Evita scroll horizontal accidental */
html, body {
    overflow-x: hidden;
}
