/* =================================================================
   WC Product Slider Pro — Frontend Styles
   ================================================================= */

/* ── Wrapper ─────────────────────────────────────────────────── */
.wcps-wrapper {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    /* Solo padding lateral para las flechas.
       Los dots van en .wcps-dots-holder FUERA de este div. */
    padding: 0 54px;
}

/* dots eliminados */

/* ── Igual altura en todos los slides ───────────────────────── */
/*
 * Slick pone los slides en un track horizontal.
 * display:flex en el track + height:auto en los slides
 * hacen que todas las tarjetas tengan el mismo alto.
 */
.wcps-wrapper .slick-track {
    display: flex !important;
    align-items: stretch;
}

/* ── Slide ───────────────────────────────────────────────────── */
.wcps-slide {
    padding: 0 10px;
    box-sizing: border-box;
    display: flex !important;
    height: auto !important;    /* anula el height inline de Slick */
}

/* ── Card ────────────────────────────────────────────────────── */
.wcps-card {
    position: relative;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .25s ease, transform .25s ease;
    width: 100%;
    flex: 1;                    /* se estira para llenar el slide */
    display: flex;
    flex-direction: column;
}

.wcps-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    transform: translateY(-3px);
}

/* ── Image ───────────────────────────────────────────────────── */
.wcps-img-wrap {
    display: block;
    overflow: hidden;
    background: #f5f5f5;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
}

.wcps-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
    display: block;
}

.wcps-card:hover .wcps-product-img {
    transform: scale(1.05);
}

/* ── Badge oferta ────────────────────────────────────────────── */
.wcps-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    pointer-events: none;
}

.wcps-badge-sale { background: #e63946; color: #fff; }

/* ── Card body ───────────────────────────────────────────────── */
.wcps-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

/* ── Rating ──────────────────────────────────────────────────── */
.wcps-rating .star-rating { font-size: 12px; }

/* ── Title ───────────────────────────────────────────────────── */
.wcps-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
}

.wcps-title a {
    color: #222;
    text-decoration: none;
}

.wcps-title a:hover { color: #7f54b3; }

/* ── Short desc ──────────────────────────────────────────────── */
.wcps-short-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ── Price ───────────────────────────────────────────────────── */
.wcps-price {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    /* sin margin-top:auto aquí; el cart-wrap es quien empuja todo al fondo */
}

.wcps-price del { font-weight: 400; color: #999; font-size: 13px; }
.wcps-price ins { text-decoration: none; color: #e63946; }

/* ── Cart wrap ───────────────────────────────────────────────── */
/* margin-top:auto empuja el botón siempre al fondo de la tarjeta,
   sin importar cuánto contenido tenga cada producto              */
.wcps-cart-wrap { margin-top: auto; padding-top: 12px; }

/* ── Botón ───────────────────────────────────────────────────── */
.wcps-add-to-cart,
.wcps-view-product {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: #7f54b3;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, transform .1s ease;
    text-decoration: none;
    box-sizing: border-box;
    line-height: 1.4;
}

.wcps-add-to-cart:hover,
.wcps-view-product:hover { background: #6a3fa0; transform: translateY(-1px); }

.wcps-add-to-cart:active  { transform: translateY(0); }

.wcps-add-to-cart.wcps-loading {
    opacity: .7;
    cursor: not-allowed;
    pointer-events: none;
}
.wcps-add-to-cart.wcps-added { background: #2ecc71; }
.wcps-add-to-cart.wcps-error  { background: #e74c3c; }

/* ── Toast ───────────────────────────────────────────────────── */
.wcps-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
    background: #333;
    color: #fff;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
    transform: translateY(20px);
    opacity: 0;
    transition: all .3s ease;
    max-width: 320px;
    pointer-events: none;
}
.wcps-toast.wcps-toast-show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.wcps-toast.wcps-toast-success { border-left: 4px solid #2ecc71; }
.wcps-toast.wcps-toast-error   { border-left: 4px solid #e74c3c; }

.wcps-toast-cart-link {
    display: inline-block;
    margin-top: 6px;
    color: #a78be0;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

/* ================================================================
   SLICK OVERRIDES
   Las flechas viven en el padding lateral del wrapper (54px a c/lado).
   Los dots viven en el padding inferior (48px).
   ================================================================ */

/* Contenedor del track — solo él hace overflow:hidden */
.wcps-wrapper .slick-list { overflow: hidden; }

/* ── Flechas ─────────────────────────────────────────────────── */
.wcps-wrapper .slick-prev,
.wcps-wrapper .slick-next {
    z-index: 10;
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    border: 1px solid #e8e8e8;
    box-shadow: 0 3px 14px rgba(0,0,0,.12);
    transition: background .2s, box-shadow .2s, transform .15s;
    /* Centrado vertical respecto al área de slides (sin contar padding-bottom) */
    top: calc( (100% - 48px) / 2 );
    transform: translateY(-50%);
}

.wcps-wrapper .slick-prev { left: 0; }
.wcps-wrapper .slick-next { right: 0; }

.wcps-wrapper .slick-prev:hover,
.wcps-wrapper .slick-next:hover {
    background: #7f54b3;
    border-color: #7f54b3;
    box-shadow: 0 4px 18px rgba(127,84,179,.3);
    transform: translateY(-50%) scale(1.08);
}

.wcps-wrapper .slick-prev:before,
.wcps-wrapper .slick-next:before {
    color: #444;
    font-size: 20px;
    line-height: 1;
    transition: color .2s;
}

.wcps-wrapper .slick-prev:hover:before,
.wcps-wrapper .slick-next:hover:before { color: #fff; }

/* dots eliminados */

/* ── Sin productos ───────────────────────────────────────────── */
.wcps-no-products {
    text-align: center;
    color: #888;
    padding: 30px;
    font-style: italic;
}

/* ── Accesibilidad ───────────────────────────────────────────── */
.wcps-add-to-cart:focus-visible,
.wcps-view-product:focus-visible {
    outline: 3px solid #7f54b3;
    outline-offset: 2px;
}

/* ── Móvil ───────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .wcps-wrapper {
        padding-left: 40px;
        padding-right: 40px;
        /* sin padding-bottom: los dots están en .wcps-dots-holder externo */
    }
    .wcps-wrapper .slick-prev,
    .wcps-wrapper .slick-next {
        width: 36px;
        height: 36px;
    }
    .wcps-wrapper .slick-prev:before,
    .wcps-wrapper .slick-next:before { font-size: 16px; }
}
