:root {
    --clevers-primary: #2563eb;
    --clevers-secondary: #1e40af;
    --clevers-primary2: #2563eb;
    --clevers-accent: #e11d48;
    --clevers-text: #222;
    --clevers-card-bg: #fff;
    --clevers-border: rgba(0, 0, 0, .12);
    --clevers-bubble-text: white;
    --clevers-bubble-background: #00000;
    --clevers-button-text: #FFFFFF;
    --clevers-button-background: #2563eb;
}

.clevers-button:hover,
.clevers-button:active,
.clevers-button:focus {
    background: var(--clevers-secondary);
}

.ing-onsale-card {
    background: var(--clevers-secondary);
    border-color: var(--clevers-primary);
}

.slick-next:before, .slick-prev:before {
    color: var(--clevers-primary);
}

.clevers-product-carousel .slick-carousel:not(.slick-initialized) {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(100% / var(--clv-fallback-desktop, 4));
    gap: 16px;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.clevers-product-carousel .slick-carousel:not(.slick-initialized) .carousel-item {
    min-width: 0;
    scroll-snap-align: start;
}

@media (max-width: 1024px) {
    .clevers-product-carousel .slick-carousel:not(.slick-initialized) {
        grid-auto-columns: calc(100% / var(--clv-fallback-tablet, 2));
    }
}

@media (max-width: 768px) {
    .clevers-product-carousel .slick-carousel:not(.slick-initialized) {
        grid-auto-columns: calc(100% / var(--clv-fallback-mobile, 1));
    }
}

.clevers-product-carousel .slick-slide {
    margin: 10px;
    min-height: 450px;
    padding: 10px 0;
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;

}

.clevers-product {

    -webkit-box-shadow: 2px 2px 8px 0 rgba(0, 0, 0, 0.15);
    -moz-box-shadow: 2px 2px 8px 0 rgba(0, 0, 0, 0.15);
    box-shadow: 2px 2px 8px 0 rgba(0, 0, 0, 0.15);
    border-radius: 5px;

    text-align: center;

}

.clevers-product img {
    margin: 0 auto;
}

.clevers-product a {
    text-decoration: none !important;
}

.clevers-product h3 {
    margin-top: 5px;
    font-size: 20px;
}

.clevers-price {
    font-size: 18px;
}

.clevers-button {
    background: var(--clevers-button-background);
    padding: 5px 20px;
    border-radius: 5px;
    color: white;
    text-align: center;
    margin: 5px auto;
    text-decoration: none !important;
    align-self: flex-end;

}

.clevers-button:hover {
    color: white;
    background: var(--clevers-secondary);
}

.clevers-button:active {
    color: white;
    background: var(--clevers-secondary);
}

.clevers-button:checked {
    color: white;
    background: var(--clevers-secondary);
}

.product-title {
    font-weight: bold;
    font-size: 16px;
}

.detail-prices {
    margin-top: 10px;

}

.detail {
    margin: 0 !important;
    font-size: 11px;

}

.details-price {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 0 !important;

}

.details-price del {
    font-size: 14px;
    font-weight: 600;

}

.wholesaler-prices {
    color: var(--clevers-primary);
}

.wholesaler {
    margin: 0 !important;
    font-size: 11px;
}

.wholesalers-price {
    margin: 0 !important;
    font-size: 14px;
    font-weight: bold;
}

a.clevers-button.ajax_add_to_cart.add_to_cart_button.added:after {
    font-family: WooCommerce, serif;
    content: '\e017';
    margin-left: .53em;
    vertical-align: bottom;
}

a.clevers-button.ajax_add_to_cart.add_to_cart_button.loading:after {
    display: inline-block;
    content: "";
    position: relative;
    top: 0;
    right: -.5em;
    left: auto;
    width: .8em;
    height: .8em;
    background-color: white;
    background-image: none;
    border-radius: 100%;
    animation: dotPulse .65s 0s infinite cubic-bezier(.21, .53, .56, .8);
}

a.clevers-button.ajax_add_to_cart.add_to_cart_button:focus {
    color: white !important;
}

.ing-on-card-button.ast-onsale-card {
    opacity: 1;
    visibility: visible;
}

.ing-onsale-card {
    color: var(--clevers-secondary);
    border-color: var(--clevers-primary);
}

.ing-on-card-button {
    position: relative;
    right: 1em;
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s;
    z-index: 5;
    cursor: pointer;
}

.ing-onsale-card {
    position: relative;
    top: 1.5em;
    left: 1.5em;
    color: white;
    background-color: var(--clevers-secondary);
    width: fit-content;
    border-radius: 20px;
    padding: 0.4em 0.8em;
    font-size: .87em;
    font-weight: 500;
    line-height: normal;
    letter-spacing: normal;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.15);
    opacity: 1;
    visibility: visible;
    z-index: 4;
}


@media (max-width: 425px) {
    .clevers-product {
        width: 100% !important;
        padding: 5% !important;
        min-height: 400px !important;
    }

    .clevers-product-carousel {
        max-width: 90%;
        min-width: 90%;
        margin: 0 auto;
    }

    .product-title {
        margin: 0 !important;
        font-size: 14px !important;
    }
}

.clevers-product-carousel.preset-2 .slick-slide {
    padding: 12px;
}

.clevers-product-carousel.preset-2 .clevers-product.card-2 {
    background: var(--clevers-card-bg);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
    padding: 12px 12px 14px;
    text-align: center;
    min-height: 360px; /* ajusta si quieres */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.clevers-product-carousel.preset-2 .product-media {
    position: relative;
    width: 100%;
}

.clevers-product-carousel.preset-2 .product-thumb img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Badge circular negro con texto amarillo (40%) */
.clevers-product-carousel.preset-2 .clv-badge-round {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: var(--clevers-bubble-background);
    color: var(--clevers-bubble-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}

/* Título en mayúsculas */
.clevers-product-carousel.preset-2 .product-title {
    display: block;
    font-weight: 700;
    font-size: 14px;
    color: var(--clevers-text);
    text-decoration: none;
    margin: 10px 0 4px;
}

/* Precio */
.clevers-product-carousel.preset-2 .price-area {
    font-size: 15px;
}

.clevers-product-carousel.preset-2 .price del {
    color: #888;
    font-weight: 600;
    margin-right: 6px;
}

.clevers-product-carousel.preset-2 .price ins {
    color: var(--clevers-text);
    font-weight: 800;
    text-decoration: none;
}

/* Botón verde */
.clevers-product-carousel.preset-2 .clevers-button {
    background: var(--clevers-primary);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none !important;
    display: inline-block;
    transition: background-color .18s ease;
}

.clevers-product-carousel.preset-2 .clevers-button:hover,
.clevers-product-carousel.preset-2 .clevers-button:focus {
    background: var(--clevers-secondary);
    color: #fff;
}

/* Slide central destacado (requiere centerMode en Slick) */
.clevers-product-carousel.preset-2 .slick-center .clevers-product.card-2 {
    outline: 3px solid var(--clevers-secondary); /* azul como en la imagen */
    outline-offset: 2px;
    transform: translateY(-2px);
    transition: transform .2s ease, outline-color .2s ease;
}

@media (max-width: 480px) {
    .clevers-product-carousel.preset-2 .clevers-product.card-2 {
        min-height: 320px;
    }
}

/* GLOBAL PRESET */

.product-info {
    line-height: 1.15 !important;
}

/* PRESET 3 */
.preset-3-card .button {
    padding: 10px 15px !important;
    background: var(--clevers-button-background) !important;
    text-decoration: none;
    font-size: 14px;
    color: var(--clevers-button-text) !important;
    border-radius: 3px !important;
}

.preset-3-card .product-info {
    margin: -20px 10px 0;
    z-index: 50;
    position: relative;
    background: var(--clevers-secondary);
    border: 1px solid var(--clevers-border);
    padding: 10px;
    text-align: center;
}

.preset-3-card .product-info a {
    text-decoration: none;
    font-size: 14px !important;
}

.preset-3-card .product-info .price-area {
    font-size: 15px !important;
    font-weight: 600;
    margin: 10px 0 !important;
}

.preset-3-card .product-info .price-area ins {
    color: var(--clevers-primary) !important;
    font-weight: 600;
}

.preset-3-card .badge-discount {
    position: absolute;
    right: 20px;
    top: 40px;
    transform: translateY(-50%);
    left: auto;
    background: var(--clevers-bubble-background) !important;
    color: var(--clevers-bubble-text) !important;
    border-radius: 50%;
    width: 35px;
    height: 35px;


    /* Centrado del texto */
    display: flex;
    align-items: center; /* centra verticalmente */
    justify-content: center; /* centra horizontalmente */

    font-weight: bold;
    font-size: 12px;
    text-align: center;
}

.preset-3-card .product-thumb {
    position: relative;
    display: inline-block; /* opcional, pero recomendado */
}

/* PRESET 4 */

/* La card solo se encarga del hover general */
.preset-4-card {
    position: relative;
    transition: transform 0.25s ease;
}

.preset-4-card:hover {
    transform: translateY(-4px); /* sube 4px = ~2mm */
}

/* Contenedor de imagen: aquí anclamos badge + botón */
.preset-4-card .clevers-card-image {
    position: relative;
    overflow: hidden; /* para que el botón no se salga del recuadro de la imagen */
}

/* BOTÓN oculto sobre la imagen */
.preset-4-card .clevers-card-image .button {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    border-radius: 0;
    font-size: 14px;

    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    text-align: center;
    text-decoration: none;

    padding: 5px 15px !important;
    line-height: 35px;

    background: var(--clevers-button-background) !important;
    color: var(--clevers-button-text) !important;

    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
}

/* Mostrar botón al pasar el mouse por la imagen */
.preset-4-card .clevers-card-image:hover .button {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Info del producto abajo como siempre */
.preset-4-card .product-info {
    z-index: 50;
    position: relative;
    padding-right: 10px;
    margin-top: 5px;
}

.preset-4-card .product-info a {
    text-decoration: none;
    font-size: 14px !important;

}

.preset-4-card .product-info .price-area {
    margin: 5px 0 !important;
    font-size: 15px !important;
    font-weight: 600;
}

.preset-4-card .product-info .price-area ins {
    color: var(--clevers-primary) !important;
    font-weight: 600;
}

/* Badge sobre la imagen, anclado al contenedor de imagen */
.preset-4-card .clevers-card-image .badge-discount {
    position: absolute;
    left: 1em;
    top: 2em;
    transform: translateY(-50%);
    background: var(--clevers-bubble-background) !important;
    color: var(--clevers-bubble-text) !important;
    border-radius: 3px;
    padding: 0.4em 0.8em;

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

    font-weight: bold;
    font-size: 12px;
    text-align: center;
}

/* PRESET 1 CUSTOMIZATION */
.preset-1-card .badge-discount {
    background: var(--clevers-bubble-background);
    color: var(--clevers-bubble-text);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.preset-1-card .product-title {
    color: var(--clevers-text);
}

.preset-1-card .price-area ins {
    color: var(--clevers-primary);
    font-weight: bold;
}

.preset-1-card .button {
    background: var(--clevers-button-background);
    color: var(--clevers-button-text);
}

.preset-1-card .button:hover {
    background: var(--clevers-secondary);
}

.clevers_product_carousel-badge-discount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.clevers-product-carousel a:focus-visible,
.clevers-product-carousel button:focus-visible,
.clevers-product-carousel .slick-dots li button:focus-visible,
.clevers-product-carousel .slick-prev:focus-visible,
.clevers-product-carousel .slick-next:focus-visible {
    outline: 2px solid var(--clevers-primary);
    outline-offset: 2px;
}

.preset-4-card .clevers-card-image:focus-within .button {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    .clevers-product-carousel *,
    .clevers-product-carousel *::before,
    .clevers-product-carousel *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
