/* Panier drawer + stratégies conversion — migrable vers cart-drawer.liquid Shopify */

/* Bandeau haut — carrousel marquee */
.marquee {
  width: 100%;
  overflow: hidden;
}
.header-marquee {
  background: linear-gradient(90deg, #17120d, #3b2d1d, #17120d);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 0;
}
.marquee-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  width: max-content;
  gap: 24px;
  will-change: transform;
  animation: marquee-scroll var(--marquee-duration, 25s) linear infinite;
}

.header-marquee.is-static .marquee-track {
  animation: none;
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0 12px;
  text-align: center;
}
.header-marquee.is-static .marquee-item {
  display: none;
}
.header-marquee.is-static .marquee-item--active {
  display: inline-flex;
}
.marquee-item {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff7e9;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.marquee-item strong {
  color: #f0cf91;
  text-transform: none;
  letter-spacing: 0.02em;
}
.marquee-item .promo-code {
  display: inline;
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px dashed rgba(240, 207, 145, 0.6);
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s;
  white-space: nowrap;
  text-transform: uppercase;
}
.marquee-item .promo-code:hover {
  background: rgba(240, 207, 145, 0.25);
}
@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
    flex-wrap: nowrap;
    width: max-content;
    padding: 0 12px;
  }
  .marquee:not(.is-static) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .marquee:not(.is-static)::-webkit-scrollbar {
    display: none;
  }
}

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-cart-overlay);
  background: rgba(25, 18, 12, 0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: var(--z-cart-drawer);
  width: min(420px, 100vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 80px rgba(82, 60, 40, 0.2);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  transform: translateX(100%);
  transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.cart-drawer.open { transform: translateX(0); }

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.cart-head h2 {
  font-family: Fraunces, serif;
  font-size: 26px;
  margin: 0;
  letter-spacing: -0.04em;
}
.cart-close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  font-size: 18px;
}

.shipping-bar {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(215, 223, 204, 0.35), var(--surface));
}
.shipping-bar p {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--mocha);
}
.shipping-bar.success p { color: #2f5d2f; }
.shipping-track {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.shipping-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transition: width 0.4s ease;
  width: 0%;
}

.cart-items {
  overflow-y: auto;
  padding: 16px 22px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.6;
}
.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.cart-item img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 14px;
  background: #efe6df;
  padding: 6px;
}
.cart-item h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}
.cart-item .ci-variant {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  margin-top: 4px;
}
.cart-item .ci-price {
  font-weight: 900;
  color: var(--gold);
  font-size: 14px;
  margin-top: 6px;
}
.cart-item .ci-compare {
  font-size: 11px;
  color: var(--muted);
  text-decoration: line-through;
  margin-left: 6px;
}
.qty-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  font-weight: 900;
}
.qty-val {
  min-width: 24px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
}
.ci-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 8px;
}

.cart-cross {
  padding: 0 22px 12px;
  border-top: 1px solid var(--line);
}
.cart-cross h3 {
  font-size: 14px;
  margin: 14px 0 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mocha);
}
.cross-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: 0.2s;
}
.cross-item:hover { border-color: var(--gold); }
.cross-item img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: #efe6df; }
.cross-item strong { font-size: 12px; display: block; }
.cross-item span { font-size: 12px; color: var(--gold); font-weight: 900; }

.cart-foot {
  padding: 18px 22px 24px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.promo-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.promo-row input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--surface);
  font-size: 13px;
}
.promo-row button {
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  background: #17120d;
  color: #fff8ed;
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
}
.promo-applied {
  display: none;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(183, 138, 66, 0.14);
  border: 1px solid rgba(183, 138, 66, 0.3);
  font-size: 12px;
  font-weight: 800;
  color: var(--mocha);
  margin-bottom: 12px;
}
.promo-applied.show { display: flex; justify-content: space-between; align-items: center; }
.promo-applied button { border: 0; background: transparent; cursor: pointer; font-weight: 900; color: var(--muted); }

.cart-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.cart-line.total {
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.cart-line.savings { color: #2f5d2f; }
.cart-line.discount { color: var(--gold); }
.cart-checkout {
  width: 100%;
  margin-top: 14px;
  padding: 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #17120d, #4a351f);
  color: #fff8ed;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(58, 38, 20, 0.22);
}
.cart-checkout:hover { transform: translateY(-2px); }
.cart-note {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
  font-weight: 600;
}

.cart-toast {
  position: fixed;
  bottom: 90px;
  right: 22px;
  z-index: var(--z-toast);
  background: #17120d;
  color: #fff8ed;
  padding: 14px 18px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(12px);
  transition: 0.3s ease;
  pointer-events: none;
  max-width: 280px;
}
.cart-toast.show { opacity: 1; transform: translateY(0); }
.cart-toast span { color: #f0cf91; }

.badge-discount {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  background: #c0392b;
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.p-img { position: relative; }

.stock-urgency {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #a0522d;
  margin-top: 10px;
}
.stock-urgency .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e67e22;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.bundle-banner {
  margin: 20px 0;
  padding: 16px 20px;
  border-radius: 22px;
  border: 1px solid rgba(183, 138, 66, 0.35);
  background: linear-gradient(135deg, rgba(183, 138, 66, 0.12), var(--surface));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.bundle-banner p { margin: 0; font-weight: 700; font-size: 14px; color: var(--mocha); }
.bundle-banner strong { color: var(--gold); }

.cart-btn { cursor: pointer; }
.cart-btn.has-items { border-color: var(--gold); background: rgba(183, 138, 66, 0.1); }

@media (max-width: 680px) {
  .cart-drawer { width: 100vw; }
  .cart-toast { left: 12px; right: 12px; max-width: none; }
}