/* ============================================================
   Product Gallery Widget — Beps PuroOmega Widgets
   ============================================================ */

/* ── 1. WRAPPER ─────────────────────────────────────────────── */
.beps-pgal-wrap {
    width: 100%;
}

/* ── 2. TARJETA PRINCIPAL ───────────────────────────────────── */

/* Wrapper externo: ancla las flechas fuera del overflow:hidden del main-wrap.
   Esto evita el bug de iOS Safari que clipea position:absolute dentro de
   overflow:hidden + border-radius. */
.beps-pgal-main-outer {
    position: relative;
    display: block;
    width: 725px;
    max-width: 100%;
}

.beps-pgal-main-wrap {
    width: 100%;
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #E5E5E5;
}

.beps-pgal-main {
    display: block;
    width: 100%;
    height: auto !important;
    overflow: hidden;
}

.beps-pgal-main-img {
    display: block;
    width: 100%;
    height: auto;
}

/* ── 3. BADGE DE PROMOCIÓN ──────────────────────────────────── */
.beps-pgal-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    display: inline-block;
    background-color: #141436;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 50px 0px 50px 50px;
    line-height: 1.4;
    z-index: 2;
    pointer-events: none;
    white-space: nowrap;
}

/* ── 4. BOTÓN WISHLIST ──────────────────────────────────────── */
.beps-pgal-wishlist {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 2;
    line-height: 1;
    transition: transform 0.15s ease;
    border: none!important
}

.beps-pgal-wishlist:hover {
    transform: scale(1.15);
    background: none!important;
}

.beps-pgal-wishlist svg {
    width: 22px;
    height: 22px;
    stroke: #141436;
    fill: none;
    display: block;
    transition: fill 0.2s ease, stroke 0.2s ease;
}

.beps-pgal-wishlist i {
    font-size: 22px;
    color: #141436;
    display: block;
    transition: color 0.2s ease;
}

/* Corazón relleno cuando el producto ya está en la wishlist */
.beps-pgal-wishlist.wl-button-already-in svg {
    fill: #e63946;
    stroke: #e63946;
}

.beps-pgal-wishlist.wl-button-already-in i {
    color: #e63946;
}

/* Estado de carga del botón */
.beps-pgal-wishlist--loading {
    opacity: 0.45;
    pointer-events: none;
}

/* ── Toast de confirmación ──────────────────────────────────── */
#beps-pgal-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: #130F32;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 13px 28px;
    border-radius: 50px;
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 6px 24px rgba(19, 15, 50, 0.22);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

#beps-pgal-toast.beps-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#beps-pgal-toast.beps-toast--error {
    background: #c0392b;
}

/* ── 5. FLECHAS DE NAVEGACIÓN ───────────────────────────────── */
.beps-pgal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.2s ease;
}

.beps-pgal-arrow svg {
    display: block;
    width: 16px;
    height: 16px;
}

/* Flecha anterior */
.beps-pgal-arrow--prev {
    left: 12px;
    border: 1px solid #130F32;
}
.beps-pgal-arrow--prev svg {
    stroke: #130F32;
}

/* Flecha siguiente — estado activo/primario */
.beps-pgal-arrow--next {
    right: 12px;
    border: 1px solid #130F32;
}
.beps-pgal-arrow--next svg {
    stroke: #130F32;
}

/* Flecha atenuada — sin más imágenes en ese lado */
.beps-pgal-arrow.is-dim {
    border-color: #E8E8E8 !important;
    cursor: default;
}
.beps-pgal-arrow.is-dim svg {
    stroke: #E8E8E8 !important;
}

.beps-pgal-wrap--single .beps-pgal-arrow { display: none; }

/* ── 6. FILA DE MINIATURAS ──────────────────────────────────── */
.beps-pgal-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.beps-pgal-thumb {
    display: block;
    width: 168px;
    height: auto!important;
    flex-shrink: 0;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    overflow: hidden;
    background-color: #ffffff;
    cursor: pointer;
    padding: 0!important;
    transition: border-color 0.2s ease;
}

.beps-pgal-thumb--active {
    border: 2px solid #141436;
}

.beps-pgal-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ── 7. RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .beps-pgal-main-outer,
    .beps-pgal-main-wrap {
        width: 100%;
    }

    .beps-pgal-main {
        width: 100%;
    }

    .beps-pgal-thumbs {
        gap: 10px;
        margin-top: 12px;
    }

    .beps-pgal-thumb {
        width: 130px;
        height: 130px;
    }
}

@media (max-width: 767px) {
    .beps-pgal-main-outer {
        width: 100%;
    }

    .beps-pgal-main-wrap {
        width: 100%;
        border: none;
        background-color: transparent;
    }

    .beps-pgal-main {
        width: 100%;
    }

    .beps-pgal-thumbs {
        gap: 8px;
        margin-top: 10px;
    }

    .beps-pgal-thumb {
        width: 100px;
        height: 100px;
    }

    .beps-pgal-arrow {
        width: 32px;
        height: 32px;
    }

    .beps-pgal-arrow svg {
        width: 12px;
        height: 12px;
    }
}
