/* =====================================================
   SHOPS CART – BASE
===================================================== */

.shops-cart {
  /* container logique, animé via classes */
}

.shops-cart-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.shops-cart-count {
  font-size: .9rem;
  color: #777;
}
/* =====================================================
   PRODUCTS LIST
===================================================== */

.shops-cart-products {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shops-cart-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 5px 5px 0;
  border-bottom: 1px solid #eee;
  transition: opacity .25s ease, transform .25s ease, background .25s ease;
}

.shops-cart-item-main {
  flex: 1;
}

.shops-cart-item-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.shops-cart-item-options {
  font-size: 13px;
  color: #777;
}
/* =====================================================
   PRODUCT IMAGE + QTY BADGE
===================================================== */

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

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

.shops-cart-item-qty-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #000;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
/* =====================================================
   ACTIONS / QUANTITY / PRICES
===================================================== */

.shops-cart-item-actions {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 120px;
}

.shops-cart-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shops-cart-qty button {
  width: 28px;
  height: 28px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
}

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

.shops-cart-price-old {
  font-size: 12px;
  color: #999;
  text-decoration: line-through;
}

.shops-cart-price {
  font-size: 1rem;
  font-weight: 600;
}

.shops-cart-vat {
  font-size: 11px;
  color: #777;
}
/* =====================================================
   STATES
===================================================== */

.shops-cart.is-loading {
  opacity: 1 !important;
  transform: none !important;
}

.shops-cart.is-loading .shops-cart-item {
  transition: none !important;
}

.shops-cart-item.is-locked {
  pointer-events: none;
  opacity: 0.5;
  filter: grayscale(1);
  position: relative;
}

.shops-cart-item.is-locked::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid #ccc;
  border-top-color: #000;
  border-radius: 50%;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  animation: cart-spin .8s linear infinite;
}

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

.shops-cart-item.is-updated {
  animation: cart-flash .4s ease;
}

@keyframes cart-flash {
  0% { background: rgba(25,135,84,.15); }
  100% { background: transparent; }
}
/* =====================================================
   EMPTY & SUMMARY
===================================================== */

.shops-cart-empty {
  text-align: center;
  padding: 48px 16px;
}

.shops-cart-empty-title {
  font-weight: 600;
  margin-bottom: 12px;
}

.shops-cart-summary {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}

.shops-cart-summary-title {
  font-weight: 600;
  margin-bottom: 12px;
}

.shops-cart-summary-line {
  display: flex;
  justify-content: space-between;
}

.shops-cart-discount {
  font-size: 13px;
  color: #198754;
}
/* =====================================================
   OFFCANVAS LAYOUT
===================================================== */

#shops-cartOffcanvas.offcanvas-end {
  width: 700px!important;
  max-width: 95vw;
}

#shops-cartOffcanvas .offcanvas-body {
  height: calc(100vh - 140px);
  overflow: hidden;
}
#shops-cartOffcanvas .offcanvas-header {
    padding: 5px 15px!important;
	background: var(--bg-light);
}
.shops-cross-sell-item{text-align:center;margin-bottom:5px}
.cross-sell-item-title{font-size:12px}
.shops-cart-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  height: 100%;
}
#shops-cartOffcanvas .shops-cart-shippings-status{
	border-bottom: 1px solid #000;
    padding: 0 20px;
}
.shops-cart-layout:has(.shops-cart-cross-sell.d-none) {
  grid-template-columns: 1fr;
}
.shops-cart-cross-sell {
  border-right: 1px solid #e5e5e5;
  padding: 16px;
  overflow-y: auto;
  background: #fafafa;
}

.shops-cart-main {
  overflow: hidden;
}

.shops-cart-main .shops-cart {
  height: 100%;
  overflow-y: auto;
}

#shops-cartOffcanvas .offcanvas-footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  z-index: 10;
}
/* =====================================================
   VISIBILITY TRANSITIONS
===================================================== */

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

.offcanvas.show .shops-cart,
.page-cart .shops-cart.is-visible {
  opacity: 1;
}

/* =====================================================
   SKELETON
===================================================== */

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

@keyframes skeleton-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 768px) {

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

  .shops-cart-layout {
    grid-template-columns: 1fr;
  }

  .shops-cart-cross-sell {
    display: none;
  }

  .shops-cart-item {
    flex-direction: column;
  }

  .shops-cart-item-actions {
    align-items: flex-start;
  }
}
