/* ═══════════════════════════════════════════════════════════════════════════
   TOQ.AR — Carrito: drawer, overlay, icono, checkout OTP
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Icono carrito en navbar ─────────────────────────────────────────────── */
.cart-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--color-text, #1A1A1A);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background .18s;
}
.cart-btn:hover { background: rgba(0,0,0,.06); }
.cart-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  background: #0066FF;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity .2s, transform .2s;
}
.cart-badge.visible {
  opacity: 1;
  transform: scale(1);
}

/* ── Overlay fondo ───────────────────────────────────────────────────────── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ── Drawer lateral ──────────────────────────────────────────────────────── */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100vw;
  height: 100dvh;
  background: #fff;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,.12);
}
.cart-drawer.open {
  transform: translateX(0);
}

/* Header del drawer */
.cart-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 20px;
  border-bottom: 1px solid #EBEBEB;
  flex-shrink: 0;
}
.cart-drawer__title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: #1A1A1A;
}
.cart-drawer__close {
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  transition: color .15s, background .15s;
}
.cart-drawer__close:hover { color: #1A1A1A; background: #F0F0F0; }

/* Body del drawer */
.cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

/* Estado vacío */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 16px;
  color: #aaa;
  text-align: center;
}
.cart-empty svg { color: #ddd; }
.cart-empty p {
  font-size: 15px;
  font-weight: 600;
  color: #bbb;
  margin: 0;
}
.cart-empty a {
  font-size: 14px;
  font-weight: 700;
  color: #0066FF;
  text-decoration: none;
}
.cart-empty a:hover { text-decoration: underline; }

/* Item del carrito */
.cart-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid #F0F0F0;
}
.cart-item__img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: #F0F5FF;
  flex-shrink: 0;
}
.cart-item__img-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0066FF 0%, #1A1A1A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.3px;
  flex-shrink: 0;
}
.cart-item__info { flex: 1; }
.cart-item__name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.3px;
  color: #1A1A1A;
  margin: 0 0 4px;
}
.cart-item__dur {
  font-size: 12px;
  color: #888;
  font-weight: 600;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.cart-item__price {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: #0066FF;
}
.cart-item__remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #ccc;
  padding: 4px;
  border-radius: 6px;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.cart-item__remove:hover { color: #e53e3e; background: #FFF5F5; }

/* Duracion selector dentro del carrito */
.cart-item__durations {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.dur-chip {
  background: #F0F0F0;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  color: #555;
  cursor: pointer;
  transition: all .15s;
}
.dur-chip:hover { border-color: #0066FF; color: #0066FF; }
.dur-chip.active {
  background: #E8F0FF;
  border-color: #0066FF;
  color: #0066FF;
}
.dur-chip .dur-discount {
  color: #22C55E;
  margin-left: 3px;
}

/* Footer del drawer */
.cart-drawer__foot {
  padding: 20px 28px 28px;
  border-top: 1px solid #EBEBEB;
  flex-shrink: 0;
}
.cart-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.cart-subtotal__label {
  font-size: 14px;
  color: #888;
  font-weight: 500;
}
.cart-subtotal__price {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #1A1A1A;
}
.cart-subtotal__price span {
  font-size: 13px;
  font-weight: 600;
  color: #aaa;
  margin-left: 4px;
}
.btn-checkout {
  display: block;
  width: 100%;
  background: #1A1A1A;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  padding: 16px 24px;
  border-radius: 999px;
  border: 2px solid #1A1A1A;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.btn-checkout:hover {
  background: #0066FF;
  border-color: #0066FF;
}
.cart-more {
  text-align: center;
  margin-top: 14px;
}
.cart-more a {
  font-size: 13px;
  font-weight: 600;
  color: #888;
  text-decoration: none;
}
.cart-more a:hover { color: #0066FF; }

/* ── Checkout: flujo OTP ─────────────────────────────────────────────────── */
.otp-step { display: none; }
.otp-step.active { display: block; }

.checkout-email-form .form-group { margin-bottom: 16px; }
.checkout-email-form input[type="email"],
.checkout-email-form input[type="text"] {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid #DDDDE0;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color .18s;
  box-sizing: border-box;
}
.checkout-email-form input:focus {
  outline: none;
  border-color: #0066FF;
}

.otp-code-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 24px 0;
}
.otp-digit {
  width: 52px;
  height: 60px;
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0;
  border: 2px solid #DDDDE0;
  border-radius: 10px;
  font-family: inherit;
  color: #1A1A1A;
  transition: border-color .18s;
  -moz-appearance: textfield;
}
.otp-digit::-webkit-outer-spin-button,
.otp-digit::-webkit-inner-spin-button { -webkit-appearance: none; }
.otp-digit:focus {
  outline: none;
  border-color: #0066FF;
}
.otp-digit.filled { border-color: #0066FF; background: #F0F5FF; }

.otp-resend {
  text-align: center;
  font-size: 13px;
  color: #888;
  margin-top: 8px;
}
.otp-resend button {
  background: none;
  border: none;
  color: #0066FF;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
}
.otp-resend button:disabled { color: #aaa; cursor: default; }

/* ── Hover overlay en cards de cajas ─────────────────────────────────────── */
.box-card {
  position: relative;
  overflow: hidden;
}
.box-card__hover {
  position: absolute;
  inset: 0;
  background: rgba(26,26,26,.82);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity .22s;
  border-radius: inherit;
}
.box-card:hover .box-card__hover { opacity: 1; }
.box-card__hover .btn-add-cart {
  background: #fff;
  color: #1A1A1A;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .15s;
}
.box-card__hover .btn-add-cart:hover { background: #0066FF; color: #fff; }
.box-card__hover .btn-view-more {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  transition: color .15s;
}
.box-card__hover .btn-view-more:hover { color: #fff; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .cart-drawer { width: 100vw; }
  .otp-code-inputs { gap: 7px; }
  .otp-digit { width: 44px; height: 52px; font-size: 22px; }
}
