/* Page News — cartes pleine largeur (styles legacy autonomes, shop.css refactorisé) */

body.page-news .shop_content {
    overflow: visible;
    max-height: none;
}

.news-page-home {
    width: 100%;
    padding-top: clamp(1.5rem, 3vw, 2.5rem);
    padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.news-grid.community_shop_grid {
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 3vw + 14px, 36px);
    width: 100%;
    padding-top: 0;
    padding-bottom: 0;
    grid-template-columns: unset;
    overflow: visible;
}

.news-grid .news-update-card {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    flex-shrink: 0;
}

/* Base cartes (anciennement dans shop.css) */
.news-grid .community_shop_tendances_product_1 {
    --news-media-slot: clamp(200px, 30vw, 300px);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-height: 320px;
    height: 320px;
    border-radius: 30px;
    overflow: hidden;
    background: #ffffff !important;
    border: 3px solid #d4d0df !important;
    box-shadow: 0 4px 12px rgba(35, 28, 65, 0.1) !important;
}

/* Annule les dégradés boutique (color_*_full) — fond blanc uniquement sur News */
.news-grid .community_shop_tendances_product_1[class*="color_"] {
    background: #ffffff !important;
    border: 3px solid #d4d0df !important;
    box-shadow: 0 4px 12px rgba(35, 28, 65, 0.1) !important;
}

.news-grid .community_shop_tendances_product_text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    flex: 1;
    z-index: 1;
}

.news-grid .shop_tendances_product1 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Date en rose accent */
.news-card__date {
    margin: 0 0 0.35rem;
    color: var(--accent, #FA25B7);
    letter-spacing: 0.02em;
}

/* Description : toute la largeur jusqu’à l’image */
.news-card__description {
    margin: 0;
    max-width: none;
    width: 100%;
    line-height: 1.5;
}

.news-card__description strong {
    font-weight: 700;
}

.news-grid .community_shop_tendances_product_text {
    padding-left: 6%;
    padding-right: calc(var(--news-media-slot) + 1rem);
    gap: 0.25rem;
    box-sizing: border-box;
    min-width: 0;
}

@media (min-width: 1024px) {
    .news-grid .community_shop_tendances_product_text {
        padding-left: clamp(1.25rem, 2.5vw, 2rem);
    }
}

/* Boutons CTA */
.news-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 0.65rem;
}

a.news-card__cta.save-settings-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-top: 0;
    text-align: center;
    min-width: 0;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 100px;
}

a.news-card__cta--learn-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 100px;
    color: #4a4560;
    background: #e8e6ed;
    border: 1px solid #d4d0df;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

a.news-card__cta--learn-more:hover {
    background: #d4d0df;
    border-color: #c4c0cf;
    color: #352f4a;
}

/* Image collée au bord droit, à l’intérieur de la carte */
.news-card__image-wrap.community_shop_tendances_product_image {
    position: absolute;
    left: auto;
    right: 0;
    top: 0;
    bottom: 0;
    transform: none;
    width: var(--news-media-slot);
    height: 100%;
    z-index: 2;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: transparent;
    box-sizing: border-box;
}

.news-card__image-wrap .news-card__image {
    display: block;
    height: 92%;
    max-height: 300px;
    width: auto;
    max-width: 100%;
    margin: 0;
    object-fit: contain;
    object-position: right center;
    background: transparent;
}

@media (max-width: 880px) {
    .news-grid .news-update-card.community_shop_product {
        height: auto;
        min-height: 0;
    }

    .news-grid .community_shop_tendances_product_1 {
        --news-media-slot: clamp(180px, 34vw, 260px);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        height: auto;
        min-height: 0;
        width: 100%;
        max-width: 100%;
        padding-bottom: 1rem;
        border-radius: 30px;
        overflow: hidden;
    }

    .news-grid .community_shop_tendances_product_text {
        position: relative;
        z-index: 1;
        flex: 0 0 auto;
        width: 100%;
        padding-left: 6%;
        padding-right: 6%;
    }

    .news-card__image-wrap.community_shop_tendances_product_image {
        position: relative;
        right: auto;
        top: auto;
        bottom: auto;
        left: auto;
        order: 2;
        width: 100%;
        height: auto;
        margin-top: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 6% 0.75rem;
        box-sizing: border-box;
    }

    /* Annule les tailles fixes boutique (320×320) qui cassent le layout news */
    .news-grid .news-card__image-wrap.community_shop_tendances_product_image,
    .news-grid .news-card__image-wrap .news-card__image {
        width: auto;
        height: auto;
        max-height: 220px;
        margin-right: 0;
        object-position: center center;
    }

    a.news-card__cta.save-settings-btn,
    a.news-card__cta--learn-more {
        padding: 7px 14px;
        font-size: 0.8125rem;
    }
}

@media (max-width: 500px) {
    .news-grid .news-update-card.community_shop_product {
        height: auto;
        min-height: 0;
    }

    .news-grid .news-card__image-wrap.community_shop_tendances_product_image,
    .news-grid .news-card__image-wrap .news-card__image {
        width: auto;
        height: auto;
        max-height: 200px;
        margin-right: 0;
    }

    .news-page-home {
        padding-bottom: clamp(3rem, 8vw, 4.5rem);
    }
}
