@import url("variables.css");

/* =========================
   TOKENS (igual que estilo B)
========================= */
:root {
  --bg: #070a12;
  --panel: rgba(255, 255, 255, 0.06);
  --card: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.1);

  --text: #e8ecff;
  --muted: rgba(232, 236, 255, 0.7);

  --accent: #22d3ee; /* neon cyan */
  --accent2: #a78bfa; /* neon violet */
  --danger: #ff4d6d;

  --shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  --shadowSoft: 0 10px 28px rgba(0, 0, 0, 0.35);

  --radius: 16px;
}

* {
  box-sizing: border-box;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.08), transparent 55%),
    radial-gradient(
      circle at 70% 20%,
      rgba(167, 139, 250, 0.1),
      transparent 55%
    ),
    var(--bg);
  color: var(--text);
}

/* =========================
   CONTENEDOR
========================= */
.carrito {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  background: var(--panel);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.carrito h1 {
  margin-bottom: 30px;
  font-size: 28px;
  text-align: center;
  letter-spacing: 0.2px;
}

.carrito-vacio {
  text-align: center;
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--muted);
}

.carrito-lista {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* =========================
   ITEM CARRITO
========================= */
.carrito-item {
  display: grid;
  grid-template-columns: 1fr 110px 210px;
  align-items: center;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadowSoft);
}

.item-info h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 750;
}

.item-info .variante {
  font-size: 13px;
  color: var(--muted);
}

.precio-unit {
  display: block;
  font-size: 13px;
  color: rgba(232, 236, 255, 0.55);
  margin-top: 4px;
}

/* =========================
   BOTONES INLINE (POST)
========================= */
.form-inline {
  display: inline;
  margin: 0;
  padding: 0;
}

.form-inline button {
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  background: none;
  appearance: none;
  -webkit-appearance: none;
}

/* =========================
   CANTIDAD
========================= */
.item-cantidad {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
}

/* Botones + / - neon */
.btn-cantidad {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--text) !important;

  font-size: 18px;
  line-height: 1;
  transition:
    transform 0.12s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.btn-cantidad:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.cantidad-numero {
  min-width: 22px;
  text-align: center;
}

/* =========================
   SUBTOTAL + QUITAR
========================= */
.item-subtotal {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  text-align: right;
}

.item-subtotal span {
  font-size: 18px;
  font-weight: 900;
}

.btn-quitar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;

  background: rgba(255, 77, 109, 0.95) !important;
  color: #071018 !important;

  border-radius: 10px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;

  border: 1px solid rgba(255, 255, 255, 0.14);
  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}

.btn-quitar:hover {
  transform: scale(1.06);
  filter: brightness(1.05);
}

/* ===============================
   PROMOCIONES - CARRITO
=============================== */
.promo-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(34, 211, 238, 0.95),
    rgba(167, 139, 250, 0.9)
  );
  color: #071018;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.promo-descuento {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 77, 109, 0.95);
  font-weight: 800;
}

/* =========================
   TOTALES
========================= */
.carrito-total {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  font-size: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
}

.carrito-envio,
.carrito-total-final {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 18px;
}

.carrito-total-final {
  font-size: 22px;
  font-weight: 950;
}

/* =========================
   BOTONES PRINCIPALES
========================= */
.carrito-acciones {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  gap: 15px;
}

.btn-principal,
.btn-secundario,
.btn-volver {
  display: inline-block;
  text-align: center;
  padding: 14px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  transition:
    transform 0.12s ease,
    filter 0.12s ease,
    background 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn-principal {
  background: linear-gradient(
    135deg,
    rgba(34, 211, 238, 0.95),
    rgba(167, 139, 250, 0.9)
  );
  color: #071018;
  box-shadow: 0 16px 42px rgba(34, 211, 238, 0.14);
}

.btn-principal:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-secundario {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.btn-secundario:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.btn-volver {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.btn-volver:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

/* =========================
   FORMULARIO DATOS CLIENTE
========================= */
.form-datos {
  margin-top: 35px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: grid;
  gap: 14px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadowSoft);
}

.form-datos label {
  font-size: 14px;
  font-weight: 800;
  color: rgba(232, 236, 255, 0.85);
}

.form-datos input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition:
    outline 0.2s,
    background 0.2s,
    border-color 0.2s;
}

.form-datos input::placeholder {
  color: rgba(232, 236, 255, 0.55);
}

.form-datos input:focus {
  outline: 3px solid rgba(34, 211, 238, 0.3);
  outline-offset: 2px;
  border-color: rgba(34, 211, 238, 0.35);
}

.form-datos button {
  margin-top: 10px;
  cursor: pointer;
  border: none;
}

/* =========================
   ERROR ENVÍO
========================= */
.error-envio {
  margin-top: 10px;
  padding: 10px;
  background: rgba(255, 77, 109, 0.14);
  color: rgba(255, 77, 109, 0.95);
  border-radius: 12px;
  font-size: 0.95rem;
  text-align: center;
  border: 1px solid rgba(255, 77, 109, 0.25);
}

/* ===============================
   ENVÍOS – estilo MercadoPago (DARK)
=============================== */
.envios {
  margin-top: 30px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadowSoft);
  backdrop-filter: blur(14px);
}

.envios h3 {
  margin-bottom: 15px;
  font-size: 18px;
}

.envio-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  cursor: pointer;
  transition:
    border 0.2s,
    background 0.2s,
    transform 0.12s;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.envio-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.envio-card input {
  display: none;
}

.envio-info strong {
  display: block;
  font-size: 15px;
}

.envio-info span {
  font-size: 13px;
  color: var(--muted);
}

.envio-precio {
  font-weight: 900;
  font-size: 15px;
}

.envio-gratis {
  color: rgba(34, 211, 238, 0.95);
}

/* Selección */
.envio-card input:checked + .envio-info,
.envio-card input:checked ~ .envio-precio {
  color: var(--accent);
}

/* Nota: :has no anda en todos los browsers viejos, pero hoy en Chrome/Edge sí. */
.envio-card:has(input:checked) {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.1);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 700px) {
  .carrito {
    margin: 20px;
    padding: 15px;
  }

  .carrito-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .item-cantidad {
    justify-content: flex-start;
  }

  .item-subtotal {
    justify-content: flex-start;
    text-align: left;
  }

  .carrito-acciones {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .promo-badge {
    font-size: 11px;
    padding: 3px 8px;
  }
}

/* =========================
   CUPONES (match tokens)
========================= */
.cupon-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid var(--border);
  box-shadow: var(--shadowSoft);
  backdrop-filter: blur(14px);
}

.cupon-box h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 900;
}

.cupon-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.cupon-form input[type="text"] {
  flex: 1;
  min-width: 220px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-size: 15px;
  outline: none;
}

.cupon-form input[type="text"]:focus {
  outline: 3px solid rgba(34, 211, 238, 0.3);
  outline-offset: 2px;
  border-color: rgba(34, 211, 238, 0.35);
}

.cupon-aplicado {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cupon-bloqueo {
  font-size: 13px;
  color: rgba(255, 195, 70, 0.95);
}

.btn-quitar-cupon {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border-radius: 999px;
  font-weight: 900;
  color: #071018;
  background: rgba(255, 77, 109, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.btn-quitar-cupon:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.carrito-cupon {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  font-size: 18px;
}

.carrito-cupon strong {
  color: rgba(34, 211, 238, 0.95);
}

@media (max-width: 600px) {
  .cupon-form input[type="text"] { min-width: 100%; }
  .btn-quitar-cupon { width: 100%; }
}

