/* =====================================================
   SHOPS CART – CORE (spécifique uniquement)
===================================================== */

.shops-cart-item {
  border-bottom: 1px solid #eee;
  transition: opacity .25s ease, background .25s ease;
}

.shops-cart-item-options {
  font-size: .8rem;
  color: #6c757d;
}

/* =====================================================
   IMAGE + BADGE
===================================================== */
.shops-cart-switch {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.cart-switch-item {
  padding: 6px 10px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
}

.cart-switch-item.is-active {
  background: #000;
  color: #fff;
}

.shops-cart-item-image {
  position: relative;
}

.shops-cart-item-image img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: .375rem;
  background: #f8f9fa;
}

.shops-cart-item-qty-badge {
  position: absolute;
  top: -.375rem;
  right: -.375rem;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 .375rem;
  font-size: .75rem;
  font-weight: 600;
  border-radius: 50rem;
  background: #000;
  color: #fff;
  pointer-events: none;
}
.shops-cart-item {
  border-bottom: 1px solid #eee;
}

.shops-cart-item-title {
  font-size: 0.8rem;
  line-height: 1.3;
}

.shops-cart-item-options {
  font-size: .8rem;
  color: #6c757d;
}

.shops-cart-item-price {
  font-size: 1rem;
  white-space: nowrap;
}
.shops-cart-options {
  padding-left: 1rem;
}

.shops-cart-qty button {
  width: 28px;
  height: 28px;
}

.shops-cart-qty input {
  width: 42px;
  text-align: center;
}


.shops-cart-option button {
  line-height: 1;
}
.shops-cart-cross-sell-mobile-list::-webkit-scrollbar {
  display: none;
}

.shops-cart-cross-sell-mobile-list {
  scroll-snap-type: x mandatory;
}

.shops-cross-sell-mobile-item {
  scroll-snap-align: start;
}
/* DESKTOP – scroll cross-sell */
#shops-cartOffcanvas .shops-cart-cross-sell {
  height: 100%;
  overflow-y: auto;
}
#shops-cartOffcanvas .shops-cart-layout {
  overflow: hidden;
}
#shops-cartOffcanvas .shops-cart-cross-sell {
  padding-bottom: 1rem;
}

/* =====================================================
   STATES
===================================================== */

.shops-cart-item.is-locked {
  opacity: .6;
  pointer-events: none;
  position: relative;
}

.shops-cart-item.is-locked::after {
  content: "";
  position: absolute;
  right: .75rem;
  top: 50%;
  width: 1rem;
  height: 1rem;
  margin-top: -.5rem;
  border: 2px solid #dee2e6;
  border-top-color: #000;
  border-radius: 50%;
  animation: cart-spin .8s linear infinite;
}

@keyframes cart-spin {
  to { transform: rotate(360deg); }
}

/* =====================================================
   OFFCANVAS (uniquement ce que BS ne gère pas)
===================================================== */

#shops-cartOffcanvas.offcanvas-end {
  width: 700px!important;
  max-width: 95vw;
}
#shops-cartOffcanvas .offcanvas-header {
  background-color:var(--bg-light);
}
#shops-cartOffcanvas .offcanvas-body {
  height: calc(100vh - 140px);
  overflow: hidden;
}
#shops-cartOffcanvas .shops-cart-shippings-status{    border-bottom: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important;}

/* DESKTOP – scroll PRODUITS */
#shops-cartOffcanvas .shops-cart-main {
  height: 100%;
  overflow-y: auto;
}

#shops-cartOffcanvas .shops-cart-main .shops-cart {
  height: auto;
  overflow: visible;
}

/* =====================================================
   VISIBILITY
===================================================== */

.offcanvas .shops-cart,
.page-cart .shops-cart {
  opacity: 0;
}

.offcanvas.show .shops-cart,
.page-cart .shops-cart.is-visible {
  opacity: 1;
}
.shops-cart-layout {
  display: grid;
  grid-template-columns: 160px 1fr;
  transition: grid-template-columns .2s ease;
}
.shops-cart-layout.no-cross-sell {
  grid-template-columns: 1fr!important;
}


.shops-cart-layout.with-cross-sell {
  grid-template-columns: 200px 1fr;
}
.shops-cart.is-loading {
  opacity: 1 !important;
}

.shops-cart-summary {text-align:right}
/* =====================================================
   SKELETON (custom)
===================================================== */

.shops-skeleton-line {
  height: .875rem;
  border-radius: .5rem;
  background: linear-gradient(
    90deg,
    #eee 25%,
    #f5f5f5 37%,
    #eee 63%
  );
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.3s ease infinite;
}

@keyframes skeleton-shimmer {
  from { background-position: 100% 0; }
  to   { background-position: 0 0; }
}

/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 768px) {

  #shops-cartOffcanvas.offcanvas-end {
    width: 100vw;
  }

  #shops-cartOffcanvas .shops-cart-layout {
    grid-template-columns: 1fr !important;
  }

  #shops-cartOffcanvas .shops-cart-cross-sell {
    display: none !important; 
  }
  .shops-cross-sell-mobile-list {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .5rem;
  }
  
}

