/**
 * Ciao Product Showcase – style.css v7
 */

.cps-showcase *, .cps-showcase *::before, .cps-showcase *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.cps-showcase {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
}

.cps-bg-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(
        ellipse 75% 70% at 40% 40%,
        color-mix(in srgb, var(--cps-color, #C8145C) 90%, white 10%),
        var(--cps-color, #C8145C) 45%,
        var(--cps-color-dark, #6b0628) 100%
    );
}

.cps-bg-fruit {
    position: absolute;
    right: -4vw;
    top: 50%; /* Overridden by Elementor */
    transform: translateY(-50%);
    z-index: 3;
    pointer-events: none;
}

.cps-bg-fruit__img {
    width: 55vw;
    max-width: 900px;
    height: auto;
    display: block;
    opacity: 0.35;
    filter: blur(18px) saturate(1.3);
    will-change: transform;
}

.cps-marquee {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    overflow: hidden;
    pointer-events: none;
}

.cps-marquee__track {
    display: flex;
    white-space: nowrap;
    animation: cps-marquee 24s linear infinite;
    will-change: transform;
}

.cps-marquee__text {
    display: inline-block;
    font-size: clamp(80px, 14vw, 220px);
    font-weight: 900;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255,255,255,0.45);
    opacity: 0.55;
    padding-right: 5vw;
    user-select: none;
    line-height: 1;
}

.cps-content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cps-content-inner {
    position: relative;
    width: 100%;
    max-width: 1140px;
    height: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.cps-product-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cps-product-bottle {
    position: relative;
    z-index: 12;
    filter: drop-shadow(0 30px 80px rgba(0,0,0,0.4));
    flex-shrink: 0;
}

.cps-product-bottle__img {
    height: 82vh;
    width: auto;
    max-width: 45vw;
    display: block;
    object-fit: contain;
}

.cps-fruit-front {
    position: absolute;
    right: -15%;
    top: 15%;
    z-index: 14;
    filter: drop-shadow(0 16px 40px rgba(0,0,0,0.3));
}

.cps-fruit-front__img {
    width: 20vw;
    max-width: 380px;
    height: auto;
    display: block;
}

.cps-anim-float      { animation: cps-float 5s ease-in-out infinite; will-change: transform; }
.cps-anim-float-fruit { animation: cps-float-fruit 6.5s ease-in-out infinite; will-change: transform; }
.cps-anim-float-bg   { animation: cps-float-bg 16s ease-in-out infinite; }

@keyframes cps-marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes cps-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(calc(-1 * var(--cps-float-amplitude, 12px))); }
}
@keyframes cps-float-fruit {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%       { transform: translateY(-9px) rotate(4deg); }
}
@keyframes cps-float-bg {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50%       { transform: translateY(calc(-50% - 15px)) scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
    .cps-anim-float, .cps-anim-float-fruit, .cps-marquee__track { animation: none !important; }
    .cps-anim-float-bg { animation: none !important; transform: translateY(-50%); }
}

/* Base style for Stock (will be overridden by Elementor controls) */
.cps-stock .stock {
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
    background: rgba(255,255,255,0.12);
    padding: 4px 16px;
    border-radius: 20px;
    display: inline-block;
    backdrop-filter: blur(4px);
    margin: 0;
}

/* Container du CTA */
.cps-cta { 
    z-index: 15; 
    width: 100%; 
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Le form WooCommerce généré par le bouton */
.cps-cta form.cart {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    width: auto;
    max-width: 100%;
    margin: 0;
}

/* Styles for Quantity field if active */
.cps-cta .quantity input.qty {
    height: 50px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.3);
    background: transparent;
    color: white;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    padding: 0 10px;
}

/* STRONG SPECIFICITY FOR CTA BUTTONS */
.cps-cta button.single_add_to_cart_button,
.cps-cta button.button,
.cps-cta .single_add_to_cart_button,
.cps-cta .button {
    width: auto !important; 
    flex: 0 1 auto !important;
    background-color: #fff !important;
    color: var(--cps-color) !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 16px 48px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    box-shadow: 0 4px 28px rgba(0,0,0,0.22) !important;
    display: inline-block !important;
    margin: 0 !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease !important;
}

.cps-cta button.single_add_to_cart_button:hover,
.cps-cta button.button:hover,
.cps-cta .single_add_to_cart_button:hover,
.cps-cta .button:hover {
    box-shadow: 0 10px 40px rgba(0,0,0,0.32) !important;
}

.cps-description {
    z-index: 11;
    color: rgba(255,255,255,0.90);
    font-size: clamp(13px, 1.3vw, 16px);
    line-height: 1.7;
}

/* Base style for Price (will be overridden by Elementor controls) */
.cps-price {
    z-index: 11;
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.cps-price .woocommerce-Price-amount {
    color: #ffffff;
    font-size: clamp(20px, 2.4vw, 32px);
    font-weight: 700;
}

.cps-price del {
    text-decoration: none;
}

.cps-price del .woocommerce-Price-amount {
    color: rgba(255,255,255,0.55);
    font-size: clamp(14px, 1.6vw, 18px);
    font-weight: 400;
    text-decoration: line-through;
}

.cps-price ins {
    text-decoration: none;
}

.cps-price-badge {
    display: inline-block;
    background: #E63946;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 4px 14px;
    border-radius: 20px;
    line-height: 1.6;
}

.cps-showcase .screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px,1px,1px,1px);
    white-space: nowrap;
}

.cps-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9999;
    background: var(--cps-color, #C8145C);
    padding: 12px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
}

.cps-sticky-cta .quantity,
.cps-sticky-cta .qty { display: none !important; }

.cps-sticky-cta button.single_add_to_cart_button,
.cps-sticky-cta button.button,
.cps-sticky-cta .single_add_to_cart_button,
.cps-sticky-cta .button {
    width: 100% !important;
    background-color: #fff !important;
    color: var(--cps-color) !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 14px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    display: block !important;
    text-align: center !important;
}

/* Le bandeau panier mobile n'est plus masqué de force dans l'éditeur :
   l'aperçu responsive d'Elementor redimensionne réellement l'iframe, donc
   la media query ci-dessous suffit à l'afficher/masquer correctement. */

@media (max-width: 1024px) {
    .cps-content-inner { padding: 0 24px; }
    .cps-product-bottle__img { max-width: 60vw !important; }
    .cps-description { max-width: 260px; font-size: 13px; }
    .cps-bg-fruit { right: -8vw; }
}

@media (max-width: 768px) {
    .cps-cta { display: none; }
    .cps-sticky-cta { display: block; }

    .cps-showcase { height: auto; padding-bottom: 80px; }
    .cps-content-inner { padding: 0 16px; justify-content: center; gap: 16px; }

    .cps-product-bottle__img { height: 55vh !important; max-width: 60vw !important; }
    .cps-fruit-front { right: -8vw; top: 8%; }
    .cps-fruit-front__img { width: 32vw !important; }
    .cps-bg-fruit { right: -10vw; }
    .cps-bg-fruit__img { width: 80vw !important; }

    .cps-description {
        position: relative !important;
        left: auto !important; right: auto !important;
        bottom: auto !important;
        transform: none !important;
        max-width: 100% !important;
        padding: 0 0 16px !important;
        text-align: center !important;
        font-size: 14px;
    }

    .cps-marquee__text { font-size: clamp(50px, 16vw, 100px) !important; }
}

@media (max-width: 480px) {
    .cps-product-bottle__img { height: 45vh !important; max-width: 70vw !important; }
    .cps-fruit-front__img { width: 30vw !important; }
}

/* Purge finale des stocks WooCommerce */
.cps-sticky-cta .stock,
.cps-sticky-cta p.stock,
.cps-sticky-cta .in-stock,
.cps-sticky-cta p.in-stock,
.cps-sticky-cta .availability {
    display: none !important; 
}

/* Feedback ajout panier */
.cps-cta .single_add_to_cart_button.cps-added,
.cps-sticky-cta .single_add_to_cart_button.cps-added {
    background-color: #2ecc71 !important;
    color: #fff !important;
    transform: none !important;
}

/* Fix action ajout panier */
.cps-cta .cps-form-cart-wrapper form.cart {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 200px !important;
}

/* Fix forçage largeur thème */
.cps-cta form.cart button.single_add_to_cart_button, 
.cps-cta form.cart button.button {
    width: auto !important;
    min-width: 150px;
}

/* Le widget Produits Combinés génère sa propre grille : on masque l'affichage
   natif par défaut du plugin de coffret (WPC Product Bundles / woosb) partout
   sur la page, y compris s'il est rendu par le thème en dehors du template
   Elementor (contenu WooCommerce classique dupliqué en bas de page). */
body.single-product .woosb-table,
body.single-product .woosb_table,
body.single-product table.woosb-items,
body.single-product .woosb-items,
body.single-product .woosb_items,
body.single-product #woosb_items,
body.single-product .woosb-product,
body.single-product .woosb_product,
body.single-product [class*="woosb"],
body.single-product .bundled_items,
body.single-product table.bundled_items,
body.single-product .woocommerce-bundled-items-container,
body.single-product .bundle_form .bundled_items,
body.single-product .bundled_product_summary_wrap,
body.single-product .bundle_data {
    display: none !important;
}

/* Mode de hauteur "Stricte" : la bouteille garde sa hauteur définie,
   la ligne d'info absorbe automatiquement le reste de l'espace disponible
   au lieu d'être coupée. */
.cps-height-strict .cps-content-inner {
    justify-content: flex-start;
}

.cps-height-strict .cps-product-stage {
    flex: 0 0 auto;
}

.cps-height-strict .cps-info-row {
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    overflow: hidden;
}

/* ============================
   Ligne d'info (3 colonnes)
   ============================ */
.cps-info-row {
    position: relative;
    z-index: 11;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-top: 24px;
}

.cps-info-col {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 0;
    gap: 14px;
}

.cps-info-col--left {
    color: rgba(255,255,255,0.9);
}

.cps-info-col--center {
    align-items: center;
    text-align: center;
}

.cps-info-col--right {
    align-items: flex-end;
    text-align: right;
}

@media (max-width: 900px) {
    .cps-info-row { flex-direction: column; align-items: center; }
    .cps-info-col--left,
    .cps-info-col--right { align-items: center; text-align: center; }
}

/* ============================
   Flèches précédent / suivant
   ============================ */
.cps-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.15);
    transition: transform 0.25s ease, background-color 0.25s ease;
    text-decoration: none;
}

.cps-nav-arrow--prev { left: 24px; }
.cps-nav-arrow--next { right: 24px; }

.cps-nav-arrow svg {
    width: 22px;
    height: 22px;
    stroke: #ffffff;
    stroke-width: 2;
    fill: none;
}

.cps-nav-arrow:hover { transform: translateY(-50%) scale(1.08); }

/* ============================
   Flèche de défilement
   ============================ */
.cps-scroll-arrow {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
}

.cps-scroll-arrow svg {
    width: 100%;
    height: 100%;
    stroke: #ffffff;
    stroke-width: 2;
    fill: none;
}

.cps-scroll-arrow--bounce {
    animation: cps-scroll-bounce 1.6s ease-in-out infinite;
}

.cps-scroll-arrow--blink svg {
    animation: cps-scroll-blink 1.6s ease-in-out infinite;
}

@keyframes cps-scroll-bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 10px); }
}

@keyframes cps-scroll-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.25; }
}

/* ============================
   Section Produits combinés
   ============================ */
.cps-bundle-section {
    position: relative;
    padding: 80px 40px;
}

.cps-bundle-section__title {
    text-align: center;
    color: #ffffff;
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 700;
    margin: 0 0 40px;
}

.cps-bundle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.cps-bundle-card {
    display: flex;
    flex-direction: column;
    background-color: rgba(255,255,255,0.06);
    border-radius: 16px;
    overflow: hidden;
}

.cps-bundle-card__image {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    background: rgba(255,255,255,0.04);
    overflow: hidden;
}

.cps-bundle-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.cps-bundle-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    text-align: center;
}

.cps-bundle-card__title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
}

.cps-bundle-card__price {
    color: #ffffff;
    font-size: 15px;
}

.cps-bundle-card__desc {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .cps-bundle-grid { grid-template-columns: 1fr !important; }
    .cps-bundle-section { padding: 48px 20px; }
    .cps-nav-arrow { width: 40px; height: 40px; }
    .cps-nav-arrow svg { width: 16px; height: 16px; }
}