/**
 * Golf Addict - Vertical Cards
 * @author  Beekom <https://beekom.fr>
 * @version 1.3.0
 */

/* ── Wrapper ─────────────────────────────────────────────────────── */
.gav-wrapper {
    --gav-accent:   #c0392b;
    --gav-card-bg:  #1a2a1a;
    --gav-text:     #ffffff;
    --gav-gap:      16px;
    --gav-radius:   6px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    -webkit-user-select: none;
    user-select: none;
}

/* ── Track ───────────────────────────────────────────────────────── */
.gav-track-container {
    flex: 1;
    overflow: hidden;
    /* Pas de height fixe — calculée automatiquement par le JS */
    cursor: grab;
    position: relative;
    overscroll-behavior: contain;
}
.gav-track-container.is-dragging { cursor: grabbing; }

.gav-track {
    display: flex;
    flex-direction: column;
    gap: var(--gav-gap);
    transition: transform 0.38s cubic-bezier(.25,.46,.45,.94);
    will-change: transform;
}
.gav-track.no-transition { transition: none !important; }

/* ── Scrollbar ───────────────────────────────────────────────────── */
.gav-scrollbar {
    width: 3px;
    flex-shrink: 0;
    align-self: stretch;
    display: flex;
    align-items: stretch;
}
.gav-scrollbar-track {
    flex: 1;
    background: rgba(255,255,255,0.15);
    border-radius: 99px;
    position: relative;
    overflow: hidden;
}
.gav-scrollbar-thumb {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    background: #c0392b;
    border-radius: 99px;
    transition: top 0.38s cubic-bezier(.25,.46,.45,.94), height 0.2s ease;
    cursor: pointer;
    min-height: 30px;
}

/* ── Cartes ──────────────────────────────────────────────────────── */
.gav-card {
    flex-shrink: 0;
    background: var(--gav-card-bg);
    border-radius: var(--gav-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gav-card.is-active { cursor: default; }
.gav-card:not(.is-active):hover {
    transform: translateX(4px);
    box-shadow: -4px 8px 24px rgba(0,0,0,0.4);
}

/* ── Image ───────────────────────────────────────────────────────── */
.gav-card__img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;   /* défaut — écrasé par Elementor */
    flex-shrink: 0;
    overflow: hidden;
}
.gav-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    -webkit-user-drag: none;
    pointer-events: none;
}
.gav-card:hover .gav-card__img-wrap img { transform: scale(1.04); }

/* ── Corps ───────────────────────────────────────────────────────── */
.gav-card__body {
    padding: 14px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 0;
}

/* Héritage explicite du thème — aucun font-size/family imposé */
.gav-card__title,
.gav-card__desc,
.gav-card__price,
.gav-card__btn {
    font: inherit;
    margin: 0 !important;
    padding: 0;
}

.gav-card__title { color: var(--gav-accent); }
.gav-card__desc  { color: var(--gav-text); opacity: 1; }
.gav-card__price { color: var(--gav-text); opacity: 1; }

/* ── Bouton ──────────────────────────────────────────────────────── */
.gav-card__btn {
    display: inline-block;
    align-self: flex-start;
    margin-top: auto;
    padding: 10px 20px 10px 20px;
    border: 1px solid var(--gav-accent);
    color: var(--gav-accent);
    background: transparent;
    text-decoration: none;
    border-radius: 10px 0 10px 0;
    flex-shrink: 0;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease;
    margin-top: 10px !important;
}
.gav-card__btn:hover {
    background: var(--gav-accent);
    color: #fff;
}

/* ── Responsive ──────────────────────────────────────────────────── */
/* Sur mobile : plus de scroll custom, les cartes s'empilent naturellement */
@media (max-width: 767px) {
    .gav-track-container {
        height: auto !important;
        overflow: visible;
        cursor: default;
    }
    .gav-track {
        transform: none !important;
        transition: none;
    }
    .gav-scrollbar { display: none; }
    .gav-card { cursor: default; }
    .gav-card:not(.is-active):hover { transform: none; box-shadow: none; }
}
