/* =========================================================
   REGULART — Products Carousel
   ========================================================= */

.regulart-pcn {
    --regulart-pcn-gap: 28px;
    --regulart-pcn-visible: 3; /* mis à jour automatiquement par PHP/JS */
    --regulart-pcn-image-ratio: 1 / 1;
    --regulart-pcn-image-bg: #fff;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.regulart-pcn *,
.regulart-pcn *::before,
.regulart-pcn *::after {
    box-sizing: border-box;
}

.regulart-pcn-inner {
    width: 100%;
}

.regulart-pcn-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
}

.regulart-pcn.is-dragging .regulart-pcn-viewport {
    cursor: grabbing;
}

.regulart-pcn.is-dragging .regulart-pcn-track {
    transition: none !important;
}

.regulart-pcn.is-dragging .regulart-pcn-card-link {
    pointer-events: none;
}

.regulart-pcn-track {
    display: flex;
    align-items: stretch;
    gap: var(--regulart-pcn-gap);
    will-change: transform;
    transform: translate3d(0, 0, 0);
    transition: transform 420ms ease;
}

.regulart-pcn-item {
    flex: 0 0 calc(
        (100% - (var(--regulart-pcn-gap) * (var(--regulart-pcn-visible) - 1)))
        / var(--regulart-pcn-visible)
    );
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
}

.regulart-pcn-card {
    height: 100%;
}

.regulart-pcn-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.regulart-pcn-card-link:hover,
.regulart-pcn-card-link:focus {
    color: inherit;
    text-decoration: none;
}

.regulart-pcn-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: var(--regulart-pcn-image-ratio);
    width: 100%;
    background: var(--regulart-pcn-image-bg);
    overflow: hidden;
}

.regulart-pcn-media img,
.regulart-pcn-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: transform 220ms ease;
}

.regulart-pcn-card-link:hover .regulart-pcn-image {
    transform: scale(1.025);
}

.regulart-pcn-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 16px;
    min-height: 104px;
}

.regulart-pcn-artist {
    margin: 0 0 7px;
    color: #666;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.regulart-pcn-title {
    margin: 0 0 10px !important;
    padding: 0 !important;
    color: #222;
    font-size: 15px;
    line-height: 1.18;
    font-weight: 800;
    text-transform: uppercase;
}

.regulart-pcn-shortdesc {
    margin: 0 !important;
    padding: 0 !important;
    color: #777;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 400;
}

.regulart-pcn-price {
    margin-top: 8px;
    color: #777;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 400;
}

.regulart-pcn-price .amount,
.regulart-pcn-price ins,
.regulart-pcn-price del {
    color: inherit;
    font-weight: inherit;
}

.regulart-pcn-price ins {
    text-decoration: none;
}


/* Adaptation automatique quand beaucoup de produits sont visibles */
.regulart-pcn[data-visible-desktop="5"],
.regulart-pcn[data-visible-desktop="6"],
.regulart-pcn[data-visible-desktop="7"],
.regulart-pcn[data-visible-desktop="8"],
.regulart-pcn[data-visible-desktop="9"],
.regulart-pcn[data-visible-desktop="10"],
.regulart-pcn[data-visible-desktop="11"],
.regulart-pcn[data-visible-desktop="12"] {
    --regulart-pcn-gap: clamp(16px, 2vw, 24px);
}

.regulart-pcn[data-visible-desktop="6"] .regulart-pcn-title,
.regulart-pcn[data-visible-desktop="7"] .regulart-pcn-title,
.regulart-pcn[data-visible-desktop="8"] .regulart-pcn-title,
.regulart-pcn[data-visible-desktop="9"] .regulart-pcn-title,
.regulart-pcn[data-visible-desktop="10"] .regulart-pcn-title,
.regulart-pcn[data-visible-desktop="11"] .regulart-pcn-title,
.regulart-pcn[data-visible-desktop="12"] .regulart-pcn-title {
    font-size: 13px;
}

.regulart-pcn[data-visible-desktop="6"] .regulart-pcn-artist,
.regulart-pcn[data-visible-desktop="7"] .regulart-pcn-artist,
.regulart-pcn[data-visible-desktop="8"] .regulart-pcn-artist,
.regulart-pcn[data-visible-desktop="9"] .regulart-pcn-artist,
.regulart-pcn[data-visible-desktop="10"] .regulart-pcn-artist,
.regulart-pcn[data-visible-desktop="11"] .regulart-pcn-artist,
.regulart-pcn[data-visible-desktop="12"] .regulart-pcn-artist {
    font-size: 12px;
}

.regulart-pcn[data-visible-desktop="6"] .regulart-pcn-shortdesc,
.regulart-pcn[data-visible-desktop="7"] .regulart-pcn-shortdesc,
.regulart-pcn[data-visible-desktop="8"] .regulart-pcn-shortdesc,
.regulart-pcn[data-visible-desktop="9"] .regulart-pcn-shortdesc,
.regulart-pcn[data-visible-desktop="10"] .regulart-pcn-shortdesc,
.regulart-pcn[data-visible-desktop="11"] .regulart-pcn-shortdesc,
.regulart-pcn[data-visible-desktop="12"] .regulart-pcn-shortdesc,
.regulart-pcn[data-visible-desktop="6"] .regulart-pcn-price,
.regulart-pcn[data-visible-desktop="7"] .regulart-pcn-price,
.regulart-pcn[data-visible-desktop="8"] .regulart-pcn-price,
.regulart-pcn[data-visible-desktop="9"] .regulart-pcn-price,
.regulart-pcn[data-visible-desktop="10"] .regulart-pcn-price,
.regulart-pcn[data-visible-desktop="11"] .regulart-pcn-price,
.regulart-pcn[data-visible-desktop="12"] .regulart-pcn-price {
    font-size: 12px;
}

/* Navigation */
.regulart-pcn-nav {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 18px;
    margin-top: 24px;
}

.regulart-pcn-dots {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 18px;
}

.regulart-pcn-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px;
    background: currentColor !important;
    color: #bbb;
    opacity: 1;
    cursor: pointer;
    appearance: none;
}

.regulart-pcn-dot.is-active {
    color: #222;
}

.regulart-pcn-arrows {
    display: flex !important;
    align-items: center;
    gap: 8px;
    opacity: 1 !important;
    visibility: visible !important;
}

.regulart-pcn-arrow {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 999px;
    background: #fff;
    color: #222;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    appearance: none;
    opacity: 1 !important;
    visibility: visible !important;
    transition: opacity 180ms ease, transform 180ms ease;
}

.regulart-pcn-arrow span {
    display: block;
    line-height: 1;
    pointer-events: none;
}

.regulart-pcn-arrow:hover {
    transform: translateY(-1px);
}

.regulart-pcn-arrow:disabled {
    opacity: 0.35 !important;
    cursor: default;
    transform: none;
}



/* Neutralisation des styles WooCommerce / Divi parasites */
.regulart-pcn .product,
.regulart-pcn li.product,
.regulart-pcn .et_pb_post {
    float: none !important;
    clear: none !important;
    width: auto !important;
    max-width: none !important;
}

/* Responsive */
@media screen and (max-width: 980px) {
    .regulart-pcn {
        --regulart-pcn-gap: 24px;
    }

    .regulart-pcn-content {
        min-height: 96px;
    }
}

@media screen and (max-width: 560px) {
    .regulart-pcn {
        --regulart-pcn-gap: 20px;
    }

    .regulart-pcn-nav {
        grid-template-columns: 1fr;
    }

    .regulart-pcn-arrows {
        justify-content: flex-end;
    }
}
