/* ==========================================================================
   Panneau latéral — Panier
   ========================================================================== */

.cart-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(var(--light-pink-rgb), 0.8);
    z-index: 199;
    visibility: hidden;
    pointer-events: none;
}

.cart-panel-overlay.is-open {
    visibility: visible;
    pointer-events: auto;
    cursor: none;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 480px;
    height: 100%;
    background-color: var(--light-pink);
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    border-left: 4px solid white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-panel.is-open {
    transform: translateX(0);
}

.cart-panel-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--brown);
    padding: 0;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    z-index: 1;
}

.cart-panel-close:hover {
    background-color: var(--cream-dark);
}

.cart-panel-close svg {
    width: 20px;
    height: 20px;
}

.cart-panel-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    padding-top: 8rem;
}

.cart-panel-title {
    font-size: 3rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0 4rem 2.5rem;
    flex-shrink: 0;
    margin: 0;
}

/* Wrapper WooCommerce fragments */
.cart-panel .widget_shopping_cart_content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

/* Liste des articles */
.cart-panel .woocommerce-mini-cart,
.woocommerce .cart-panel ul.woocommerce-mini-cart {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    overflow-y: auto;
    padding: 0 4rem;
}


.cart-panel .mini_cart_item,
.woocommerce .cart-panel ul.woocommerce-mini-cart li.mini_cart_item {
    position: relative;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}

.cart-panel .mini_cart_item:first-child {
    border-top: 1px solid var(--border);
}

/* Lien image + nom du produit */
.cart-panel .mini_cart_item > a:not(.remove_from_cart_button) {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    text-decoration: none;
    flex: 1;
    padding-right: 2rem;
}

.cart-panel .mini_cart_item > a:not(.remove_from_cart_button):hover {
    color: var(--blue);
}

/* Quantité × prix */
.cart-panel .mini_cart_item .quantity {
    display: block;
    font-size: 1.15rem;
    color: var(--brown);
    margin-top: 0.4rem;
}

/* Bouton supprimer l'article */
.cart-panel .mini_cart_item .remove_from_cart_button {
    position: absolute;
    top: 0.7rem;
    right: 0.6rem;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--brown);
    text-decoration: none;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    background-color: transparent;
    border: none;
}

.cart-panel .mini_cart_item .remove_from_cart_button svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.cart-panel .mini_cart_item .remove_from_cart_button:hover {
    background-color: var(--cream-dark);
    cursor: pointer;
}

/* Message panier vide */
.cart-panel .woocommerce-mini-cart__empty-message {
    padding: 0 4rem;
    font-size: 1.25rem;
    text-transform: uppercase;
    font-weight: 500;
}

/* Total */
.cart-panel .woocommerce-mini-cart__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    font-size: 1.4rem;
    font-weight: 500;
    text-transform: uppercase;
    flex-shrink: 0;
    margin: 2rem 4rem 0;
}

.cart-panel .woocommerce-mini-cart__total strong {
    font-weight: 500;
}

/* Boutons panier / commander */
.cart-panel .woocommerce-mini-cart__buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem 4rem 4rem;
    flex-shrink: 0;
    margin: 0;
}

.cart-panel .woocommerce-mini-cart__buttons .button {
    display: block;
    width: 100%;
    padding: 1.4rem 2rem;
    text-align: center;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
    box-sizing: border-box;
    border: none;
}

.cart-panel .woocommerce-mini-cart__buttons .wc-forward:not(.checkout) {
    background-color: white;
    color: var(--deep-blue);
    border: 1.5px solid var(--border);
}

.cart-panel .woocommerce-mini-cart__buttons .wc-forward:not(.checkout):hover {
    background-color: var(--cream-dark);
}

.cart-panel .woocommerce-mini-cart__buttons .checkout {
    background-color: var(--blue);
    color: white;
}

.cart-panel .woocommerce-mini-cart__buttons .checkout:hover {
    background-color: var(--blue-hover);
    color: white;
}

/* Sélecteur de quantité */

.wc-block-cart-item__quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.cart-item-delete-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brown);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: transparent;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
    white-space: nowrap;
    margin-left: 0;
}

.cart-item-delete-btn:hover {
    color: var(--blue);
    text-decoration-color: var(--blue);
}

.wc-block-cart-item__price {
    font-size: 1.2rem;
    font-weight: 600;
}

.wc-block-components-quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    background: white;
    height: 30px;
}

.wc-block-components-quantity-selector__input {
    width: 2rem;
    text-align: center;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-weight: 500;
    font-family: inherit;
    padding: 0;
    background: transparent;
    color: black;
    -moz-appearance: textfield;
    appearance: textfield;
}

.wc-block-components-quantity-selector__input::-webkit-inner-spin-button,
.wc-block-components-quantity-selector__input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wc-block-components-quantity-selector__button--minus span {
    position: relative;
    top: -1px;
}

.wc-block-components-quantity-selector__button {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.wc-block-components-quantity-selector__button:hover:not(:disabled) {
    background-color: var(--cream-dark);
}

.wc-block-components-quantity-selector__button:disabled {
    opacity: 0.3;
    cursor: default;
}

/* État de chargement lors d'une mise à jour de quantité */
.cart-panel .widget_shopping_cart_content {
    transition: opacity 0.2s ease;
}

/* Formulaire coupon */
.wp-block-woocommerce-cart-order-summary-coupon-form-block {
    padding: 2rem 0;
    margin: 0 4rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.margo-coupon-form {
    display: flex;
    gap: 0;
}

.margo-coupon-input {
    flex: 1;
    padding: 1.35rem 1.4rem;
    border: 1px solid var(--border);
    border-right: none;
    background: white;
    color: black;
    font-size: 1.1rem;
    font-family: inherit;
    outline: none;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease;
}

.margo-coupon-input:focus,
.margo-coupon-form:hover .margo-coupon-input {
    border-color: var(--brown);
}

.margo-coupon-input:focus + .margo-coupon-submit,
.margo-coupon-form:hover .margo-coupon-submit {
    background-color: var(--brown);
}

.margo-coupon-input::placeholder {
    color: var(--border);
    text-transform: uppercase;
    font-size: 1.1rem;
}

.margo-coupon-submit {
    padding: 1.1rem 1.8rem;
    background-color: var(--border);
    color: black;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.05rem;
    text-transform: uppercase;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.25s ease;
}

.margo-coupon-submit:hover {
    background-color: var(--brown);
}

/* Coupons appliqués */
.margo-applied-coupons {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.margo-applied-coupon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--border);
}

.margo-applied-coupon__code {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--deep-blue);
}

.margo-applied-coupon__remove {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--brown);
    padding: 0 0.2rem;
    transition: color 0.2s ease;
}

.margo-applied-coupon__remove:hover {
    color: var(--terracotta);
}

/* Notice coupon (succès / erreur) */
.margo-coupon-notice {
    font-size: 1.1rem;
    font-weight: 500;
    padding: 1.8rem 1rem;
    margin-bottom: 1rem;
    display: none;
}

.margo-coupon-notice:not(:empty) {
    display: block;
}

.margo-coupon-notice--success {
    background: #edf7ed;
    border-left: 3px solid #4caf50;
    color: #2e7d32;
}

.margo-coupon-notice--error {
    background: var(--terracotta-light);
    border-left: 3px solid var(--terracotta);
    color: var(--terracotta);
}

.wc-block-cart-item__details-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.wc-block-cart-item__details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-top: 1rem;
}

.cart-panel .mini_cart_item .wc-block-cart-item__details-wrapper img {
    width: 120px;
    height: 150px;
    object-fit: cover;
    flex-shrink: 0;
    float: none; /* neutralise .woocommerce(-page) ul.product_list_widget li img { float:right } */
}

.wc-block-cart-item__name {
    text-transform: uppercase;
    font-weight: 600;
    font-size: 1.8rem;
}

.generic-page-main {
    border-bottom: 4px solid white;
}

.wp-block-woocommerce-empty-cart-block {
	max-width: 100rem;
	margin-inline: auto;
	padding: 10rem 5rem;
	border-right: 4px solid white;
	border-left: 4px solid white;
}

.wc-block-grid__products {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(4, 1fr);
    margin: 0;
}

.generic-page .wc-block-grid__products .wc-block-grid__product {
    max-width: initial;
    display: flex;
    flex-direction: column;
    border: none;
}

.wc-block-grid__product .wc-block-grid__product-title {
    margin: 0 0 6px;
    text-transform: uppercase;
    font-size: 1.8rem;
}

.wc-block-grid__product-add-to-cart.wp-block-button {
    display: none;
}

.wc-block-grid.has-4-columns:not(.alignwide):not(.alignfull) .wc-block-grid__product {
    font-size: 1.05rem;
    font-weight: 500;
}

.wc-block-cart__empty-cart__title.with-empty-cart-icon::before {
	background-color: var(--blue);
}

h2.wc-block-cart__empty-cart__title {
    text-transform: uppercase;
    margin-bottom: 5rem;
}

.generic-page .wp-block-separator.is-style-dots,
.generic-page .wp-block-heading.has-text-align-center + hr + h2 {
    display: none;
}

.wp-block-woocommerce-cart {
	width: 100%;
	max-width: 100rem;
	margin-inline: auto;
	border-right: 4px solid white;
	border-left: 4px solid white;
	padding: 10rem 5rem;
}

table.wc-block-cart-items .wc-block-cart-items__header {
    font-size: 1.25rem
}

.wc-block-cart__main .wc-block-cart-items th {
    padding: 8px 16px 6px 0;
}

.wc-block-cart__main .wc-block-cart-items td {
	border-top: 1px solid var(--border);
	padding: 20px 0 20px 0px;
}

.wc-block-cart__main .wc-block-cart-items td:not(:first-child) {
	padding: 20px 0 20px 10px;
}

.wc-block-cart__main .wc-block-cart-items {
	border-bottom: none;
}

.wc-block-cart-item__total-price-and-sale-badge-wrapper > .price.wc-block-components-product-price {
    font-size: 1.6rem;
    font-weight: 600;
}

table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
  font-size: 1.6rem;
  text-transform: uppercase;
}

.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-image, 
table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-image {
	width: 100px;
}

table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__wrap {
    padding-top: 0.5rem;
}

table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity {
    margin-top: 1rem;
}

.wc-block-components-quantity-selector > .wc-block-components-quantity-selector__button--minus {
	border-radius: 0;
	order: 1;
}

.wc-block-components-quantity-selector > .wc-block-components-quantity-selector__button--plus {
	border-radius: 0;
	order: 3;
}

.wc-block-components-quantity-selector {
	border-radius: 0;
}

table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link {
    width: 18px;
    height: 18px;
}

table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link svg {
    width: 18px;
    height: 18px;
}

.woocommerce-cart .wp-block-woocommerce-cart-order-summary-block .wp-block-woocommerce-cart-order-summary-coupon-form-block {
	padding: 2rem 0;
	margin: 0;
	border-bottom: none;
	flex-shrink: 0;
}

.woocommerce-cart .wp-block-woocommerce-cart-order-summary-block .wc-block-components-totals-wrapper {
	border-top: 1px solid var(--border);
}

.woocommerce-cart .wp-block-woocommerce-cart-order-summary-block .wp-block-woocommerce-cart-order-summary-totals-block {
	border-top: none;
}

.woocommerce-cart .wc-block-cart .wp-block-woocommerce-cart-order-summary-block {
	border-bottom: 1px solid var(--border);
	font-size: 1.25rem;
	line-height: 1.4;
	margin-bottom: 16px;
}

.wc-block-cart__submit.wp-block-woocommerce-proceed-to-checkout-block a {
	margin: 0;
    display: block;
    width: 100%;
    padding: 1.7rem 2rem;
    text-align: center;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.04rem;
    text-transform: uppercase;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
    box-sizing: border-box;
    border: none;
    background-color: var(--blue);
    color: white;
}

.wc-block-cart__submit.wp-block-woocommerce-proceed-to-checkout-block a:hover {
    background-color: var(--blue-hover);
    color: white;
}

.wc-block-components-express-payment-continue-rule::after,
.wc-block-components-express-payment-continue-rule::before {
	border-bottom: 1px solid var(--border);
}

.wc-block-components-express-payment-continue-rule.wc-block-components-express-payment-continue-rule--cart {
    color: var(--text-light);
}

.wp-block-woocommerce-cart-order-summary-subtotal-block.wc-block-components-totals-wrapper {
    padding-bottom: 15px;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__label, 
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: 1.8rem;
	line-height: 1.4;
	text-transform: uppercase;
}

.wc-block-components-totals-wrapper {
	border-top: none;
	padding: 20px 0 16px;
}

button.wc-block-components-button.wp-element-button.wc-block-components-totals-coupon__button {
   	margin: 0;
    display: block;
    width: 100%;
    padding: 1.4rem 2rem;
    text-align: center;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
    box-sizing: border-box;
    border: none;
    background-color: var(--blue);
    color: white; 
}

button.wc-block-components-button.wp-element-button.wc-block-components-totals-coupon__button:hover {
    background-color: var(--blue-hover);
    color: white;
}

.woocommerce-cart .wp-block-woocommerce-cart-order-summary-block #wc-block-components-totals-coupon__input-coupon {
	border-radius: 0;
	border: 1.5px solid var(--border);
	text-transform: uppercase;
    background-color: #fff;
    border: 1.5px solid var(--light-pink-darker);
    border-radius: 0;
    box-sizing: border-box;
    color: black;
    font-family: inherit;
    font-size: inherit;
    font-size: 1.25rem;
    font-style: inherit;
    font-weight: inherit;
    height: 52px;
    max-height: 52px;
    letter-spacing: inherit;
    line-height: inherit;
    line-height: 25px;
    margin: 0;
    min-height: 0;
    padding: 16px 12px;
    text-decoration: inherit;
    text-transform: inherit;
    width: 100%;
}

.woocommerce-cart .wp-block-woocommerce-cart-order-summary-block #wc-block-components-totals-coupon__input-coupon:focus {
    border-color: var(--brown);
    outline: none;
}

.woocommerce-cart .wp-block-woocommerce-cart-order-summary-block #wc-block-components-totals-coupon__input-coupon + label {
	font-size: 1.25rem;
	color: black;
	font-weight: 500;
    padding-left: 4px;
}

.wc-block-components-text-input.wc-block-components-totals-coupon__input.is-active input#wc-block-components-totals-coupon__input-coupon {
    padding: 22px 12px 10px;
}