/* ── Vediteis Product Carousel ── */

.vpc-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* ── Track ── */
.vpc-track-wrapper {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.vpc-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* ── Item ── */
.vpc-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    /* width calculée par JS selon data-visible et data-gap */
    align-self: flex-start; /* empêche le stretch qui déformerait l'arche */
}

/* ── Arch ── */
.vpc-arch {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 140%; /* portrait — hauteur = 140% de la largeur */
    border: 3px solid var(--arch-color, #ccc);
    border-radius: 50% 50% 0 0 / 40% 40% 0 0;
    box-sizing: border-box;
    background: #fff;
    overflow: hidden;
    flex-shrink: 0;
}

.vpc-arch img {
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: 0; /* neutralise le border-radius appliqué par le thème/WooCommerce */
}

/* Image paysage : contain pour que les coins ne dépassent pas l'arche → pas de clip, pas d'arrondi */
.vpc-arch--landscape img {
    object-fit: contain;
    object-position: center center;
}

/* ── Meta ── */
.vpc-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-align: center;
    padding: 0 4px;
    /* Hauteur fixe : 1 ligne catégorie + 2 lignes nom max — overflow masqué */
    height: 5em;
    overflow: hidden;
    flex-shrink: 0;
}

.vpc-category {
    font-size: 1.05em;
    color: #666;
    line-height: 1.3;
    /* Tronquer à 1 ligne */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
}

.vpc-name {
    font-size: 1.25em;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
    /* Tronquer à 2 lignes */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
}

/* ── Navigation ── */
.vpc-nav {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, box-shadow 0.2s;
    padding: 0;
    color: #333;
    z-index: 2;
}

.vpc-nav:hover {
    background: #f5f5f5;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.vpc-nav:disabled {
    opacity: 0.35;
    cursor: default;
    box-shadow: none;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .vpc-nav {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }
}

@media (max-width: 767px) {
    .vpc-carousel {
        gap: 4px;
    }

    .vpc-nav {
        width: 26px;
        height: 26px;
        font-size: 10px;
        flex-shrink: 0;
    }

    .vpc-item {
        gap: 6px;
    }

    .vpc-meta {
        height: 4.5em;
        gap: 2px;
    }

    .vpc-category {
        font-size: 0.95em;
    }

    .vpc-name {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .vpc-nav {
        width: 22px;
        height: 22px;
        font-size: 9px;
    }
}
