/* ============================================================
   SENV — Slide Cart (Carrinho Lateral)
   Tokens: --senv-black #0A0807 | --senv-gold #B8924A
           --senv-nude  #E2C9B0 | --senv-offwhite #F7F2ED
   Fontes: Italiana (display) | Playfair Display (heading) | Inter (body)
   ============================================================ */

/* ─── Backdrop ─────────────────────────────────────────────── */
.senv-slide-cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  z-index: 9998;
}
.senv-slide-cart-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* ─── Drawer ───────────────────────────────────────────────── */
.senv-slide-cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: calc(100vw - 20px);
  height: 100vh;
  height: 100dvh;
  background: var(--senv-surface-1, #141210);
  border-left: 1px solid rgba(184,146,74,0.12);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.senv-slide-cart.is-open {
  transform: translateX(0);
}

/* ─── Top bar ──────────────────────────────────────────────── */
.senv-slide-cart__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.senv-slide-cart__topbar-label {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--senv-offwhite, #F7F2ED);
  letter-spacing: 0.03em;
}

.senv-slide-cart__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: rgba(226,201,176,0.5);
  font-size: 1.15rem;
  cursor: pointer;
  border-radius: 2px;
  transition: color 0.2s, background 0.2s;
  padding: 0;
}
.senv-slide-cart__close:hover {
  color: var(--senv-offwhite, #F7F2ED);
  background: rgba(255,255,255,0.05);
}

/* ─── Body (scrollable) ────────────────────────────────────── */
.senv-slide-cart__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
}

/* ─── Header interno ───────────────────────────────────────── */
.senv-slide-cart__header {
  padding: 20px 24px 0;
  flex-shrink: 0;
}

.senv-slide-cart__title {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--senv-gold, #B8924A);
  margin: 0;
}

/* ─── Lista de itens ───────────────────────────────────────── */
.senv-slide-cart__items {
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
}

/* Item */
.senv-slide-cart__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.senv-slide-cart__item:last-child {
  border-bottom: none;
}

.senv-slide-cart__item-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 80px;
}
.senv-slide-cart__item-thumb img {
  width: 64px;
  height: 80px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

.senv-slide-cart__item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.senv-slide-cart__item-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--senv-offwhite, #F7F2ED);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.senv-slide-cart__item-name:hover { color: var(--senv-gold, #B8924A); }

.senv-slide-cart__item-info .variation dt,
.senv-slide-cart__item-info .variation dd {
  font-size: 0.68rem;
  color: rgba(226,201,176,0.5);
  margin: 0;
}
.senv-slide-cart__item-info .variation { margin: 2px 0 0; }

.senv-slide-cart__item-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
}

.senv-slide-cart__item-qty {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(226,201,176,0.5);
}

.senv-slide-cart__item-price {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--senv-offwhite, #F7F2ED);
}

.senv-slide-cart__item-remove {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: rgba(226,201,176,0.3);
  font-size: 1rem;
  text-decoration: none;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
  margin-top: 2px;
}
.senv-slide-cart__item-remove:hover {
  color: var(--senv-offwhite, #F7F2ED);
  background: rgba(255,255,255,0.06);
}

/* ─── Footer — totais + ações ──────────────────────────────── */
.senv-slide-cart__footer {
  padding: 0 24px 24px;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 20px;
}

/* Pix badge */
.senv-slide-cart__pix-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(184,146,74,0.08);
  border: 1px solid rgba(184,146,74,0.18);
  border-radius: 2px;
  padding: 8px 12px;
  margin-bottom: 16px;
}
.senv-slide-cart__pix-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: rgba(226,201,176,0.7);
  line-height: 1.4;
}
.senv-slide-cart__pix-text strong { color: var(--senv-gold, #B8924A); }

/* Totais */
.senv-slide-cart__totals {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.senv-slide-cart__totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: rgba(226,201,176,0.6);
}
.senv-slide-cart__totals-row span:last-child {
  color: var(--senv-offwhite, #F7F2ED);
  font-weight: 500;
}

.senv-slide-cart__totals-row--total {
  border-top: 1px solid rgba(184,146,74,0.2);
  padding-top: 10px;
  margin-top: 4px;
  margin-bottom: 16px;
}
.senv-slide-cart__totals-row--total span {
  font-size: 0.92rem;
  font-weight: 600;
}
.senv-slide-cart__totals-row--total span:last-child {
  color: var(--senv-gold, #B8924A);
}

/* Checkout button */
.senv-slide-cart__checkout-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--senv-gold, #B8924A);
  color: var(--senv-black, #0A0807);
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.2s;
  margin-bottom: 12px;
}
.senv-slide-cart__checkout-btn:hover {
  background: #caa85e;
  color: var(--senv-black, #0A0807);
}

/* ─── Coupon ────────────────────────────────────────────────── */
.senv-slide-cart__coupons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.senv-slide-cart__coupon-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(184,146,74,0.1);
  border: 1px solid rgba(184,146,74,0.22);
  border-radius: 2px;
  padding: 5px 10px 5px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
}

.senv-slide-cart__coupon-code {
  color: var(--senv-gold, #B8924A);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.senv-slide-cart__coupon-discount {
  color: #7bc67e;
  font-weight: 500;
}

.senv-slide-cart__coupon-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: transparent;
  border: none;
  color: rgba(226,201,176,0.35);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: color 0.2s;
  line-height: 1;
}
.senv-slide-cart__coupon-remove:hover { color: var(--senv-offwhite, #F7F2ED); }

.senv-slide-cart__coupon-form {
  margin-bottom: 16px;
}

.senv-slide-cart__coupon {
  display: flex;
  gap: 0;
  width: 100%;
}

.senv-slide-cart__coupon-input {
  flex: 1;
  height: 36px;
  background: transparent;
  border: 1px solid rgba(184,146,74,0.25);
  border-right: none;
  color: var(--senv-offwhite, #F7F2ED);
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  padding: 0 12px;
  border-radius: 2px 0 0 2px;
  transition: border-color 0.2s;
}
.senv-slide-cart__coupon-input::placeholder { color: rgba(226,201,176,0.3); }
.senv-slide-cart__coupon-input:focus {
  outline: none;
  border-color: var(--senv-gold, #B8924A);
}

.senv-slide-cart__coupon-btn {
  height: 36px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid rgba(184,146,74,0.25);
  color: var(--senv-gold, #B8924A);
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0 2px 2px 0;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.senv-slide-cart__coupon-btn:hover {
  background: var(--senv-gold, #B8924A);
  color: var(--senv-black, #0A0807);
}

.senv-slide-cart__coupon-msg {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  margin: 6px 0 0;
  padding: 0;
  line-height: 1.4;
}
.senv-slide-cart__coupon-msg--error {
  color: #C0392B;
}
.senv-slide-cart__coupon-msg--success {
  color: var(--senv-success, #4A8C5C);
}

/* View cart link */
.senv-slide-cart__view-cart {
  display: block;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(226,201,176,0.45);
  text-decoration: none;
  transition: color 0.2s;
}
.senv-slide-cart__view-cart:hover { color: var(--senv-offwhite, #F7F2ED); }

/* ─── Empty state ──────────────────────────────────────────── */
.senv-slide-cart__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 24px;
  text-align: center;
  flex: 1;
}

.senv-slide-cart__empty-icon {
  margin-bottom: 4px;
  opacity: 0.6;
}

.senv-slide-cart__empty-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: rgba(226,201,176,0.55);
  margin: 0;
}

.senv-slide-cart__empty-cta {
  margin-top: 4px;
  display: inline-block;
  padding: 10px 28px;
  border: 1px solid var(--senv-gold, #B8924A);
  color: var(--senv-gold, #B8924A);
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}
.senv-slide-cart__empty-cta:hover {
  background: var(--senv-gold, #B8924A);
  color: var(--senv-black, #0A0807);
}

/* ─── Loading state (optional — added by JS) ──────────────── */
.senv-slide-cart__body.is-loading {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.15s;
}

/* ─── Mobile ───────────────────────────────────────────────── */
@media (max-width: 480px) {
  .senv-slide-cart {
    width: 100%;
    max-width: 100%;
  }

  .senv-slide-cart__topbar {
    padding: 16px 20px;
  }

  .senv-slide-cart__items {
    padding: 12px 20px;
  }

  .senv-slide-cart__footer {
    padding: 0 20px 20px;
  }
}
