/* Tiroir panier — slide depuis la droite */

.ss-drawer-root[hidden] {
  display: none !important;
}

.ss-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(7, 26, 42, 0.45);
  border: 0;
  cursor: pointer;
  animation: ssDrawerFade 0.22s ease both;
}

.ss-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 81;
  width: min(420px, 100vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--ss-surface);
  color: var(--ss-text);
  border-left: 1px solid var(--ss-line);
  box-shadow: -18px 0 48px rgba(7, 26, 42, 0.22);
  animation: ssDrawerIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes ssDrawerIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes ssDrawerFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ss-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--ss-line);
}

.ss-drawer-head h2 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.ss-drawer-close {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid var(--ss-line);
  background: var(--ss-surface-2);
  color: var(--ss-text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.ss-drawer-body {
  flex: 1;
  overflow: auto;
  padding: 0.85rem 1.1rem 1rem;
}

.ss-drawer-empty {
  margin: 1.5rem 0;
  color: var(--ss-muted);
  text-align: center;
  line-height: 1.5;
}

.ss-drawer-line {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.65rem;
  align-items: start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--ss-line);
}

.ss-drawer-line img {
  width: 56px;
  height: auto;
  border-radius: 8px;
  background: var(--ss-surface-2);
}

.ss-drawer-line strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}

.ss-drawer-line span {
  display: block;
  font-size: 0.8rem;
  color: var(--ss-muted);
  line-height: 1.4;
}

.ss-drawer-line em {
  display: block;
  margin-top: 0.25rem;
  font-style: normal;
  font-weight: 700;
  font-size: 0.9rem;
}

.ss-drawer-rm {
  border: 0;
  background: transparent;
  color: var(--ss-muted);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.15rem;
}

.ss-drawer-rm:hover {
  color: var(--ss-orange);
}

.ss-drawer-foot {
  padding: 0.95rem 1.1rem 1.2rem;
  border-top: 1px solid var(--ss-line);
  background: var(--ss-surface-2);
}

.ss-drawer-totals {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
}

.ss-drawer-totals div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ss-muted);
}

.ss-drawer-totals .is-ttc {
  margin-top: 0.25rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--ss-line);
  color: var(--ss-text);
  font-weight: 800;
  font-size: 1.05rem;
}

.ss-drawer-cta {
  width: 100%;
  justify-content: center;
}

.ss-drawer-cta[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.ss-drawer-continue {
  display: block;
  margin-top: 0.65rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--ss-cyan);
  text-decoration: none;
}

body.ss-drawer-open {
  overflow: hidden;
}

button.ss-cart-chip {
  font: inherit;
  cursor: pointer;
}
