/* ==========================================
   CARRUSEL - SANITARIOS ROMA
   ========================================== */

.sr-carrusel {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 55px;
    box-sizing: border-box;
}


/* ==========================================
   CONTENEDOR
   ========================================== */

.sr-carrusel-contenedor {
    width: 100%;
    overflow: hidden;

    /* Espacio para que no se recorte la sombra
       ni el hover de las tarjetas */
    padding: 10px 0 25px;
}


/* ==========================================
   TRACK
   ========================================== */

.sr-carrusel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.45s ease;
    will-change: transform;
}


/* ==========================================
   TARJETA
   ========================================== */

.sr-producto-card {
    display: flex;
    flex-direction: column;
    flex: 0 0 calc(25% - 18px);
    min-width: 0;

    background: #ffffff;
    border: 1px solid #e7e7e7;
    border-radius: 18px;

    overflow: hidden;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


/* Hover de la tarjeta */

.sr-producto-card:hover {
    transform: translateY(-6px);

    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}


/* ==========================================
   IMAGEN
   ========================================== */

.sr-producto-imagen {
    display: block;

    width: 100%;
    height: 260px;

    overflow: hidden;

    background: #ffffff;
}


.sr-carrusel .sr-producto-imagen img {
    width: 100%;
    height: 100%;
    max-width: none;

    display: block;

    /* contain = se ve el producto completo, sin recortes */
    object-fit: contain;

    transition: transform 0.45s ease;
}


/* Zoom de imagen */

.sr-producto-card:hover .sr-producto-imagen img {
    transform: scale(1.05);
}


/* ==========================================
   INFORMACIÓN
   ========================================== */

.sr-producto-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
}


/* ==========================================
   NOMBRE
   ========================================== */

.sr-carrusel .sr-producto-nombre {
    margin: 0 0 10px;

    font-size: 18px;
    line-height: 1.35;

    font-weight: 600;

    color: #252525;
}


/* ==========================================
   PRECIO
   ========================================== */

.sr-producto-precio {
    margin-bottom: 18px;

    font-size: 20px;
    font-weight: 700;

    color: #a32929;
}


/* WooCommerce puede generar varios elementos
   dentro del precio */

.sr-producto-precio del {
    color: #999;
    font-size: 15px;
    margin-right: 5px;
}


.sr-producto-precio ins {
    text-decoration: none;
}


/* ==========================================
   ACCIONES
   ========================================== */

.sr-producto-acciones {
    display: flex;
    flex-direction: column;
    gap: 9px;

    /* Empuja los botones al fondo de la tarjeta */
    margin-top: auto;
}


/* Link "Ver carrito" que agrega WooCommerce
   después de agregar por AJAX */

.sr-producto-acciones .added_to_cart {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    font-size: 14px;
    font-weight: 600;

    color: #a32929;
    text-decoration: none;
}


/* ==========================================
   BOTÓN VER PRODUCTO
   ========================================== */

.sr-carrusel a.sr-btn-ver-producto {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 44px;

    padding: 10px 16px;

    box-sizing: border-box;

    border: 1px solid #a32929;
    border-radius: 9px;

    background: transparent;

    color: #a32929;

    font-size: 14px;
    font-weight: 600;

    text-decoration: none;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}


.sr-carrusel a.sr-btn-ver-producto:hover {
    background: #a32929;
    color: #ffffff;
    text-decoration: none;

    transform: translateY(-1px);
}


/* ==========================================
   BOTÓN AGREGAR AL CARRITO
   ========================================== */

/* Es un <a class="button ..."> de WooCommerce,
   por eso se fuerzan los estilos con más
   especificidad para pisar los del tema. */

.sr-carrusel a.sr-btn-carrito {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 44px;

    padding: 10px 16px;

    box-sizing: border-box;

    border: none;
    border-radius: 9px;

    background: #a32929;

    color: #ffffff;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;

    cursor: pointer;

    box-shadow: none;

    transition:
        background 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.sr-carrusel a.sr-btn-carrito:hover {
    background: #851f1f;
    color: #ffffff;
    text-decoration: none;

    transform: translateY(-1px);

    box-shadow: 0 6px 15px rgba(163, 41, 41, 0.25);
}


.sr-carrusel a.sr-btn-carrito:active {
    transform: translateY(0);
}


/* Mientras WooCommerce agrega el producto */

.sr-carrusel a.sr-btn-carrito.loading {
    opacity: 0.7;
    pointer-events: none;
}


/* ==========================================
   PRODUCTOS SIN COMPRA DIRECTA
   ========================================== */

.sr-carrusel a.sr-producto-no-disponible {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 44px;

    box-sizing: border-box;

    border-radius: 9px;

    background: #eeeeee;

    color: #666666;

    font-size: 14px;
    font-weight: 600;

    text-decoration: none;

    transition: background 0.25s ease;
}


.sr-carrusel a.sr-producto-no-disponible:hover {
    background: #e2e2e2;
    color: #666666;
    text-decoration: none;
}


/* ==========================================
   FLECHAS
   ========================================== */

.sr-carrusel-btn {
    position: absolute;

    top: 50%;
    transform: translateY(-50%);

    z-index: 5;

    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #dddddd;
    border-radius: 50%;

    background: #ffffff;

    color: #a32929;

    font-size: 22px;
    font-weight: 500;

    cursor: pointer;

    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.12);

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.sr-carrusel-btn:hover {
    background: #a32929;
    color: #ffffff;

    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}


/* Flecha anterior */

.sr-carrusel-anterior {
    left: 0;
}


/* Flecha siguiente */

.sr-carrusel-siguiente {
    right: 0;
}


/* Flecha deshabilitada (inicio o final) */

.sr-carrusel-btn:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}


/* Ocultar flechas si todas las tarjetas entran */

.sr-carrusel.sr-sin-flechas .sr-carrusel-btn {
    display: none;
}

.sr-carrusel.sr-sin-flechas {
    padding-left: 0;
    padding-right: 0;
}


/* ==========================================
   RESPONSIVE - TABLET
   ========================================== */

@media (max-width: 1100px) {

    .sr-producto-card {
        flex: 0 0 calc(33.333% - 16px);
    }

    .sr-producto-imagen {
        height: 230px;
    }

}


/* ==========================================
   RESPONSIVE - TABLET PEQUEÑA
   ========================================== */

@media (max-width: 800px) {

    .sr-carrusel {
        padding-left: 45px;
        padding-right: 45px;
    }

    .sr-producto-card {
        flex: 0 0 calc(50% - 12px);
    }

    .sr-producto-imagen {
        height: 220px;
    }

}


/* ==========================================
   RESPONSIVE - CELULAR
   ========================================== */

@media (max-width: 600px) {

    .sr-carrusel {
        padding-left: 38px;
        padding-right: 38px;
    }

    .sr-carrusel-track {
        gap: 16px;
    }

    .sr-producto-card {
        flex: 0 0 100%;
    }

    .sr-producto-imagen {
        height: 260px;
    }

    .sr-producto-info {
        padding: 18px;
    }

    .sr-carrusel .sr-producto-nombre {
        font-size: 17px;
    }

    .sr-producto-precio {
        font-size: 19px;
    }

    .sr-carrusel-btn {
        width: 36px;
        height: 36px;

        font-size: 18px;
    }

}


/* ==========================================
   CELULAR MUY PEQUEÑO
   ========================================== */

@media (max-width: 400px) {

    .sr-carrusel {
        padding-left: 34px;
        padding-right: 34px;
    }

    .sr-producto-imagen {
        height: 230px;
    }

}
