/**
 * CPM Product Slider - Styles
 * Version: 1.0.0
 * Author: Commpagnie
 */

:root {
    --cpm-jaune: #F7CA39;
    --cpm-bleu-fonce: #2B4678;
    --cpm-noir: #242526;
    --cpm-blanc: #F8F8F8;
    --cpm-blanc-textes: #FAFAFA;
    --cpm-corps-de-texte: #515151;
}

/* ========== MAIN CONTAINER ========== */
.cpm-product-slider-section {
    max-width: 1360px;
    margin: 0 auto;
    background: var(--cpm-blanc);
    border-radius: 42px;
    padding: 50px 60px;
    display: flex;
    align-items: center;
    gap: 60px;
    box-sizing: border-box;
}

.cpm-product-slider-section *,
.cpm-product-slider-section *::before,
.cpm-product-slider-section *::after {
    box-sizing: border-box;
}

/* ========== COLONNE 1 : SLIDER ========== */
.cpm-slider-column {
    display: flex;
    align-items: flex-end;
    gap: 30px;
    flex-shrink: 0;
}

/* Miniatures (prev/next) */
.cpm-side-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.cpm-side-product-image {
    width: 100px;
    height: 100px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.cpm-side-product-image img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.cpm-side-product-name {
    font-size: 13px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    color: var(--cpm-corps-de-texte);
    text-align: center;
    max-width: 120px;
    line-height: 1.3;
}

/* Boutons navigation - Override Elementor */
.cpm-product-slider-section .cpm-nav-button,
.cpm-nav-button.cpm-nav-button {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 50% !important;
    border: none !important;
    border-style: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-size: inherit;
    font-family: inherit;
}

.cpm-product-slider-section .cpm-nav-button:hover,
.cpm-nav-button.cpm-nav-button:hover {
    opacity: 0.85;
    transform: scale(1.05);
    background: transparent !important;
    background-color: transparent !important;
}

.cpm-nav-button svg {
    width: 30px;
    height: 30px;
}

/* Image produit principal (centre) */
.cpm-main-product-image {
    flex-shrink: 0;
}

.cpm-main-product-image img {
    width: 320px;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    box-shadow: 0px 6px 26px rgba(187, 187, 187, 0.25);
    border-radius: 8px;
}

/* ========== COLONNE 2 : INFOS PRODUIT ========== */
.cpm-product-card {
    flex: 1;
    max-width: 630px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header Section */
.cpm-product-header {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cpm-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cpm-flag-badge {
    background: var(--cpm-jaune);
    border-radius: 30px;
    padding: 2px 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 29px;
    flex-shrink: 0;
}

.cpm-flag-badge span {
    color: var(--cpm-noir);
    font-size: 20px;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 700;
    line-height: 26px;
}

.cpm-product-title {
    color: var(--cpm-bleu-fonce);
    font-size: 26px;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 700;
    line-height: 28.6px;
    margin: 0;
    padding: 0;
}

.cpm-separator {
    height: 1px;
    background: var(--cpm-jaune);
    opacity: 0.55;
    width: 100%;
}

/* Badge qualité/prix */
.cpm-quality-badge {
    display: inline-flex;
    padding: 3px 12px;
    background: var(--cpm-jaune);
    border-radius: 30px;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
}

.cpm-quality-badge-text {
    color: var(--cpm-noir);
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    line-height: 17.64px;
}

.cpm-quality-badge-flag {
    color: var(--cpm-noir);
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    line-height: 17.64px;
}

/* Content Section */
.cpm-product-content {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.cpm-product-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Caractéristiques */
.cpm-specifications {
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    line-height: 22.4px;
}

.cpm-specifications .cpm-reference {
    color: var(--cpm-corps-de-texte);
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.cpm-specifications .cpm-features {
    color: var(--cpm-bleu-fonce);
    font-weight: 700;
}

.cpm-specifications .cpm-features p {
    margin: 0;
}

/* Description */
.cpm-description {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    line-height: 20.8px;
    color: var(--cpm-corps-de-texte);
}

.cpm-description p {
    margin: 0;
}

/* CTA Buttons */
.cpm-cta-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cpm-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--cpm-bleu-fonce);
    border-radius: 30px;
    padding: 2px 8px 2px 20px;
    height: 44px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.cpm-cta-button:hover {
    opacity: 0.9;
    text-decoration: none;
}

.cpm-cta-button-text {
    color: var(--cpm-blanc-textes);
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    line-height: 17.64px;
}

.cpm-cta-button-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpm-cta-button-icon svg {
    width: 30px;
    height: 30px;
}

/* Bouton panier - Override Elementor */
.cpm-product-slider-section .cpm-cart-button,
.cpm-cart-button.cpm-cart-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 50% !important;
    border: none !important;
    border-style: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-size: inherit;
    font-family: inherit;
    color: inherit;
}

.cpm-product-slider-section .cpm-cart-button:hover,
.cpm-cart-button.cpm-cart-button:hover {
    opacity: 0.9;
    transform: scale(1.05);
    background: transparent !important;
    background-color: transparent !important;
}

.cpm-cart-button svg {
    width: 44px;
    height: 44px;
}

.cpm-cart-button.cpm-loading {
    opacity: 0.6;
    pointer-events: none;
}

.cpm-cart-button.cpm-added svg path:first-child {
    fill: #4CAF50;
}

/* No products message */
.cpm-slider-no-products {
    text-align: center;
    padding: 40px;
    color: var(--cpm-corps-de-texte);
}

/* ========== RESPONSIVE MOBILE ========== */
@media (max-width: 1100px) {
    .cpm-product-slider-section {
        flex-direction: column;
        padding: 30px 20px 40px;
        gap: 40px;
    }

    .cpm-slider-column {
        width: 100%;
        justify-content: center;
    }

    .cpm-main-product-image img {
        width: 240px;
        max-height: 380px;
    }

    .cpm-side-product-image {
        width: 70px;
        height: 70px;
    }

    .cpm-side-product-name {
        font-size: 11px;
        max-width: 80px;
    }

    .cpm-product-card {
        width: 100%;
        max-width: 100%;
    }

    .cpm-product-title {
        font-size: 22px;
        line-height: 26px;
    }

    .cpm-quality-badge {
        flex-wrap: wrap;
    }

    .cpm-quality-badge-text {
        font-size: 13px;
    }

    .cpm-cta-buttons {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .cpm-product-slider-section {
        padding: 20px 15px 30px;
        border-radius: 28px;
    }

    .cpm-slider-column {
        gap: 15px;
    }

    .cpm-main-product-image img {
        width: 180px;
        max-height: 300px;
    }

    .cpm-side-product-image {
        width: 55px;
        height: 55px;
    }

    .cpm-side-product-name {
        font-size: 10px;
        max-width: 65px;
    }

    .cpm-product-title {
        font-size: 18px;
        line-height: 22px;
    }

    .cpm-flag-badge {
        min-width: 40px;
        height: 26px;
        padding: 2px 10px;
    }

    .cpm-flag-badge span {
        font-size: 16px;
    }

    .cpm-specifications {
        font-size: 14px;
        line-height: 20px;
    }

    .cpm-description {
        font-size: 14px;
        line-height: 19px;
    }
}
