@import url("https://fonts.googleapis.com/css2?family=Cookie&family=Quicksand:wght@400;500;600;700&display=swap");

/* ============================================================
   CADEAUX PHOTOS
   PRODUITS ASSOCIÉS — 1.0.1
   ============================================================ */

.cp-related-products,
.cp-related-products *,
.cp-related-products *::before,
.cp-related-products *::after {
    box-sizing: border-box;
}

.cp-related-products {
    --cprp-pink: #ed7da4;
    --cprp-pink-dark: #d9618b;
    --cprp-pink-light: #fadadf;
    --cprp-text: #252124;
    --cprp-text-soft: #756c71;
    --cprp-border: #eee3e6;
    --cprp-gap: 10px;
    --cprp-card-width: 240px;
    --cprp-product-title-size: 14px;
    --cprp-product-title-line-height: 1.4;

    /*
     * Full bleed : le hook peut être placé dans un conteneur
     * limité de la fiche produit ou du panier, mais le module
     * s'étend toujours sur toute la largeur du viewport.
     */
    position: relative;
    left: auto;
    right: auto;
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
    padding: 36px 0 40px;
    background: #ffffff;
    color: var(--cprp-text);
    font-family: "Quicksand", Arial, sans-serif;
}

.cp-related-products a {
    color: inherit;
    text-decoration: none;
}

.cp-related-products__container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: clamp(12px, 2.5vw, 48px);
    padding-right: clamp(12px, 2.5vw, 48px);
}

.cp-related-products__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.cp-related-products__title {
    margin: 0;
    color: var(--cprp-text);
    font-family: "Cookie", cursive;
    font-size: clamp(42px, 4vw, 58px);
    font-weight: 400;
    line-height: 1;
}

.cp-related-products__controls {
    display: flex;
    align-items: center;
    gap: 7px;
}

.cp-related-products__arrow {
    display: flex;
    width: 43px;
    height: 43px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd4d7;
    border-radius: 50%;
    background: #ffffff;
    color: var(--cprp-text);
    cursor: pointer;
    transition: color 180ms ease, border-color 180ms ease, background 180ms ease, opacity 180ms ease;
}

.cp-related-products__arrow svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cp-related-products__arrow:hover:not(:disabled) {
    border-color: var(--cprp-pink);
    background: var(--cprp-pink);
    color: #ffffff;
}

.cp-related-products__arrow:disabled {
    opacity: 0.25;
    cursor: default;
}

.cp-related-products__viewport {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.cp-related-products__viewport::-webkit-scrollbar {
    display: none;
}

.cp-related-products__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--cprp-card-width);
    gap: var(--cprp-gap);
    width: max-content;
}

.cp-related-product {
    min-width: 0;
    scroll-snap-align: start;
}

.cp-related-product__image-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.cp-related-product__image-box {
    position: relative;
    display: flex;
    width: 100%;
    aspect-ratio: 1 / 1;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8f6f6;
}

.cp-related-product__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 280ms ease;
}

@media (hover: hover) {
    .cp-related-product:hover .cp-related-product__image {
        transform: scale(1.025);
    }
}

.cp-related-product__discount-badge {
    position: absolute;
    z-index: 2;
    top: 9px;
    left: 9px;
    min-height: 24px;
    padding: 4px 7px;
    border-radius: 4px;
    background: var(--cprp-pink-dark);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
}

.cp-related-product__information {
    padding: 11px 1px 0;
}

.cp-related-product__name {
    display: block;
    width: 100%;
    height: 2.8em;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    color: var(--cprp-text);
    font-size: var(--cprp-product-title-size);
    font-weight: 650;
    line-height: var(--cprp-product-title-line-height);
    letter-spacing: -0.012em;
    text-wrap: pretty;
    overflow-wrap: normal;
    word-break: normal;
}

.cp-related-product__name a {
    color: var(--cprp-text);
    text-decoration: none;
}

.cp-related-product__price-row {
    display: flex;
    min-height: 27px;
    margin-top: 5px;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.cp-related-product__price {
    color: var(--cprp-text);
    font-size: 15px;
    font-weight: 700;
}

.cp-related-product__price--sale {
    color: var(--cprp-pink-dark);
}

.cp-related-product__old-price {
    color: #a49a9d;
    font-size: 11px;
    font-weight: 500;
    text-decoration: line-through;
}

.cp-related-product__button {
    display: flex;
    width: 100%;
    min-height: 38px;
    margin-top: 9px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--cprp-pink);
    border-radius: 5px;
    background: #ffffff;
    color: var(--cprp-pink-dark);
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: color 170ms ease, background 170ms ease, border-color 170ms ease;
}

.cp-related-product__button:hover {
    border-color: var(--cprp-pink-dark);
    background: var(--cprp-pink);
    color: #ffffff;
}

.cp-related-products__progress {
    width: 100%;
    margin-top: 27px;
}

.cp-related-products__progress-track {
    position: relative;
    width: 100%;
    height: 2px;
    overflow: hidden;
    background: #e9e5e6;
}

.cp-related-products__progress-value {
    position: absolute;
    top: 0;
    left: 0;
    width: 25%;
    height: 100%;
    background: var(--cprp-pink-dark);
    transform-origin: left center;
}

@media (max-width: 760px) {
    .cp-related-products {
        --cprp-gap: 7px;
        padding: 27px 0 31px;
    }

    .cp-related-products__container {
        width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }

    .cp-related-products__header {
        gap: 12px;
        margin-bottom: 15px;
    }

    .cp-related-products__title {
        font-size: clamp(37px, 11vw, 46px);
    }

    .cp-related-products__controls {
        gap: 5px;
    }

    .cp-related-products__arrow {
        width: 35px;
        height: 35px;
    }

    .cp-related-products__arrow svg {
        width: 15px;
        height: 15px;
    }

    .cp-related-product__information {
        padding-top: 8px;
    }

    .cp-related-product__name {
        font-weight: 650;
        letter-spacing: -0.018em;
    }

    .cp-related-product__price-row {
        min-height: 23px;
        margin-top: 3px;
    }

    .cp-related-product__price {
        font-size: 13px;
    }

    .cp-related-product__old-price {
        font-size: 9px;
    }

    .cp-related-product__discount-badge {
        top: 6px;
        left: 6px;
        min-height: 20px;
        padding: 3px 5px;
        font-size: 7px;
    }

    .cp-related-product__button {
        min-height: 34px;
        margin-top: 7px;
        font-size: 9px;
    }

    .cp-related-products__progress {
        margin-top: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cp-related-products__viewport {
        scroll-behavior: auto;
    }

    .cp-related-product__image,
    .cp-related-product__button,
    .cp-related-products__arrow {
        transition: none;
    }
}
