
/* =====================================================================
   Chocolate Sarayi Smart Cross-Sell — Frontend
   Palette: #3B170D #7D4B2E #CBA689 #FAE7CD #FEF9F3 #E6692B
   ===================================================================== */

:root{
  --cs-sc-cart-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E");
}

.cs-smart-cross-sell{
    margin:24px 0;
    padding:20px;
    border:1px solid rgba(214,157,117,.55);
    border-radius:20px;
    background:#FEF9F3;
    box-shadow:0 14px 35px rgba(59,23,13,.055);
    color:#2C1810;
}

.cs-smart-cross-sell__header{
    display:flex;
    justify-content:space-between;
    gap:14px;
    margin-bottom:16px;
}

.cs-smart-cross-sell h3{
    margin:0;
    font-size:20px;
    line-height:1.15;
    color:#3B170D;
    text-transform:uppercase;
    font-weight:900;
    letter-spacing:-.01em;
}

.cs-smart-cross-sell__header p:last-child{
    margin:5px 0 0;
    color:#7D4B2E;
    font-size:13px;
    line-height:1.35;
}

/* Default product + checkout cards */
.cs-smart-cross-sell__grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
}

.cs-smart-cross-sell__card{
    border:1px solid rgba(203,166,137,.45);
    border-radius:16px;
    overflow:hidden;
    background:#fff;
    display:flex;
    flex-direction:column;
    min-height:100%;
    transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.cs-smart-cross-sell__card:hover{
    transform:translateY(-2px);
    border-color:rgba(230,105,43,.55);
    box-shadow:0 14px 30px rgba(59,23,13,.08);
}

.cs-smart-cross-sell__image{
    aspect-ratio:1/1;
    width:100%;
    object-fit:cover;
    background:#F7F1EA;
}

.cs-smart-cross-sell__body{
    padding:12px;
    display:flex;
    flex-direction:column;
    gap:7px;
    flex:1;
}

.cs-smart-cross-sell__name{
    margin:0;
    font-size:13px;
    font-weight:900;
    color:#3B170D;
    line-height:1.25;
    min-height:34px;
    text-transform:uppercase;
}

.cs-smart-cross-sell__price{
    font-weight:900;
    color:#7D4B2E;
    font-size:13px;
}

.cs-smart-cross-sell__actions{
    display:flex;
    gap:8px;
    margin-top:auto;
}

.cs-smart-cross-sell__button,
.cs-smart-cross-sell__link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:34px;
    border-radius:999px;
    padding:8px 12px;
    font-size:12px;
    line-height:1;
    font-weight:900;
    text-decoration:none!important;
    cursor:pointer;
    transition:background .18s ease,color .18s ease,transform .18s ease;
}

.cs-smart-cross-sell__button{
    background:#3B170D;
    color:#fff!important;
    border:1px solid #3B170D;
    flex:1;
}

.cs-smart-cross-sell__button:hover{
    background:#E6692B;
    border-color:#E6692B;
    transform:translateY(-1px);
}

.cs-smart-cross-sell__link{
    color:#3B170D!important;
    border:1px solid rgba(203,166,137,.55);
    background:#fff;
}

.cs-smart-cross-sell__link:hover{
    background:#FAE7CD;
}

/* Checkout: 3 cards */
.woocommerce-checkout .cs-smart-cross-sell__grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
}

/* Product page spacing */
.single-product .cs-smart-cross-sell{
    margin-top:34px;
    margin-bottom:34px;
}

/* Cart: soft compact sidebar/list */
.woocommerce-cart .cs-smart-cross-sell,
.cart .cs-smart-cross-sell,
.cs-smart-cross-sell--cart,
.cs-smart-cross-sell--cart-drawer,
.cs-smart-cross-sell--cart-block{
    margin:18px 0 22px;
    padding:16px;
    border-radius:18px;
    background:linear-gradient(180deg,#FFFCF8 0%,#FEF9F3 100%);
    box-shadow:0 10px 28px rgba(59,23,13,.045);
}

.woocommerce-cart .cs-smart-cross-sell__header,
.cart .cs-smart-cross-sell__header,
.cs-smart-cross-sell--cart .cs-smart-cross-sell__header,
.cs-smart-cross-sell--cart-drawer .cs-smart-cross-sell__header,
.cs-smart-cross-sell--cart-block .cs-smart-cross-sell__header{
    margin-bottom:12px;
}

.woocommerce-cart .cs-smart-cross-sell h3,
.cart .cs-smart-cross-sell h3,
.cs-smart-cross-sell--cart h3,
.cs-smart-cross-sell--cart-drawer h3,
.cs-smart-cross-sell--cart-block h3{
    font-size:16px;
    letter-spacing:0;
}

.woocommerce-cart .cs-smart-cross-sell__header p:last-child,
.cart .cs-smart-cross-sell__header p:last-child,
.cs-smart-cross-sell--cart .cs-smart-cross-sell__header p:last-child,
.cs-smart-cross-sell--cart-drawer .cs-smart-cross-sell__header p:last-child,
.cs-smart-cross-sell--cart-block .cs-smart-cross-sell__header p:last-child{
    font-size:12px;
    max-width:250px;
}

.woocommerce-cart .cs-smart-cross-sell__grid,
.cart .cs-smart-cross-sell__grid,
.cs-smart-cross-sell--cart .cs-smart-cross-sell__grid,
.cs-smart-cross-sell--cart-drawer .cs-smart-cross-sell__grid,
.cs-smart-cross-sell--cart-block .cs-smart-cross-sell__grid{
    display:flex;
    flex-direction:column;
    gap:9px;
}

.woocommerce-cart .cs-smart-cross-sell__card,
.cart .cs-smart-cross-sell__card,
.cs-smart-cross-sell--cart .cs-smart-cross-sell__card,
.cs-smart-cross-sell--cart-drawer .cs-smart-cross-sell__card,
.cs-smart-cross-sell--cart-block .cs-smart-cross-sell__card{
    display:grid;
    grid-template-columns:54px 1fr auto;
    gap:10px;
    align-items:center;
    min-height:auto;
    padding:8px;
    border-radius:14px;
    background:#fff;
    border:1px solid rgba(203,166,137,.35);
    box-shadow:none;
}

.woocommerce-cart .cs-smart-cross-sell__card:hover,
.cart .cs-smart-cross-sell__card:hover,
.cs-smart-cross-sell--cart .cs-smart-cross-sell__card:hover,
.cs-smart-cross-sell--cart-drawer .cs-smart-cross-sell__card:hover,
.cs-smart-cross-sell--cart-block .cs-smart-cross-sell__card:hover{
    transform:none;
    box-shadow:0 8px 18px rgba(59,23,13,.055);
}

.woocommerce-cart .cs-smart-cross-sell__image,
.cart .cs-smart-cross-sell__image,
.cs-smart-cross-sell--cart .cs-smart-cross-sell__image,
.cs-smart-cross-sell--cart-drawer .cs-smart-cross-sell__image,
.cs-smart-cross-sell--cart-block .cs-smart-cross-sell__image{
    width:54px;
    height:54px;
    aspect-ratio:auto;
    border-radius:12px;
    object-fit:cover;
}

.woocommerce-cart .cs-smart-cross-sell__body,
.cart .cs-smart-cross-sell__body,
.cs-smart-cross-sell--cart .cs-smart-cross-sell__body,
.cs-smart-cross-sell--cart-drawer .cs-smart-cross-sell__body,
.cs-smart-cross-sell--cart-block .cs-smart-cross-sell__body{
    display:grid;
    grid-template-columns:1fr auto;
    grid-template-areas:
        "name action"
        "price action";
    gap:3px 10px;
    align-items:center;
    padding:0;
    min-width:0;
}

.woocommerce-cart .cs-smart-cross-sell__name,
.cart .cs-smart-cross-sell__name,
.cs-smart-cross-sell--cart .cs-smart-cross-sell__name,
.cs-smart-cross-sell--cart-drawer .cs-smart-cross-sell__name,
.cs-smart-cross-sell--cart-block .cs-smart-cross-sell__name{
    grid-area:name;
    min-height:0;
    font-size:11.5px;
    line-height:1.2;
    max-height:2.4em;
    overflow:hidden;
    text-transform:uppercase;
}

.woocommerce-cart .cs-smart-cross-sell__price,
.cart .cs-smart-cross-sell__price,
.cs-smart-cross-sell--cart .cs-smart-cross-sell__price,
.cs-smart-cross-sell--cart-drawer .cs-smart-cross-sell__price,
.cs-smart-cross-sell--cart-block .cs-smart-cross-sell__price{
    grid-area:price;
    font-size:11.5px;
    color:#7D4B2E;
}

.woocommerce-cart .cs-smart-cross-sell__actions,
.cart .cs-smart-cross-sell__actions,
.cs-smart-cross-sell--cart .cs-smart-cross-sell__actions,
.cs-smart-cross-sell--cart-drawer .cs-smart-cross-sell__actions,
.cs-smart-cross-sell--cart-block .cs-smart-cross-sell__actions{
    grid-area:action;
    margin:0;
    display:flex;
    align-items:center;
}

.woocommerce-cart .cs-smart-cross-sell__button,
.cart .cs-smart-cross-sell__button,
.cs-smart-cross-sell--cart .cs-smart-cross-sell__button,
.cs-smart-cross-sell--cart-drawer .cs-smart-cross-sell__button,
.cs-smart-cross-sell--cart-block .cs-smart-cross-sell__button{
    min-height:28px;
    padding:7px 12px;
    font-size:11px;
    background:#FAE7CD;
    border-color:#FAE7CD;
    color:#3B170D!important;
    box-shadow:none;
    min-width:72px;
}

.woocommerce-cart .cs-smart-cross-sell__button:hover,
.cart .cs-smart-cross-sell__button:hover,
.cs-smart-cross-sell--cart .cs-smart-cross-sell__button:hover,
.cs-smart-cross-sell--cart-drawer .cs-smart-cross-sell__button:hover,
.cs-smart-cross-sell--cart-block .cs-smart-cross-sell__button:hover{
    background:#E6692B;
    border-color:#E6692B;
    color:#fff!important;
}

.woocommerce-cart .cs-smart-cross-sell__link,
.cart .cs-smart-cross-sell__link,
.cs-smart-cross-sell--cart .cs-smart-cross-sell__link,
.cs-smart-cross-sell--cart-drawer .cs-smart-cross-sell__link,
.cs-smart-cross-sell--cart-block .cs-smart-cross-sell__link{
    display:none!important;
}

.cs-smart-cross-sell__loading,
.cs-smart-cross-sell__empty{
    grid-column:1/-1;
    padding:14px;
    border-radius:12px;
    background:#fff;
    color:#7D4B2E;
    font-size:13px;
}

.cs-smart-cross-sell__toast{
    position:fixed;
    left:50%;
    bottom:24px;
    transform:translateX(-50%);
    background:#3B170D;
    color:#fff;
    padding:11px 15px;
    border-radius:999px;
    z-index:99999;
    box-shadow:0 8px 30px rgba(0,0,0,.18);
    font-size:13px;
    font-weight:800;
}

@media(max-width:1100px){
    .cs-smart-cross-sell__grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
}

@media(max-width:900px){
    .cs-smart-cross-sell__grid,
    .woocommerce-checkout .cs-smart-cross-sell__grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:520px){
    .cs-smart-cross-sell{
        padding:30px;
    }
    .cs-smart-cross-sell__grid,
    .woocommerce-checkout .cs-smart-cross-sell__grid{
        grid-template-columns:1fr;
    }
    .woocommerce-cart .cs-smart-cross-sell__card,
    .cart .cs-smart-cross-sell__card,
    .cs-smart-cross-sell--cart .cs-smart-cross-sell__card,
    .cs-smart-cross-sell--cart-drawer .cs-smart-cross-sell__card,
    .cs-smart-cross-sell--cart-block .cs-smart-cross-sell__card{
        grid-template-columns:48px 1fr;
    }
    .woocommerce-cart .cs-smart-cross-sell__image,
    .cart .cs-smart-cross-sell__image,
    .cs-smart-cross-sell--cart .cs-smart-cross-sell__image,
    .cs-smart-cross-sell--cart-drawer .cs-smart-cross-sell__image,
    .cs-smart-cross-sell--cart-block .cs-smart-cross-sell__image{
        width:48px;
        height:48px;
    }
    .woocommerce-cart .cs-smart-cross-sell__body,
    .cart .cs-smart-cross-sell__body,
    .cs-smart-cross-sell--cart .cs-smart-cross-sell__body,
    .cs-smart-cross-sell--cart-drawer .cs-smart-cross-sell__body,
    .cs-smart-cross-sell--cart-block .cs-smart-cross-sell__body{
        grid-template-columns:1fr;
        grid-template-areas:"name" "price" "action";
    }
    .woocommerce-cart .cs-smart-cross-sell__actions,
    .cart .cs-smart-cross-sell__actions,
    .cs-smart-cross-sell--cart .cs-smart-cross-sell__actions,
    .cs-smart-cross-sell--cart-drawer .cs-smart-cross-sell__actions,
    .cs-smart-cross-sell--cart-block .cs-smart-cross-sell__actions{
        margin-top:4px;
    }
}


/* Rotation fondue */
.cs-smart-cross-sell__card{
    transition:opacity .22s ease, transform .22s ease, box-shadow .18s ease, border-color .18s ease;
}
.cs-smart-cross-sell__card--leaving{
    opacity:0!important;
    transform:translateY(6px)!important;
    pointer-events:none;
}
.cs-smart-cross-sell__button--loading{
    opacity:.75;
    pointer-events:none;
}

.cs-smart-cross-sell--theme-cards .products{
  margin-top:14px!important;
}

/* Mode "theme cards" — aligné comme la section "Produits similaires" native */
.cs-smart-cross-sell--theme-cards{
  margin-top:48px;
  padding-top:20px;
  border-top:1px solid rgba(203,166,137,.25);
}

.cs-smart-cross-sell--theme-cards .cs-smart-cross-sell__header{
  display:block;
  text-align:center;
  margin-bottom:22px;
}

.cs-smart-cross-sell--theme-cards .cs-smart-cross-sell__header h3{
  font-size:26px;
  letter-spacing:0.02em;
}

.cs-smart-cross-sell--theme-cards .cs-smart-cross-sell__header p{
  display:inline-block;
  max-width:560px;
  margin-top:8px !important;
  font-size:14px;
  line-height:1.45;
}

.cs-smart-cross-sell--theme-cards .products{
  margin-top:8px !important;
}

/* Si le thème ajoute son propre titre "Produits similaires" juste après,
   on garde un espace visuel cohérent */
.cs-smart-cross-sell--theme-cards + .related.products,
.cs-smart-cross-sell--theme-cards + .upsells.products{
  margin-top:48px;
}


/* v2.1 — Product theme cards button polish */
.cs-smart-cross-sell--theme-cards .products li.product{
  position:relative!important;
}

.cs-smart-cross-sell--theme-cards .products li.product .button,
.cs-smart-cross-sell--theme-cards .products li.product a.button,
.cs-smart-cross-sell--theme-cards .products li.product .add_to_cart_button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  width:auto!important;
  min-width:118px!important;
  max-width:calc(100% - 32px)!important;
  min-height:42px!important;
  margin:0 16px 18px!important;
  padding:10px 18px!important;
  border-radius:999px!important;
  background:linear-gradient(135deg,#3B170D 0%,#5A2313 100%)!important;
  color:#fff!important;
  border:1px solid rgba(59,23,13,.12)!important;
  box-shadow:0 10px 22px rgba(59,23,13,.12)!important;
  font-size:0!important;
  font-weight:900!important;
  text-decoration:none!important;
  transition:transform .18s ease, background .18s ease, box-shadow .18s ease!important;
}

.cs-smart-cross-sell--theme-cards .products li.product .button:before,
.cs-smart-cross-sell--theme-cards .products li.product a.button:before,
.cs-smart-cross-sell--theme-cards .products li.product .add_to_cart_button:before{
  content:"Ajouter"!important;
  font-size:13px!important;
  line-height:1!important;
}

.cs-smart-cross-sell--theme-cards .products li.product .button:after,
.cs-smart-cross-sell--theme-cards .products li.product a.button:after,
.cs-smart-cross-sell--theme-cards .products li.product .add_to_cart_button:after{
  content:""!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:20px!important;
  height:20px!important;
  margin-left:4px!important;
  opacity:.95!important;
  background-image:var(--cs-sc-cart-icon)!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:16px 16px!important;
}

.cs-smart-cross-sell--theme-cards .products li.product .button:hover,
.cs-smart-cross-sell--theme-cards .products li.product a.button:hover,
.cs-smart-cross-sell--theme-cards .products li.product .add_to_cart_button:hover{
  transform:translateY(-2px)!important;
  background:linear-gradient(135deg,#E6692B 0%,#C3652F 100%)!important;
  box-shadow:0 14px 26px rgba(230,105,43,.2)!important;
}

/* v2.1 — Cart block above totals, compact as requested */
.cart_totals > .cs-smart-cross-sell,
.wc-block-cart__sidebar > .cs-smart-cross-sell,
.wp-block-woocommerce-cart-order-summary-block + .cs-smart-cross-sell,
.cs-smart-cross-sell--cart{
  margin:0 0 22px!important;
}

/* v2.1 — Checkout cross-sell: elegant 4-column cards before payment */
.woocommerce-checkout .cs-smart-cross-sell--checkout,
.woocommerce-checkout .cs-smart-cross-sell--checkout-block{
  margin:26px 0 24px!important;
  padding:22px!important;
  border-radius:22px!important;
  background:linear-gradient(180deg,#fffdf9 0%,#FEF9F3 100%)!important;
  border:1px solid rgba(214,157,117,.55)!important;
  box-shadow:0 16px 38px rgba(59,23,13,.06)!important;
}

.woocommerce-checkout .cs-smart-cross-sell--checkout .cs-smart-cross-sell__header,
.woocommerce-checkout .cs-smart-cross-sell--checkout-block .cs-smart-cross-sell__header{
  display:block!important;
  text-align:left!important;
  margin-bottom:16px!important;
}

.woocommerce-checkout .cs-smart-cross-sell--checkout h3,
.woocommerce-checkout .cs-smart-cross-sell--checkout-block h3{
  font-size:19px!important;
  color:#3B170D!important;
  letter-spacing:-.01em!important;
  margin:0!important;
}

.woocommerce-checkout .cs-smart-cross-sell--checkout .cs-smart-cross-sell__header p,
.woocommerce-checkout .cs-smart-cross-sell--checkout-block .cs-smart-cross-sell__header p{
  margin:5px 0 0!important;
  color:#7D4B2E!important;
  font-size:13px!important;
}

/* v2.6.0 — Carrousel permanent (desktop + mobile), comme la fiche produit :
   défilement horizontal + autoplay + barre de progression + points, au lieu
   d'une grille statique. La scrollbar native est masquée (cf. règles plus
   bas), seule la barre de progression custom reste visible. */
.woocommerce-checkout .cs-smart-cross-sell--checkout .cs-smart-cross-sell__grid,
.woocommerce-checkout .cs-smart-cross-sell--checkout-block .cs-smart-cross-sell__grid{
  display:flex!important;
  grid-template-columns:none!important;
  flex-wrap:nowrap!important;
  gap:12px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scroll-snap-type:x mandatory!important;
  scroll-behavior:smooth!important;
  scroll-padding-left:4px!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:none!important;
  -ms-overflow-style:none!important;
  padding:4px 4px 12px!important;
  margin:0 -4px!important;
}

.woocommerce-checkout .cs-smart-cross-sell--checkout .cs-smart-cross-sell__grid::-webkit-scrollbar,
.woocommerce-checkout .cs-smart-cross-sell--checkout-block .cs-smart-cross-sell__grid::-webkit-scrollbar{
  display:none!important;
  width:0!important;
  height:0!important;
}

.woocommerce-checkout .cs-smart-cross-sell--checkout .cs-smart-cross-sell__card,
.woocommerce-checkout .cs-smart-cross-sell--checkout-block .cs-smart-cross-sell__card{
  display:flex!important;
  flex-direction:column!important;
  padding:0!important;
  border-radius:16px!important;
  overflow:hidden!important;
  background:#fff!important;
  border:1px solid rgba(203,166,137,.42)!important;
  min-height:100%!important;
  scroll-snap-align:start!important;
  /* 4 cartes visibles, le reste du pool déborde pour le défilement */
  flex:0 0 calc((100% - 12px*3)/4)!important;
  width:calc((100% - 12px*3)/4)!important;
  min-width:0!important;
}

.woocommerce-checkout .cs-smart-cross-sell--checkout .cs-smart-cross-sell__image,
.woocommerce-checkout .cs-smart-cross-sell--checkout-block .cs-smart-cross-sell__image{
  width:100%!important;
  height:auto!important;
  aspect-ratio:1/1!important;
  border-radius:0!important;
  object-fit:cover!important;
  background:#F7F1EA!important;
}

.woocommerce-checkout .cs-smart-cross-sell--checkout .cs-smart-cross-sell__body,
.woocommerce-checkout .cs-smart-cross-sell--checkout-block .cs-smart-cross-sell__body{
  display:flex!important;
  flex-direction:column!important;
  gap:7px!important;
  padding:11px!important;
  flex:1!important;
}

.woocommerce-checkout .cs-smart-cross-sell--checkout .cs-smart-cross-sell__name,
.woocommerce-checkout .cs-smart-cross-sell--checkout-block .cs-smart-cross-sell__name{
  min-height:34px!important;
  font-size:11px!important;
  line-height:1.25!important;
  color:#3B170D!important;
  text-transform:uppercase!important;
}

.woocommerce-checkout .cs-smart-cross-sell--checkout .cs-smart-cross-sell__price,
.woocommerce-checkout .cs-smart-cross-sell--checkout-block .cs-smart-cross-sell__price{
  font-size:12px!important;
  color:#7D4B2E!important;
  font-weight:900!important;
}

.woocommerce-checkout .cs-smart-cross-sell--checkout .cs-smart-cross-sell__actions,
.woocommerce-checkout .cs-smart-cross-sell--checkout-block .cs-smart-cross-sell__actions{
  margin-top:auto!important;
  display:flex!important;
  gap:6px!important;
}

.woocommerce-checkout .cs-smart-cross-sell--checkout .cs-smart-cross-sell__button,
.woocommerce-checkout .cs-smart-cross-sell--checkout-block .cs-smart-cross-sell__button{
  min-height:30px!important;
  padding:7px 10px!important;
  font-size:11px!important;
  background:#3B170D!important;
  color:#fff!important;
  border-radius:999px!important;
  flex:1!important;
}

.woocommerce-checkout .cs-smart-cross-sell--checkout .cs-smart-cross-sell__link,
.woocommerce-checkout .cs-smart-cross-sell--checkout-block .cs-smart-cross-sell__link{
  min-height:30px!important;
  width:38px!important;
  padding:7px 8px!important;
  font-size:0!important;
  border-radius:999px!important;
}

.woocommerce-checkout .cs-smart-cross-sell--checkout .cs-smart-cross-sell__link:before,
.woocommerce-checkout .cs-smart-cross-sell--checkout-block .cs-smart-cross-sell__link:before{
  content:"Voir";
  font-size:11px;
}

/* Tablette : 3 cartes visibles */
@media(max-width:1100px){
  .woocommerce-checkout .cs-smart-cross-sell--checkout .cs-smart-cross-sell__card,
  .woocommerce-checkout .cs-smart-cross-sell--checkout-block .cs-smart-cross-sell__card{
    flex-basis:calc((100% - 12px*2)/3)!important;
    width:calc((100% - 12px*2)/3)!important;
  }
}

/* Mobile : 2 cartes visibles */
@media(max-width:760px){
  .woocommerce-checkout .cs-smart-cross-sell--checkout .cs-smart-cross-sell__card,
  .woocommerce-checkout .cs-smart-cross-sell--checkout-block .cs-smart-cross-sell__card{
    flex-basis:calc((100% - 12px)/2)!important;
    width:calc((100% - 12px)/2)!important;
  }
}

/* Très petit écran : 1 carte pleine largeur */
@media(max-width:520px){
  .woocommerce-checkout .cs-smart-cross-sell--checkout .cs-smart-cross-sell__card,
  .woocommerce-checkout .cs-smart-cross-sell--checkout-block .cs-smart-cross-sell__card{
    flex-basis:88%!important;
    width:88%!important;
  }
}


/* v2.5 — Fiche produit : largeur adaptée au thème, centrée */
.single-product .cs-smart-cross-sell--theme-cards{
  width:100%!important;
  max-width:1300px!important;
  margin:60px auto 54px!important;
  justify-content:center!important;
  padding:26px 24px!important;
  border:1px solid rgba(214,157,117,.55)!important;
  border-radius:24px!important;
  background:linear-gradient(180deg,#fffdf9 0%,#FEF9F3 100%)!important;
  box-shadow:0 18px 42px rgba(59,23,13,.06)!important;
  overflow:hidden!important;
  clear:both!important;
}

.single-product .cs-smart-cross-sell--theme-cards .cs-smart-cross-sell__header{
  display:block!important;
  text-align:center!important;
  margin:0 0 22px!important;
  padding:0!important;
}

.single-product .cs-smart-cross-sell--theme-cards .cs-smart-cross-sell__header h3{
  margin:0!important;
  color:#3B170D!important;
  font-size:26px!important;
  line-height:1.12!important;
  letter-spacing:.02em!important;
  font-weight:950!important;
  text-transform:uppercase!important;
}

.single-product .cs-smart-cross-sell--theme-cards .cs-smart-cross-sell__header p{
  display:block!important;
  max-width:620px!important;
  margin:8px auto 0!important;
  color:#7D4B2E!important;
  font-size:14px!important;
  line-height:1.45!important;
}

/* On neutralise la grille du thème : la mise en page (flex/carrousel) est gérée plus bas */
.single-product .cs-smart-cross-sell--theme-cards ul.products{
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  gap:18px!important;
  list-style:none!important;
}

.single-product .cs-smart-cross-sell--theme-cards ul.products:before,
.single-product .cs-smart-cross-sell--theme-cards ul.products:after{
  display:none!important;
  content:none!important;
}

.single-product .cs-smart-cross-sell--theme-cards ul.products li.product{
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  float:none!important;
  clear:none!important;
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  border:1px solid rgba(203,166,137,.45)!important;
  border-radius:20px!important;
  background:#fff!important;
  overflow:hidden!important;
  box-shadow:0 12px 28px rgba(59,23,13,.055)!important;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease!important;
}

.single-product .cs-smart-cross-sell--theme-cards ul.products li.product:hover{
  transform:translateY(-3px)!important;
  border-color:rgba(230,105,43,.55)!important;
  box-shadow:0 18px 38px rgba(59,23,13,.1)!important;
}

.single-product .cs-smart-cross-sell--theme-cards ul.products li.product a.woocommerce-LoopProduct-link{
  display:flex!important;
  flex-direction:column!important;
  flex:1!important;
  min-width:0!important;
  color:#3B170D!important;
  text-decoration:none!important;
}

.single-product .cs-smart-cross-sell--theme-cards ul.products li.product img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  aspect-ratio:1/1!important;
  object-fit:cover!important;
  border-radius:0!important;
  margin:0!important;
  background:#F7F1EA!important;
}

.single-product .cs-smart-cross-sell--theme-cards ul.products li.product .woocommerce-loop-product__title{
  margin:0!important;
  padding:14px 16px 6px!important;
  min-height:58px!important;
  color:#3B170D!important;
  font-size:15px!important;
  line-height:1.16!important;
  font-weight:950!important;
  text-transform:uppercase!important;
  overflow:hidden!important;
}

.single-product .cs-smart-cross-sell--theme-cards ul.products li.product .price{
  display:block!important;
  margin:auto 0 0!important;
  padding:8px 44px 14px 16px!important;
  min-height:0!important;
  color:#3B170D!important;
  font-size:15px!important;
  line-height:1.2!important;
  font-weight:950!important;
}

/* v2.5.3 — Petit bouton carré identique au reste du site (icône seule,
   à côté du prix, jamais en chevauchement) */
.single-product .cs-smart-cross-sell--theme-cards ul.products li.product{
  padding-bottom:0!important;
}

.single-product .cs-smart-cross-sell--theme-cards ul.products li.product .button,
.single-product .cs-smart-cross-sell--theme-cards ul.products li.product a.button,
.single-product .cs-smart-cross-sell--theme-cards ul.products li.product .add_to_cart_button{
  position:absolute!important;
  right:10px!important;
  bottom:12px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:32px!important;
  min-width:32px!important;
  max-width:32px!important;
  height:32px!important;
  min-height:32px!important;
  margin:0!important;
  padding:0!important;
  border-radius:10px!important;
  background:#E6692B!important;
  color:#fff!important;
  box-shadow:0 6px 14px rgba(230,105,43,.28)!important;
  font-size:0!important;
  line-height:1!important;
  overflow:hidden!important;
  text-indent:-9999px!important;
}

.single-product .cs-smart-cross-sell--theme-cards ul.products li.product .button:before,
.single-product .cs-smart-cross-sell--theme-cards ul.products li.product a.button:before,
.single-product .cs-smart-cross-sell--theme-cards ul.products li.product .add_to_cart_button:before{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  height:100%!important;
  margin:0!important;
  text-indent:0!important;
  background-image:var(--cs-sc-cart-icon)!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:14px 14px!important;
}

.single-product .cs-smart-cross-sell--theme-cards ul.products li.product .button:after,
.single-product .cs-smart-cross-sell--theme-cards ul.products li.product a.button:after,
.single-product .cs-smart-cross-sell--theme-cards ul.products li.product .add_to_cart_button:after{
  display:none!important;
  content:none!important;
}

.single-product .cs-smart-cross-sell--theme-cards ul.products li.product .button:hover,
.single-product .cs-smart-cross-sell--theme-cards ul.products li.product a.button:hover,
.single-product .cs-smart-cross-sell--theme-cards ul.products li.product .add_to_cart_button:hover{
  transform:translateY(-2px)!important;
  background:#C3652F!important;
  box-shadow:0 10px 20px rgba(230,105,43,.36)!important;
}

.single-product .cs-smart-cross-sell--theme-cards ul.products li.product .yith-wcwl-add-to-wishlist,
.single-product .cs-smart-cross-sell--theme-cards ul.products li.product .tinv-wraper,
.single-product .cs-smart-cross-sell--theme-cards ul.products li.product .woosw-btn{
  position:absolute!important;
  top:14px!important;
  right:14px!important;
  z-index:5!important;
}

/* Panier/checkout : bouton plus clair, et ajout natif fiable */
.woocommerce-cart .cs-smart-cross-sell__button,
.woocommerce-checkout .cs-smart-cross-sell__button,
.cs-smart-cross-sell--cart .cs-smart-cross-sell__button,
.cs-smart-cross-sell--cart-block .cs-smart-cross-sell__button,
.cs-smart-cross-sell--cart-drawer .cs-smart-cross-sell__button,
.cs-smart-cross-sell--checkout .cs-smart-cross-sell__button,
.cs-smart-cross-sell--checkout-block .cs-smart-cross-sell__button{
  white-space:nowrap!important;
}


/* Sur téléphone très étroit, en-tête plus compact (carrousel toujours actif,
   cf. règles de carrousel permanent ci-dessus) */
@media(max-width:390px){
  .woocommerce-checkout .cs-smart-cross-sell--checkout h3,
  .woocommerce-checkout .cs-smart-cross-sell--checkout-block h3{
    font-size:22px!important;
  }
}


/* =====================================================================
   v2.5 — Carrousel "À savourer avec" (fiche produit)
   4 colonnes desktop, 3 tablette, 2 mobile, sur les deux styles de cards
   ===================================================================== */

.cs-smart-cross-sell,
.cs-smart-cross-sell *{
  box-sizing:border-box!important;
}

.cs-smart-cross-sell--product .cs-smart-cross-sell__viewport,
.cs-smart-cross-sell--checkout .cs-smart-cross-sell__viewport,
.cs-smart-cross-sell--checkout-block .cs-smart-cross-sell__viewport{
  position:relative!important;
}

/* Piste défilante commune aux deux styles de cards.
   La scrollbar native est masquée sur tous les navigateurs : seule la
   barre de progression custom (.cs-sc-carousel-progress) reste visible,
   pour éviter d'avoir deux barres affichées en même temps. */
.cs-smart-cross-sell--product .cs-smart-cross-sell__grid,
.cs-smart-cross-sell--product ul.products{
  display:flex!important;
  grid-template-columns:none!important;
  flex-wrap:nowrap!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scroll-snap-type:x mandatory!important;
  scroll-behavior:smooth!important;
  scroll-padding-left:4px!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:none!important;
  -ms-overflow-style:none!important;
  padding:4px 4px 12px!important;
  margin:0 -4px!important;
}

.cs-smart-cross-sell--product .cs-smart-cross-sell__grid::-webkit-scrollbar,
.cs-smart-cross-sell--product ul.products::-webkit-scrollbar{
  display:none!important;
  width:0!important;
  height:0!important;
}

.cs-smart-cross-sell--product .cs-smart-cross-sell__card,
.cs-smart-cross-sell--product ul.products li.product{
  scroll-snap-align:start!important;
}

/* Desktop : 4 cartes visibles */
.cs-smart-cross-sell--product .cs-smart-cross-sell__card{
  flex:0 0 calc((100% - 14px*3)/4)!important;
  width:calc((100% - 14px*3)/4)!important;
  min-width:0!important;
}
.cs-smart-cross-sell--product ul.products li.product{
  flex:0 0 calc((100% - 18px*3)/4)!important;
  width:calc((100% - 18px*3)/4)!important;
  min-width:0!important;
}

/* Tablette : 3 cartes visibles */
@media(max-width:1100px){
  .cs-smart-cross-sell--product .cs-smart-cross-sell__card{
    flex-basis:calc((100% - 14px*2)/3)!important;
    width:calc((100% - 14px*2)/3)!important;
  }
  .cs-smart-cross-sell--product ul.products li.product{
    flex-basis:calc((100% - 18px*2)/3)!important;
    width:calc((100% - 18px*2)/3)!important;
  }
}

/* Mobile : 2 cartes visibles */
@media(max-width:760px){
  .cs-smart-cross-sell--product .cs-smart-cross-sell__card{
    flex-basis:calc((100% - 14px)/2)!important;
    width:calc((100% - 14px)/2)!important;
  }
  .cs-smart-cross-sell--product ul.products li.product{
    flex-basis:calc((100% - 14px)/2)!important;
    width:calc((100% - 14px)/2)!important;
  }
  .single-product .cs-smart-cross-sell--theme-cards{
    padding:30px!important;
  }
}

/* v2.5.3 — Plus de flèches de navigation : le carrousel défile seul
   (cf. JS autoplay) et au toucher/glisser. */
@media(max-width:1100px){
  .single-product .cs-smart-cross-sell--theme-cards ul.products li.product .price{
    font-size:15px!important;
  }
}

@media(max-width:760px){
  .single-product .cs-smart-cross-sell--theme-cards ul.products li.product .woocommerce-loop-product__title{
    padding:12px 14px 4px!important;
    min-height:auto!important;
    font-size:13px!important;
  }

  .single-product .cs-smart-cross-sell--theme-cards ul.products li.product .price{
    font-size:14px!important;
  }
}

/* =====================================================================
   v2.5.6 — Barre de progression du carrousel "À savourer avec"
   Toujours visible sous les cartes (pas de fade), indique la position de
   défilement. Interactive : on peut la glisser (souris/tactile) pour
   faire défiler les cartes, comme une scrollbar custom.
   ===================================================================== */
.cs-sc-carousel-progress{
  position:relative!important;
  width:100%!important;
  max-width:none!important;
  height:5px!important;
  margin:14px auto 0!important;
  border-radius:999px!important;
  background:rgba(203,166,137,.3)!important;
  cursor:grab!important;
  touch-action:none!important;
  -webkit-user-select:none!important;
  user-select:none!important;
}

/* Zone cliquable agrandie (la barre visuelle reste fine, plus facile à saisir) */
.cs-sc-carousel-progress:before{
  content:"";
  position:absolute;
  top:-8px;
  bottom:-8px;
  left:0;
  right:0;
}

.cs-sc-carousel-progress--dragging{
  cursor:grabbing!important;
}

.cs-sc-carousel-progress__bar{
  position:absolute!important;
  top:0!important;
  left:0;
  height:100%!important;
  width:100%;
  border-radius:999px!important;
  background:#3B170D!important;
  transition:width .15s ease, left .1s linear!important;
  pointer-events:none!important;
}

/* =====================================================================
   v2.5.8 — Cross-sell dans le drawer panier du thème (FazFood / widget
   Elementor "Menu Cart"). Le bloc est injecté côté serveur juste avant
   .elementor-menu-cart__subtotal (cf. PHP). On transforme le drawer en
   colonne flex : en-tête fixe, zone articles + cross-sell défilante,
   sous-total + boutons "Voir le panier"/"Commander" toujours visibles
   en bas (position:sticky, qui s'empilent proprement l'un au-dessus de
   l'autre sans réglage manuel de hauteur).
   ===================================================================== */
.site-header-cart-side{
  display:flex!important;
  flex-direction:column!important;
}

.site-header-cart-side .cart-side-heading{
  flex:0 0 auto!important;
}

.site-header-cart-side .widget.woocommerce.widget_shopping_cart{
  display:flex!important;
  flex-direction:column!important;
  flex:1 1 auto!important;
  min-height:0!important;
}

.site-header-cart-side .widget_shopping_cart_content{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
}

.site-header-cart-side .elementor-menu-cart__subtotal,
.site-header-cart-side .elementor-menu-cart__footer-buttons{
  position:sticky!important;
  bottom:0!important;
  background:#FEF9F3!important;
  z-index:2!important;
}

.cs-smart-cross-sell--cart-drawer{
  margin:14px 0!important;
}

.cs-sc-carousel-progress--dragging .cs-sc-carousel-progress__bar{
  transition:none!important;
}

/* =====================================================================
   Points de pagination sous la barre de progression du carrousel : un
   point par page de cartes visibles (pas par carte individuelle).
   ===================================================================== */
.cs-sc-carousel-dots{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  margin:10px auto 0!important;
}

.cs-sc-carousel-dots__dot{
  width:7px!important;
  height:7px!important;
  padding:0!important;
  border:0!important;
  border-radius:50%!important;
  background:rgba(203,166,137,.5)!important;
  cursor:pointer!important;
  transition:background .15s ease, transform .15s ease!important;
}

.cs-sc-carousel-dots__dot--active{
  background:#3B170D!important;
  transform:scale(1.25)!important;
}
