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

/* ─── Wrapper principal ──────────────────────────────────────── */
.senv-cart {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ─── Layout 2 colunas (desktop) ────────────────────────────── */
.senv-cart__layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 48px;
  align-items: start;
}

/* ─── Título ─────────────────────────────────────────────────── */
.senv-cart__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--senv-offwhite, #F7F2ED);
  margin: 0 0 32px;
  letter-spacing: 0.02em;
}

/* ─── Tabela / grid de itens ─────────────────────────────────── */
.senv-cart__head {
  display: grid;
  grid-template-columns: 1fr 120px 120px 120px 48px;
  gap: 0 16px;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(184,146,74,0.25);
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--senv-gold, #B8924A);
}

.senv-cart__head-price,
.senv-cart__head-qty,
.senv-cart__head-subtotal {
  text-align: center;
}

/* ─── Item ───────────────────────────────────────────────────── */
.senv-cart__item {
  display: grid;
  grid-template-columns: 1fr 120px 120px 120px 48px;
  gap: 0 16px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Produto: thumb + info */
.senv-cart__item-product {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

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

.senv-cart__item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.senv-cart__item-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--senv-offwhite, #F7F2ED);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s;
}
.senv-cart__item-name:hover { color: var(--senv-gold, #B8924A); }

.senv-cart__item-info .variation dt,
.senv-cart__item-info .variation dd {
  font-size: 0.75rem;
  color: rgba(226,201,176,0.6);
  margin: 0;
}
.senv-cart__item-info .variation { margin: 4px 0 0; }

.senv-cart__backorder {
  font-size: 0.7rem;
  color: var(--senv-gold, #B8924A);
  margin: 0;
}

/* Preço, qty, subtotal */
.senv-cart__item-price,
.senv-cart__item-subtotal {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: var(--senv-offwhite, #F7F2ED);
  text-align: center;
}
.senv-cart__item-subtotal { font-weight: 600; }

/* Quantidade */
.senv-cart__item-qty {
  display: flex;
  justify-content: center;
}
.senv-cart__item-qty .quantity {
  display: flex;
  align-items: center;
  gap: 0;
}
.senv-cart__item-qty input[type="number"] {
  width: 56px;
  height: 36px;
  background: transparent;
  border: 1px solid rgba(184,146,74,0.3);
  color: var(--senv-offwhite, #F7F2ED);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  text-align: center;
  border-radius: 2px;
  -moz-appearance: textfield;
}
.senv-cart__item-qty input[type="number"]::-webkit-outer-spin-button,
.senv-cart__item-qty input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}
.senv-cart__item-qty input[type="number"]:focus {
  outline: none;
  border-color: var(--senv-gold, #B8924A);
}

/* Botão remover — desktop */
.senv-cart__item-remove-desktop {
  display: flex;
  justify-content: center;
}
.senv-cart__item-remove-mobile { display: none; }

.senv-cart__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: rgba(226,201,176,0.4);
  font-size: 1.1rem;
  text-decoration: none;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}
.senv-cart__remove:hover {
  color: var(--senv-offwhite, #F7F2ED);
  background: rgba(255,255,255,0.06);
}

/* ─── Ações (atualizar carrinho) ────────────────────────────── */
.senv-cart__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 0 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Cupom na sidebar */
.senv-cart__coupon-form { margin-bottom: 16px; }

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

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

.senv-cart__coupon-btn {
  height: 40px;
  padding: 0 18px;
  background: transparent;
  border: 1px solid rgba(184,146,74,0.3);
  color: var(--senv-gold, #B8924A);
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  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-cart__coupon-btn:hover {
  background: var(--senv-gold, #B8924A);
  color: var(--senv-black, #0A0807);
}

.senv-cart__update {
  height: 40px;
  padding: 0 20px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(226,201,176,0.5);
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 0.2s, color 0.2s;
}
.senv-cart__update:hover {
  border-color: rgba(226,201,176,0.4);
  color: var(--senv-offwhite, #F7F2ED);
}

/* ─── Sidebar: Totais ────────────────────────────────────────── */
.senv-cart__totals {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(184,146,74,0.18);
  border-radius: 4px;
  padding: 32px 28px;
  position: sticky;
  top: 100px;
}

.senv-cart__totals-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--senv-offwhite, #F7F2ED);
  margin: 0 0 24px;
  letter-spacing: 0.02em;
}

.senv-cart__totals-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.senv-cart__totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
}

.senv-cart__totals-label {
  color: rgba(226,201,176,0.65);
  display: flex;
  align-items: center;
  gap: 8px;
}

.senv-cart__totals-value {
  color: var(--senv-offwhite, #F7F2ED);
  font-weight: 500;
}

.senv-cart__totals-value--discount { color: #7bc67e; }

.senv-cart__totals-remove-coupon {
  color: rgba(226,201,176,0.4);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.senv-cart__totals-remove-coupon:hover { color: var(--senv-offwhite); }

.senv-cart__totals-row--coupon { border-top: 1px solid rgba(255,255,255,0.04); padding-top: 14px; }

.senv-cart__totals-row--total {
  border-top: 1px solid rgba(184,146,74,0.2);
  padding-top: 14px;
  margin-top: 4px;
}
.senv-cart__totals-row--total .senv-cart__totals-label {
  color: var(--senv-offwhite, #F7F2ED);
  font-weight: 600;
  font-size: 0.95rem;
}
.senv-cart__totals-row--total .senv-cart__totals-value {
  color: var(--senv-gold, #B8924A);
  font-size: 1.1rem;
  font-weight: 700;
}

/* Badge Pix */
.senv-cart__pix-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(184,146,74,0.08);
  border: 1px solid rgba(184,146,74,0.2);
  border-radius: 3px;
  padding: 10px 14px;
  margin-bottom: 20px;
}
.senv-cart__pix-icon { font-size: 1.1rem; }
.senv-cart__pix-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: rgba(226,201,176,0.8);
  line-height: 1.5;
}
.senv-cart__pix-text strong { color: var(--senv-gold, #B8924A); }
.senv-cart__pix-text em {
  font-style: normal;
  color: rgba(226,201,176,0.5);
  font-size: 0.7rem;
}

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

/* Continuar comprando */
.senv-cart__continue {
  display: block;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: rgba(226,201,176,0.5);
  text-decoration: none;
  transition: color 0.2s;
}
.senv-cart__continue:hover { color: var(--senv-offwhite); }

/* ─── Cart Vazio ─────────────────────────────────────────────── */
.senv-cart__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 24px;
  text-align: center;
}

.senv-cart__empty-icon { margin-bottom: 8px; opacity: 0.7; }

.senv-cart__empty-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--senv-offwhite, #F7F2ED);
  margin: 0;
}

.senv-cart__empty-text,
.senv-cart__empty-wishlist {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: rgba(226,201,176,0.6);
  margin: 0;
}
.senv-cart__empty-wishlist a {
  color: var(--senv-gold, #B8924A);
  text-decoration: none;
}
.senv-cart__empty-wishlist a:hover { text-decoration: underline; }

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

/* ─── Cross-sells ────────────────────────────────────────────── */
.senv-cart__collaterals { margin-top: 64px; }
.senv-cart__collaterals .cross-sells > h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--senv-offwhite, #F7F2ED);
  margin-bottom: 24px;
}

/* ─── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .senv-cart__layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .senv-cart__totals { position: static; }
}

@media (max-width: 640px) {
  .senv-cart { padding: 32px 16px 64px; }

  /* Cabeçalho oculto no mobile */
  .senv-cart__head { display: none; }

  /* Cada item vira card */
  .senv-cart__item {
    display: grid;
    grid-template-columns: 80px 1fr;
    grid-template-areas:
      "thumb  info"
      "thumb  price"
      "thumb  qty"
      "remove subtotal";
    gap: 6px 14px;
    padding: 20px 0;
  }

  .senv-cart__item-product { grid-area: thumb / thumb / info / info; }
  .senv-cart__item-thumb   { grid-area: thumb; }
  .senv-cart__item-info    { grid-area: info; }

  .senv-cart__item-price {
    grid-area: price;
    text-align: left;
    font-size: 0.8rem;
    color: rgba(226,201,176,0.6);
  }
  .senv-cart__item-price::before {
    content: attr(data-label) ': ';
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(184,146,74,0.6);
  }

  .senv-cart__item-qty {
    grid-area: qty;
    justify-content: flex-start;
  }

  .senv-cart__item-subtotal {
    grid-area: subtotal;
    text-align: right;
    align-self: end;
    font-size: 0.95rem;
    color: var(--senv-gold, #B8924A);
  }

  .senv-cart__item-remove-desktop { display: none; }
  .senv-cart__item-remove-mobile {
    display: block;
    margin-top: 6px;
  }
  .senv-cart__item-remove-mobile .senv-cart__remove {
    width: auto;
    height: auto;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(226,201,176,0.35);
    border-radius: 0;
  }

  .senv-cart__actions {
    justify-content: flex-end;
  }
  .senv-cart__coupon { max-width: 100%; }

  .senv-cart__totals { padding: 24px 20px; }
}
