/*=========================================
   BANNERS
========================================= */

/*BANNER*/

.banners-section {
    margin-bottom: 40px;
}

.banners-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.banner-card {
    position: relative;
    overflow: hidden;
    padding: 60px 50px;
    min-height: 320px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
}

/*CONTENIDO DEL BANNER*/

.banner-content {
    position: relative;
    z-index: 2;
    color: var(--color-white);
    max-width: 80%;
}

.banner-content h2 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
}

.banner-content p {
    font-size: 14px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/*
=========================================
RESPONSIVE BANNERS ========================================= */


/* ===== TABLET ===== */
@media (max-width: 1024px) {

    .banners-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}


/* =========================================
   TABLET (iPad / 768–992)
   👉 MÁS ALTURA tipo hero
========================================= */
@media (max-width: 992px) {

    .banners-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .banner-card {
        width: 100%;

        min-height: 320px;
        /* 👈 AQUÍ ESTÁ LA CLAVE */
        padding: 50px 32px;

        border-radius: 16px;

        display: flex;
        align-items: center;
    }

    .banner-content h2 {
        font-size: 32px;
        line-height: 1.2;
        margin-bottom: 14px;
    }

    .banner-content p {
        font-size: 15px;
        line-height: 1.5;
        margin-bottom: 22px;
    }
}


/* =========================================
   MOBILE (≤768)
   👉 un poco menos alto
========================================= */
@media (max-width: 768px) {

    .banner-card {
        min-height: 260px;
        padding: 40px 24px;
    }

    .banner-content h2 {
        font-size: 26px;
    }
}


/* =========================================
   MOBILE PEQUEÑO (≤480)
========================================= */
@media (max-width: 480px) {

    .banner-card {
        min-height: 220px;
        padding: 30px 20px;
    }

    .banner-content h2 {
        font-size: 22px;
    }

    .banner-content p {
        font-size: 13px;
    }
}


/* =========================================
  ÚLTIMOS PRODUCTOS
========================================= */

.latest-products {
    background: var(--color-bg-light);
    /* 👈 gris suave */
    padding: 40px 0;
    margin-bottom: 80px;
    margin-top: 80px;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}


/* TITULO */
.section-title {
    text-align: center;
    font-size: 30px;
    font-weight: 650;
    color: var(--color-dark);
    margin-bottom: 40px;
}

/* CONTENEDOR */
.products-carousel-wrapper {
    overflow: hidden;
    position: relative;
    padding: 0 20px;
}

/* TRACK */
.products-carousel-track {
    display: flex;
    gap: 20px;
    align-items: stretch;
    transition: transform 0.4s ease;
    will-change: transform;

}

/* TARJETA */
.product-card {
    flex: 0 0 calc((100% - 60px) / 4);
    max-width: calc((100% - 60px) / 4);
    background-color: var(--white);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    border: 0.5px solid var(--color-border);
    min-width: 0;
    scroll-snap-align: start;
}

.product-card:hover {
    transform: translateY(-5px);
}


/* IMAGEN */
.product-image-container {
    position: relative;
    height: 160px;
    width: 100%;
    flex-shrink: 0;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* BADGES */
.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.badge-green {
    background-color: #23b26d;
}

.badge-blue {
    background-color: #3E64FF;
}


/* BOOKMARK */
.bookmark-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: white;
    border: none;
    color: #666;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 12px;
    flex-shrink: 0;
}

/* INFO */
.product-info {
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0; /* evita overflow en flex child */
}


.product-name {
    color: var(--color-dark);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    /* overflow controlado */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-desc {
    color: var(--color-text-dark);
    font-size: 12px;
    margin-bottom: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-name,
.product-desc {
    padding-left: 16px;
    padding-right: 12px;
}

/* FEATURES */
.product-features {
    display: flex;
    border-top: 0.5px solid var(--color-border);
    margin-bottom: 16px;
    padding-top: 16px;
}

.feature-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
}

.feature-item span {
    font-size: 11px;
    color: var(--color-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
}

/* FOOTER */
.product-footer {
    border-top: 1px solid var(--color-border);
    padding: 14px 12px 14px 16px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
}

.product-footer img {
    width: 11px;
    flex-shrink: 0;
}

.product-price {
    color: var(--color-dark);
    font-size: clamp(14px, 1.4vw, 18px); /* escala suave con el ancho */
    font-weight: 700;
    white-space: nowrap;
    min-width: 0;
}

.view-details {
    color: var(--color-primary);
    font-size: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* BOTÓN */
.center-action {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}



/* =========================================
   TABLET GRANDE (993–1200px) — scroll horizontal, 3 cards visibles
   Se activa aquí para que touch funcione y no haya solapamiento
========================================= */
@media (max-width: 1200px) {
    .product-card {
        flex: 0 0 calc((100% - 40px) / 3);
        max-width: calc((100% - 40px) / 3);
    }

    .products-carousel-wrapper {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        padding-left: 16px;
        padding-right: 16px;
    }

    .products-carousel-wrapper::-webkit-scrollbar {
        display: none;
    }

    .products-carousel-track {
        transform: none !important;
    }

    .carousel-control {
        display: none !important;
    }
}

/* =========================================
   TABLET (≤992) — scroll horizontal, 2 cards visibles
========================================= */
@media (max-width: 992px) {

    .latest-products {
        padding: 40px;
    }

    .section-title {
        font-size: 30px;
        margin-bottom: 40px;
    }

    .product-image-container {
        aspect-ratio: 16 / 10;
        height: auto;
    }

    .product-card {
        flex: 0 0 calc((100% - 40px) / 1.95);
        max-width: calc((100% - 40px) / 1.95);
    }

    .products-carousel-wrapper {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        padding-left: 16px;
        padding-right: 35px;
    }

    .products-carousel-wrapper::-webkit-scrollbar {
        display: none;
    }

    .products-carousel-track {
        gap: 20px;
        transform: none !important;
    }

    .carousel-control {
        display: none !important;
    }
}

/* =========================================
   MOBILE (≤480)
========================================= */
@media (max-width: 480px) {

    .product-card {
        flex: 0 0 calc((100% - 30px) / 1.15);
        max-width: calc((100% - 30px) / 1.15);
    }

    .section-title {
        font-size: 20px;
        font-weight: 500;
    }

    .latest-products {
        padding: 30px 20px;
    }

    .product-name,
    .product-desc {
        padding-left: 10px;
        padding-right: 8px;
    }

    
}

/* =========================================
   NUESTROS SERVICIOS
========================================= / */
.services-section {
    padding: 30px;
    margin-bottom: 40px;
}

.services-wrapper {
    background-color: var(--color-bg-light);
    border-radius: 16px;
    padding: 40px 50px 20px;
    border: 0.5px solid var(--color-border);
    margin: 0 auto;
    /* 👈 centra */
}

.services-block {
    border-radius: 16px;
    padding: 70px 60px;
    text-align: center;
}

/* =========================================
   GRID (MUCHO AIRE)
========================================= */

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 80px;
}

/* =========================================
   ITEM (NO CARD)
========================================= */

.service-card {
    padding: 0;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* =========================================
   ICONO
========================================= */

.service-icon {
    margin-bottom: 10px;
}

.service-img {
    width: 52px;
    height: auto;
}

/* =========================================
   TEXTO
========================================= */

.service-card h6 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text-dark);
}

.service-card p {
    font-size: 15px;
    color: var(--color-text-dark);
    max-width: 240px;
    margin: 0 auto;
    font-weight: 450;
}

/* =========================================
   BOTÓN
========================================= */
.services-block__cta {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    text-align: center;
    margin-bottom: -40px;
}

.services-block__cta a {
    text-decoration: none;
}

/* =========================================
   RESPONSIVE NUESTROS SERVICIOS
========================================= */

/* =========================================
   TABLET (≤992px)
========================================= */
@media (max-width: 992px) {

    .services-wrapper {
        padding: 40px 30px 20px;
        background-color: transparent;
        border: 0;
        padding: 0;
        margin: 0;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .service-card {
        background: white;
        border: 1px solid var(--color-border);
        background-color: var(--color-bg-light);
        border-radius: 16px;
        padding: 30px 20px;
        align-items: center;
        text-align: center;
    }

    .service-card p {
        margin: 0 auto;
        max-width: 260px;
    }
}

/* =========================================
   MOBILE (≤600px)
   👉 2 columnas SIEMPRE
========================================= */
@media (max-width: 600px) {

    .services-section {
        padding: 0;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .service-card {
        padding: 20px 12px;
        border-radius: 16px;
        text-align: center;
        align-items: center;

    }

    .service-icon img {
        width: 38px;
        height: 38px;
    }

    .service-card h6 {
        font-size: 14px;
    }

    .service-card p {
        font-size: 12px;
        line-height: 1.4;
        max-width: 100%;
    }

    .services-block__cta {
        margin-top: 24px;
        margin-bottom: -30px;
    }
}
