/* ==========================================================================
   Product Page Redesign - Bureau 21
   ========================================================================== */

body.single-product main {
    overflow: clip;
}

.product-redesign .product-columns {
    overflow: visible;
}

/* ===== Product banner ===== */
.product-redesign-banner {
    background-color: #C61419;
    padding: 10px 0;
    position: relative;
    z-index: 1029;
    min-height: 63px;
    display: flex;
    align-items: center;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.product-redesign-banner p {
    color: #fff;
    font-size: 2rem;
    font-weight: 400;
    margin: 0;
    text-align: center;
    width: 100%;
}

.product-redesign-banner p span {
    font-weight: 600;
}

/* ===== Override style.css product rules ===== */
.woocommerce .shop-2 div.product.product-redesign .summary .product_title {
    display: block !important;
    font-size: 3.5rem !important;
    font-weight: 700 !important;
    color: #000 !important;
    margin-bottom: 8px !important;
    margin-top: 5px !important;
    line-height: 1.1 !important;
}

.woocommerce .shop-2 div.product.product-redesign .summary .price {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    gap: 12px !important;
    font-size: 2.4rem !important;
    font-weight: 700 !important;
    color: #C61419 !important;
    text-align: left !important;
    margin-bottom: 0 !important;
}

.woocommerce .shop-2 div.product.product-redesign .summary .price.has-sale-price {
    flex-direction: row-reverse !important;
}

.woocommerce .shop-2 div.product.product-redesign .summary .price del {
    font-size: 1.4rem !important;
    color: #C61419 !important;
    font-weight: 400 !important;
    opacity: 0.6;
}

.woocommerce .shop-2 div.product.product-redesign .summary .price ins {
    text-decoration: none !important;
}

.woocommerce .shop-2 div.product.product-redesign .summary .woocommerce-variation-price {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    text-align: left !important;
}

.woocommerce .shop-2 div.product.product-redesign .summary .woocommerce-variation-price .price {
    font-size: 3rem !important;
    text-align: left !important;
}

/* ===== Variations (Format, Type de papier) ===== */

/* Container: flex row, side by side */
.woocommerce .shop-2 div.product.product-redesign form.cart .variations {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    border-top: none !important;
    border-bottom: none !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
}

/* Each variation group */
.woocommerce .shop-2 div.product.product-redesign form.cart .variations > div {
    margin-bottom: 15px;
}

/* Labels */
.woocommerce .shop-2 div.product.product-redesign form.cart .variations label {
    display: block !important;
    font-size: 1.4rem !important;
    font-weight: 500 !important;
    color: #000 !important;
    margin-bottom: 10px !important;
}

/* Dropdown select */
.woocommerce .shop-2 div.product.product-redesign form.cart .variations select {
    padding: 0 35px 0 15px !important;
    border: 1px solid #d0d0d0 !important;
    font-size: 1.4rem !important;
    font-weight: 400 !important;
    color: #333 !important;
    background-color: #fff !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23333' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    min-width: 170px !important;
    height: 58px !important;
    cursor: pointer;
}

/* Papier swatches */
.woocommerce form.cart .papier-swatches {
    display: flex !important;
    flex-direction: row !important;
    gap: 16px;
    align-items: stretch;
}

.woocommerce form.cart .papier-swatches select,
.woocommerce form.cart select#pa_supports {
    display: none !important;
}

.woocommerce form.cart .papier-swatch {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 10px;
    padding: 8px 20px 8px 10px;
    border: 1px solid #d0d0d0;
    cursor: pointer;
    transition: border-color 0.2s;
    background: #fff;
    min-width: 150px;
}

.woocommerce form.cart .papier-swatch:hover {
    border-color: #999;
}

.woocommerce form.cart .papier-swatch.selected {
    border: 2px solid #C61419;
    padding: 7px 19px 7px 9px;
}

.woocommerce form.cart .papier-swatch img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.woocommerce form.cart .papier-swatch span {
    font-size: 1.4rem;
    font-weight: 500;
    color: #222;
}

/* Variations côte à côte */
.woocommerce form.cart .variations.d-flex {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
}

/* Hide reset variations link */
.woocommerce .shop-2 div.product.product-redesign form.cart .efface-variation {
    display: none !important;
}

/* Reset old variations_button styling */
.woocommerce .shop-2 div.product.product-redesign form.cart .variations_button {
    margin-top: 0 !important;
    border: none !important;
    background-color: transparent !important;
    position: static !important;
}

.woocommerce .shop-2 div.product.product-redesign form.cart .variations_button .quantity {
    float: none !important;
    position: static !important;
}

/* Variation price (affiché quand un format est sélectionné) */
.woocommerce .shop-2 div.product.product-redesign .single_variation_wrap .woocommerce-variation-price {
    margin-bottom: 10px;
}

/* Hide variation availability text */
.woocommerce .shop-2 div.product.product-redesign .single_variation_wrap .woocommerce-variation-availability {
    display: none !important;
}

/* ===== Hide old breadcrumb container (now inside summary) ===== */
.breadc-product {
    display: none;
}

/* ===== Summary top bar: breadcrumb + wishlist ===== */
.product-summary-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.product-summary-breadcrumb #breadcrumbs {
    font-size: 1rem;
    color: #555;
    margin: 0;
}

.product-summary-breadcrumb #breadcrumbs a {
    color: #555;
    text-decoration: none;
}

.product-summary-breadcrumb .breadcrumb_last {
    color: #C61419;
}

/* ===== Two-column layout ===== */
.product-redesign .product-columns {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.product-redesign .product-col-gallery {
    flex: 0 0 65%;
    max-width: 100%;
    min-width: 0;
    position: relative;
    margin-left: calc(-1 * (50vw - 50%));
    padding-right: 0;
    margin-top: 4rem;
}

.product-redesign .product-col-summary {
    flex: 1;
    min-width: 0;
    align-self: flex-start;
}

/* Force gallery full width in its column */
.product-redesign .product-col-gallery .woocommerce-product-gallery {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    position: relative;
    margin-bottom: 0 !important;
}

.product-redesign .product-col-gallery .woocommerce-product-gallery img {
    width: 100%;
    height: auto;
}

/* ===== Gallery grid pattern ===== */
.b21-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;    
}

.b21-gallery__item--full img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
    cursor: none;
}

.b21-gallery__row {
    display: flex;
    gap: 15px;
}

.b21-gallery__item--half {
    flex: 1;
    min-width: 0;
}

.b21-gallery__item--half img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.product-redesign .summary-sticky-wrapper {
    will-change: transform;
    position: sticky;
    top: 100px;}

.product-redesign .product-col-summary .summary {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin-top: 40px;
}

/* ===== Wishlist top-right ===== */
.product-redesign .product-wishlist-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 5px;
}

.product-redesign .product-wishlist-top .tinv-wishlist {
    margin: 0 !important;
}

.product-redesign .product-wishlist-top .tinv-wishlist .tinvwl_add_to_wishlist_button {
    background: rgba(198, 20, 25, 0.07) !important;
    border: 3px solid #C61419 !important;
    border-radius: 50% !important;
    width: 56px !important;
    height: 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
}

.product-redesign .product-wishlist-top .tinv-wishlist .tinvwl_add_to_wishlist_button:hover {
    border-color: #C61419 !important;
    background: rgba(198, 20, 25, 0.12) !important;
}

.product-redesign .product-wishlist-top .tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-icon-heart-plus.no-txt::before,
.product-redesign .product-wishlist-top .tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-icon-heart.no-txt::before,
.product-redesign .product-wishlist-top .tinv-wishlist .tinvwl_add_to_wishlist_button::before {
    color: #C61419 !important;
    font-size: 4rem !important;
    margin: 0 !important;
    margin-top: 0 !important;
    position: static !important;
    line-height: 1 !important;
}

/* ===== Artist name ===== */
.product-redesign .product-artiste {
    font-size: 1.5rem;
    font-weight: 300;
    color: #333;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    margin-top: 0;
}
.product-redesign .product-artiste a {
    color: inherit;
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 1px;
    transition: background-size 0.3s ease;
}
.product-redesign .product-artiste a:hover {
    background-size: 100% 1px;
}

/* ===== Price row: price + badge on same line ===== */
.product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.preorder-discount-badge {
    display: inline-block;
    background-color: #C61419;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 3px;
    white-space: nowrap;
}

/* ===== Price block: total price + unit price side by side ===== */
.price-block {
    display: flex;
    align-items: center;
    gap: 20px;
}

.unit-price-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    white-space: nowrap;
}

.unit-price-label .unit-price-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: #000;
}

/* Override old variations borders from style.css */
.woocommerce .shop-2 div.product.product-redesign form.cart .variations,
.woocommerce .shop-2 div.product.product-redesign form.cart .simple-cart {
    border: none !important;
}

/* ===== Add to cart row ===== */
.product-add-to-cart-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-top: 15px;
    margin-bottom: 25px;
}

/* Custom quantity selector */
.product-quantity-selector {
    display: flex;
    align-items: center;
    background-color: #8B0A0D;
    flex-shrink: 0;
}

.product-quantity-selector .qty-btn {
    width: 55px;
    height: 58px;
    border: none;
    background: none;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background-color 0.2s;
    line-height: 1;
    padding: 0;
}

.product-quantity-selector .qty-btn:hover {
    background-color: #8B0A0D;
}

/* Hide QIB plugin buttons inside our custom selector */
.product-quantity-selector .qib-container {
    display: flex !important;
    align-items: center;
}

.product-quantity-selector .qib-button {
    display: none !important;
}

.product-quantity-selector .quantity {
    float: none !important;
    position: static !important;
    margin: 0 !important;
    border: none !important;
}

.product-quantity-selector .quantity input.qty {
    width: 40px !important;
    height: 58px !important;
    text-align: center !important;
    border: none !important;
    font-size: 1.6rem !important;
    font-weight: 600 !important;
    -moz-appearance: textfield;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #fff !important;
}

.product-quantity-selector .quantity input.qty::-webkit-outer-spin-button,
.product-quantity-selector .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    display: none !important;
    margin: 0;
}

/* Add to cart button */
.product-add-to-cart-row .woocommerce-variation-add-to-cart,
.product-add-to-cart-row .product-add-to-cart-btn {
    flex: 1;
}

.product-add-to-cart-row .single_add_to_cart_button {
    width: 100% !important;
    height: 58px !important;
    background-color: #C61419 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    transition: filter 0.3s ease;
    padding: 0 30px !important;
    position: static !important;
    top: auto !important;
    float: none !important;
}

/* Kill any pseudo-element icon from WooCommerce or plugins */
.product-add-to-cart-row .single_add_to_cart_button::before,
.product-add-to-cart-row .single_add_to_cart_button::after {
    display: none !important;
    content: none !important;
}

.product-add-to-cart-row .single_add_to_cart_button .cart-btn-icon {
    width: 18px;
    height: 21px;
    flex-shrink: 0;
}

.product-add-to-cart-row .single_add_to_cart_button:hover,
.woocommerce .shop-2 div.product.product-type-simple .product-add-to-cart-row .single_add_to_cart_button:hover,
.woocommerce .shop-2 div.product form.cart .product-add-to-cart-row .variations_button:hover button {
    background-color: #C61419 !important;
    color: #fff !important;
    filter: brightness(0.85) !important;
}

/* Override old hover animations from style.css */
.woocommerce .shop-2 div.product form.cart .product-add-to-cart-row .variations_button:hover button .txt {
    transform: none !important;
    color: #fff !important;
    opacity: 1 !important;
}

.woocommerce .shop-2 div.product form.cart .product-add-to-cart-row .variations_button:hover button .picto {
    transform: none !important;
    color: #fff !important;
}

.product-add-to-cart-row .single_add_to_cart_button:disabled,
.product-add-to-cart-row .single_add_to_cart_button.disabled {
    background-color: #C61419 !important;
    opacity: 1 !important;
}

.product-add-to-cart-row .single_add_to_cart_button .picto img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.product-add-to-cart-row .single_add_to_cart_button .txt {
    transform: none !important;
    opacity: 1 !important;
}

/* Hide "view cart" after add */
.product-add-to-cart-row .variations_button .added_to_cart {
    display: none !important;
}

/* Override old simple product styles */

.woocommerce .shop-2 div.product.product-redesign .simplecart {
    display: block !important;
}

.woocommerce .shop-2 div.product.product-redesign .simplecart .contact-vendeur,
.woocommerce .shop-2 div.product.product-redesign .simplecart .wish {
    display: none !important;
}

.woocommerce .shop-2 div.product.product-redesign form.cart .simple-cart {
    border: none !important;
}

/* Hide "Formats" label text from variable.php */
.woocommerce .shop-2 div.product.product-redesign form.cart .variations .quantite {
    display: none !important;
}

/* ===== Accordions ===== */
.product-accordions {
    border-top: 1px solid #ddd;
    margin-top: 25px;
}

.product-accordions .accordion {
    border-bottom: 1px solid #ddd;
}

.product-accordions .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #000;
    text-align: left;
}

.product-accordions .header:hover {
    color: #C61419;
}

.product-accordions .icon {
    position: relative;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.product-accordions .icon::before,
.product-accordions .icon::after {
    content: '';
    position: absolute;
    background-color: #000;
    transition: transform 0.3s;
}

.product-accordions .icon::before {
    top: 50%;
    left: 0;
    width: 16px;
    height: 2px;
    transform: translateY(-50%);
}

.product-accordions .icon::after {
    top: 0;
    left: 50%;
    width: 2px;
    height: 16px;
    transform: translateX(-50%);
}

.product-accordions .accordion.is-open .icon::after {
    transform: translateX(-50%) rotate(90deg);
}

.product-accordions .content {
    padding: 0 0 20px;
    font-size: 1.4rem;
    line-height: 1.7;
    color: #333;
}

.product-accordions .content p {
    margin-bottom: 10px;
}

.product-accordions .content a {
    color: #C61419;
    text-decoration: none;
}

.product-accordions .content a:hover {
    text-decoration: underline;
}

/* ===== Preorder badge overlay on image ===== */
.product-col-gallery {
    position: relative;
}

.preorder-badge-overlay {
    position: absolute;
    top: 20px;
    left: 0;
    z-index: 10;
    background-color: #C61419;
    color: #fff;
    padding: 12px 22px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    text-transform: uppercase;
    line-height: normal;
    display: flex;
    align-items: center;
    gap: 10px;
}

.preorder-badge-overlay .preorder-badge-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

/* ===== Gallery thumbnails (legacy FlexSlider — conservé pour compatibilité) ===== */
/*
.product-redesign .flex-control-thumbs { ... }
Remplacé par .b21-gallery (voir section "Gallery grid pattern" ci-dessus)
*/

/* ===== Hide elements not in mockup ===== */
.product-redesign .product_meta {
    display: none !important;
}

/* Hide short description if empty or redundant */
.product-redesign .woocommerce-product-details__short-description {
    font-size: 1.4rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 0;
}

/* ===== Description contact link ===== */
.product-desc-contact-link {
    margin-top: 15px;
}

.product-desc-contact-link a {
    color: #C61419;
    text-decoration: none;
    font-weight: 600;
}

.product-desc-contact-link a:hover {
    text-decoration: underline;
}

/* ===== Contact box ===== */
#product-contact-box {
    margin-left: calc(55% + 40px);
    margin-top: 80px;
    border: 2px solid #C61419;
    padding: 25px 30px;
}

#product-contact-box .contact-box-title {
    font-size: 2rem;
    font-weight: 600;
    color: #C61419;
    margin: 0 0 10px;
    line-height: 1.3;
}

#product-contact-box p {
    font-size: 1.4rem;
    color: #333;
    margin: 0 0 15px;
    line-height: 1.6;
}

#product-contact-box .info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 12px;
}

#product-contact-box .item {
    display: flex;
    align-items: center;
    gap: 8px;
}

#product-contact-box .item img,
#product-contact-box .hours img {
    width: 19px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

#product-contact-box .item a {
    font-size: 1.3rem;
    color: #333;
    text-decoration: none;
}

#product-contact-box .item a:hover {
    color: #C61419;
}

#product-contact-box .hours {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    color: #333;
}

.b21_spacer {
    margin-top: 80px;
}

/* ===== Responsive ===== */
@media screen and (max-width: 991px) {
    .product-redesign .product-columns {
        flex-direction: column-reverse;
    }

    .product-redesign .product-col-gallery {
        flex: none;
        width: calc(100% + 30px);
        max-width: none;
        margin-left: -15px;
        margin-right: -15px;
        margin-top: 0;
    }

    .product-redesign .product-col-summary {
        width: 100%;
    }

    .product-add-to-cart-row {
        flex-direction: column;
        gap: 10px;
    }

    .product-quantity-selector {
        justify-content: center;
    }

    #product-contact-box {
        margin-left: 0;
        margin-top: 25px;
    }

    .product-summary-breadcrumb {
        display: none;
    }

    .product-summary-topbar {
        justify-content: flex-end;
    }

    .product-redesign .summary-sticky-wrapper {
        position: static;
    }

    .product-redesign .product-col-summary .summary {
        margin-top: 0;
    }

    .product-col-gallery {
        position: relative;
    }

    .product-breadcrumb-mobile {
        display: block;
        padding: 20px 15px 0;
    }

    .product-breadcrumb-mobile #breadcrumbs {
        font-size: 1rem;
        color: #555;
        margin-bottom: 15px;
    }

    .product-breadcrumb-mobile #breadcrumbs a {
        color: #555;
        text-decoration: none;
    }

    .product-breadcrumb-mobile .breadcrumb_last {
        color: #C61419;
    }

    .b21-gallery__row {
        flex-direction: column;
    }
}

/* Desktop: hide mobile breadcrumb */
@media screen and (min-width: 992px) {
    .product-breadcrumb-mobile {
        display: none;
    }
}
