/**
 * WS Booster - Inertia Gallery (cards premium + drag + parallax)
 */

.ws-ig {
    width: 100%;
    overflow: hidden;
    position: relative;
    cursor: grab;
    user-select: none;
}

.ws-ig.is-dragging {
    cursor: grabbing;
}

.ws-ig__track {
    display: flex;
    gap: 30px;
    padding: 8px 0;
    will-change: transform;
    touch-action: pan-y;
    align-items: center;
}

.ws-ig__item {
    flex: 0 0 300px;
    width: 300px;
    height: 420px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    background: linear-gradient(180deg, #1a1a1a 0%, #000 100%);
}

/* Card sans image : look intentionnel (degrade noir + grain) */
.ws-ig__item:not(:has(.ws-ig__img)) {
    background:
        radial-gradient(circle at 30% 20%, rgba(239,51,64,0.18) 0%, transparent 55%),
        linear-gradient(160deg, #1a1a1a 0%, #000 100%);
}

/* Skins */
.ws-ig-skin-centered .ws-ig__item  { border-radius: 30px 0 30px 0; }
.ws-ig-skin-circle .ws-ig__item    { border-radius: 50%; aspect-ratio: 1/1; height: auto; }
.ws-ig-skin-oval .ws-ig__item      { border-radius: 40%/50%; }
.ws-ig-skin-minimal .ws-ig__item   { border-radius: 0; }
.ws-ig-skin-rounded .ws-ig__item   { border-radius: 20px; }

/* !important neutralise le piege theme WP (img {max-width:100%; height:auto}) */
.ws-ig__img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-height: 100% !important;
    object-fit: cover;
    object-position: center center;
    will-change: transform;
    pointer-events: none;
    backface-visibility: hidden;
    display: block;
}

/* Parallax interne : l'image couvre 120% pour avoir de la marge lateral de mouvement */
.ws-ig--parallax .ws-ig__img {
    width: 120% !important;
    height: 100% !important;
    left: -10% !important;
    top: 0 !important;
}

/* Overlay centree - le JS lui ajoute un translate X+Y additionnel (lag drag horizontal + scroll vertical) */
.ws-ig__overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    pointer-events: none;
    z-index: 10;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    will-change: transform;
    backface-visibility: hidden;
}

.ws-ig__title {
    margin: 0;
    color: #fff;
    text-transform: uppercase;
    font-family: "Times New Roman", serif;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: 0;
    line-height: 1;
    text-align: center;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
}

/* CTA "shop now" */
.ws-ig__cta {
    display: inline-flex;
    align-items: center;
    height: 40px;
    pointer-events: all;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    gap: 15px;
}

.ws-ig__cta-text {
    position: relative;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 500;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
    color: #fff;
    padding: 6px 0;
    overflow: hidden;
    display: block;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.ws-ig__cta:hover .ws-ig__cta-text {
    transform: translateY(-2px);
}

.ws-ig__cta-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    color: #000;
    border-radius: 50%;
    position: relative;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.ws-ig__cta-arrow svg {
    width: 16px;
    height: 5px;
}

.ws-ig__cta:hover .ws-ig__cta-arrow {
    transform: scale(1.05) rotate(-5deg);
}

.ws-ig__hint {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 14px;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    font-size: 12px;
    border-radius: 999px;
    pointer-events: none;
    opacity: 0.85;
    letter-spacing: 0.03em;
    z-index: 5;
}

/* ===== Fleches de navigation ===== */
.ws-ig__nav {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s cubic-bezier(0.65, 0, 0.35, 1), background 0.25s, opacity 0.2s;
    padding: 0;
    opacity: 0.95;
}

.ws-ig__nav:hover {
    transform: translateY(-50%) scale(1.08);
    opacity: 1;
}

.ws-ig__nav:active {
    transform: translateY(-50%) scale(0.95);
}

.ws-ig__nav svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* Position COTES : fleches collees aux bords externes du widget (toujours visibles) */
.ws-ig-arrows-sides .ws-ig {
    overflow: visible;
}

.ws-ig-arrows-sides .ws-ig__nav {
    transform: translateY(-50%);
}
.ws-ig-arrows-sides .ws-ig__nav--prev {
    left: -24px;
}
.ws-ig-arrows-sides .ws-ig__nav--next {
    right: -24px;
}

/* Position CENTRE : superposees au widget (gauche / droite interne) */
.ws-ig-arrows-center .ws-ig__nav {
    transform: translateY(-50%);
}
.ws-ig-arrows-center .ws-ig__nav--prev {
    left: 16px;
}
.ws-ig-arrows-center .ws-ig__nav--next {
    right: 16px;
}

/* Hover state ajuste pour ne pas casser translateY */
.ws-ig-arrows-sides .ws-ig__nav:hover,
.ws-ig-arrows-center .ws-ig__nav:hover {
    transform: translateY(-50%) scale(1.08);
}
.ws-ig-arrows-sides .ws-ig__nav:active,
.ws-ig-arrows-center .ws-ig__nav:active {
    transform: translateY(-50%) scale(0.95);
}

/* Mobile : on rapproche les fleches "sides" pour eviter qu'elles depassent */
@media (max-width: 600px) {
    .ws-ig-arrows-sides .ws-ig__nav--prev { left: 4px; }
    .ws-ig-arrows-sides .ws-ig__nav--next { right: 4px; }
    .ws-ig-arrows-sides .ws-ig { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    .ws-ig__item,
    .ws-ig__cta-text,
    .ws-ig__cta-arrow {
        transition: none;
    }
}
