/* =========================
   BASKET
   ========================= */

.vth-basket-page {
  width: min(94vw, 520px);
  margin: 0 auto;
}

.vth-basket {
  position: relative;
  overflow: hidden;

  width: 100% !important;
  min-height: 100vh;
  margin: 0 auto !important;
  padding: 28px 24px !important;

  display: flex;
  flex-direction: column;

  border-left: 1px solid rgba(190, 132, 255, 0.20);
  border-right: 1px solid rgba(190, 132, 255, 0.20);

  background:
    radial-gradient(circle at 12% 0%, rgba(218, 184, 255, 0.12), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(125, 44, 255, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(8, 3, 15, 0.98), rgba(0, 0, 0, 0.99)) !important;

  color: #ffffff !important;

  box-shadow:
    -20px 0 70px rgba(0, 0, 0, 0.55),
    0 0 36px rgba(125, 44, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.vth-basket::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;

  height: 180px;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.055),
      rgba(255, 255, 255, 0.012),
      transparent
    );

  pointer-events: none;
}

.vth-basket::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;

  height: 2px;
  border-radius: 999px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(125, 44, 255, 0.70),
      rgba(218, 184, 255, 0.92),
      rgba(255, 211, 106, 0.34),
      rgba(218, 184, 255, 0.92),
      rgba(125, 44, 255, 0.70),
      transparent
    );

  box-shadow:
    0 0 18px rgba(125, 44, 255, 0.24);

  pointer-events: none;
}

.vth-basket-header,
.vth-basket-summary,
.vth-basket-content,
.vth-basket-checkout {
  position: relative;
  z-index: 2;
}


/* =========================
   PLAYER
   ========================= */

.vth-basket-header {
  margin-bottom: 22px;
  padding-right: 34px;
}

.vth-basket-player {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vth-basket-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 3px;

  border: 1px solid rgba(255, 211, 106, 0.36);
  border-radius: 13px;

  background:
    radial-gradient(circle at 50% 0%, rgba(255, 211, 106, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(34, 10, 62, 0.88), rgba(12, 1, 22, 0.94));

  box-shadow:
    0 0 18px rgba(255, 211, 106, 0.14),
    0 0 26px rgba(125, 44, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  overflow: hidden;
}

.vth-basket-avatar img {
  display: block;

  width: 100%;
  height: 100%;

  border-radius: 9px;

  object-fit: cover;
  image-rendering: pixelated;
}

.vth-basket-player-info {
  min-width: 0;
}

.vth-basket-player-info span {
  display: block;
  margin-bottom: 4px;

  color: #ffd36a;
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0.14em;
  text-transform: uppercase;

  text-shadow:
    0 0 10px rgba(255, 211, 106, 0.26),
    0 0 18px rgba(125, 44, 255, 0.16);
}

.vth-basket-title {
  margin: 0 !important;

  color: #ffffff !important;
  font-size: 22px !important;
  font-weight: 1000 !important;
  line-height: 1.05 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase;

  text-shadow:
    0 0 14px rgba(218, 184, 255, 0.30),
    0 0 26px rgba(125, 44, 255, 0.18) !important;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* =========================
   SUMMARY
   ========================= */

.vth-basket-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;

  margin-bottom: 22px;
}

.vth-basket-summary-item {
  padding: 14px;

  border: 1px solid rgba(190, 132, 255, 0.18);
  border-radius: 16px;

  background:
    radial-gradient(circle at 16% 0%, rgba(218, 184, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(24, 13, 38, 0.54), rgba(7, 5, 12, 0.64));

  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.vth-basket-summary-item span {
  display: block;
  margin-bottom: 5px;

  color: rgba(244, 234, 255, 0.62);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.vth-basket-summary-item strong {
  color: #ffffff;
  font-size: 16px;
  font-weight: 1000;
}

.vth-basket-summary-total strong {
  color: #46dce0;
  text-shadow:
    0 0 10px rgba(70, 220, 224, 0.24),
    0 0 18px rgba(125, 44, 255, 0.14);
}


/* =========================
   ITEMS
   ========================= */

.vth-basket-content {
  flex: 1;
  min-height: 0;
}

.vth-basket-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vth-basket-item {
  position: relative;
  overflow: hidden;

  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;

  padding: 18px;

  border: 1px solid rgba(190, 132, 255, 0.24);
  border-radius: 18px;

  background:
    radial-gradient(circle at 12% 0%, rgba(218, 184, 255, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(24, 13, 38, 0.70), rgba(7, 5, 12, 0.78)) !important;

  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.34),
    0 0 20px rgba(125, 44, 255, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.vth-basket-item::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto 1px;

  height: 42%;
  border-radius: 17px 17px 42px 42px;

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent);

  pointer-events: none;
}

.vth-basket-item-info,
.vth-basket-item-actions {
  position: relative;
  z-index: 2;
}

.vth-basket-item-kicker {
  display: inline-flex;
  margin-bottom: 5px;

  color: #ffd36a;
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vth-basket-item-title {
  margin: 0 0 6px !important;
}

.vth-basket-item-title a {
  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 1000 !important;
  line-height: 1.15 !important;
  text-decoration: none !important;

  text-shadow:
    0 0 12px rgba(218, 184, 255, 0.24),
    0 0 20px rgba(125, 44, 255, 0.16);
}

.vth-basket-options {
  display: grid;
  gap: 4px;

  margin: 0 0 8px !important;
  padding: 0 !important;

  list-style: none !important;
}

.vth-basket-options li {
  color: rgba(244, 234, 255, 0.62);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
}

.vth-basket-options strong {
  color: #ffffff;
  font-weight: 950;
}

.vth-basket-item-price {
  color: #46dce0 !important;
  font-size: 16px !important;
  font-weight: 1000 !important;

  text-shadow:
    0 0 10px rgba(70, 220, 224, 0.22),
    0 0 18px rgba(125, 44, 255, 0.14);
}


/* =========================
   ACTIONS
   ========================= */

.vth-basket-item-actions {
  display: grid;
  grid-template-columns: 116px 42px;
  gap: 10px;
  align-items: center;
}

.vth-basket-quantity {
  display: grid !important;
  grid-template-columns: 34px 1fr 34px !important;
  align-items: center !important;

  width: 116px !important;
  height: 42px !important;

  border: 1px solid rgba(218, 184, 255, 0.34) !important;
  border-radius: 12px !important;

  background:
    linear-gradient(180deg, rgba(16, 7, 28, 0.88), rgba(7, 3, 14, 0.84)) !important;

  overflow: hidden;
}

.vth-basket-adjust {
  width: 34px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;

  border: 0 !important;
  border-radius: 0 !important;

  background: transparent !important;
  color: #ffffff !important;

  font-size: 18px !important;
  font-weight: 1000 !important;
}

.vth-basket-adjust:hover {
  background: rgba(125, 44, 255, 0.20) !important;
}

.vth-basket-quantity-input {
  width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;

  border: 0 !important;
  border-left: 1px solid rgba(218, 184, 255, 0.20) !important;
  border-right: 1px solid rgba(218, 184, 255, 0.20) !important;
  border-radius: 0 !important;

  background: transparent !important;
  color: #ffffff !important;

  font-size: 13px !important;
  font-weight: 1000 !important;
  text-align: center !important;

  outline: none !important;
}

.vth-basket-remove {
  position: relative !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;

  border: 1px solid rgba(255, 92, 92, 0.34) !important;
  border-radius: 12px !important;

  background:
    linear-gradient(180deg, rgba(120, 18, 32, 0.34), rgba(56, 6, 16, 0.52)) !important;

  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-decoration: none !important;

  box-shadow:
    0 0 16px rgba(255, 70, 70, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.vth-basket-remove::before {
  content: "×";

  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;

  transform: translateY(-1px);
}

.vth-basket-remove:hover {
  border-color: rgba(255, 92, 92, 0.78) !important;

  background:
    linear-gradient(180deg, rgba(160, 24, 44, 0.70), rgba(70, 7, 18, 0.86)) !important;

  box-shadow:
    0 0 18px rgba(255, 70, 70, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}


/* =========================
   CHECKOUT
   ========================= */

.vth-basket-checkout {
  margin-top: auto;
  padding-top: 28px;
}

.vth-basket-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 18px;
  padding: 18px;

  border: 1px solid rgba(190, 132, 255, 0.18);
  border-radius: 16px;

  background:
    linear-gradient(180deg, rgba(24, 13, 38, 0.48), rgba(7, 5, 12, 0.56));
}

.vth-basket-total-row span {
  color: #ffffff;
  font-size: 14px;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vth-basket-total {
  color: #46dce0 !important;
  font-size: 25px !important;
  font-weight: 1000 !important;

  text-shadow:
    0 0 12px rgba(70, 220, 224, 0.28),
    0 0 24px rgba(125, 44, 255, 0.16);
}

.vth-basket-checkout-button {
  position: relative;
  overflow: hidden;

  width: 100% !important;
  min-height: 50px !important;
  padding: 0 18px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  border: 1px solid rgba(218, 184, 255, 0.42) !important;
  border-radius: 14px !important;

  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.16), transparent 38%),
    linear-gradient(
      135deg,
      rgba(103, 45, 225, 0.98) 0%,
      rgba(145, 76, 255, 0.98) 58%,
      rgba(226, 178, 83, 0.96) 100%
    ) !important;

  color: #ffffff !important;

  font-size: 13px !important;
  font-weight: 1000 !important;
  letter-spacing: 0.05em !important;
  text-align: center !important;
  text-decoration: none !important;
  text-transform: uppercase !important;

  box-shadow:
    0 12px 26px rgba(125, 44, 255, 0.28),
    0 0 20px rgba(218, 184, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    inset 0 -10px 18px rgba(0, 0, 0, 0.18) !important;

  cursor: pointer !important;
}

.vth-basket-checkout-button::after {
  content: "✦";
  margin-left: 8px;

  color: #fff1b8;
  font-size: 11px;

  text-shadow:
    0 0 8px rgba(255, 211, 106, 0.58),
    0 0 14px rgba(255, 211, 106, 0.24);
}


/* =========================
   EMPTY
   ========================= */

.vth-basket-empty {
  padding: 28px 18px;

  border: 1px solid rgba(190, 132, 255, 0.20);
  border-radius: 18px;

  background:
    radial-gradient(circle at 50% 0%, rgba(218, 184, 255, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(24, 13, 38, 0.58), rgba(7, 5, 12, 0.68));

  text-align: center;
}

.vth-basket-empty span {
  display: inline-flex;
  margin-bottom: 10px;

  font-size: 28px;
}

.vth-basket-empty h4 {
  margin: 0 0 8px;

  color: #ffffff;
  font-size: 20px;
  font-weight: 1000;
}

.vth-basket-empty p {
  margin: 0;

  color: rgba(244, 234, 255, 0.70);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}



/* =========================
   POPUP / MODAL FIX VALTHERIA
   Evita que data-popup deje el carrito como columna negra gigante
   ========================= */

.popup,
.modal,
.store-modal,
#popup,
#modal {
  z-index: 99999 !important;
}

.popup-overlay,
.modal-backdrop,
.store-modal-backdrop {
  background: rgba(0, 0, 0, 0.72) !important;
  backdrop-filter: blur(8px) !important;
}

/* Cuando el basket está dentro de popup/modal, debe comportarse como tarjeta y no como panel 100vh */
.popup .vth-basket-page,
.modal .vth-basket-page,
.store-modal .vth-basket-page,
.popup-content .vth-basket-page,
.modal-content .vth-basket-page,
.store-modal-content .vth-basket-page {
  width: min(92vw, 560px) !important;
  margin: 0 auto !important;
}

.popup .vth-basket,
.modal .vth-basket,
.store-modal .vth-basket,
.popup-content .vth-basket,
.modal-content .vth-basket,
.store-modal-content .vth-basket {
  width: min(92vw, 560px) !important;
  max-width: 560px !important;

  min-height: 0 !important;
  height: auto !important;
  max-height: 82vh !important;

  margin: 0 auto !important;
  padding: 24px !important;

  overflow: hidden auto !important;

  border: 1px solid rgba(190, 132, 255, 0.38) !important;
  border-radius: 24px !important;

  box-shadow:
    0 30px 76px rgba(0, 0, 0, 0.72),
    0 0 38px rgba(125, 44, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* Corrige el texto viejo "Basket is empty" si Tebex lo inyecta fuera del diseño custom */
.popup .basket > p,
.modal .basket > p,
.store-modal .basket > p,
.popup-content .basket > p,
.modal-content .basket > p,
.store-modal-content .basket > p {
  min-height: 140px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  margin: 0 !important;

  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  text-align: center !important;

  background: transparent !important;
}


/* =========================
   POPUP CLOSE FIX
   ========================= */

button[aria-label="Close"],
button[aria-label="Cerrar"],
.close,
.popup-close,
.modal-close,
[data-close],
[data-dismiss],
.tebex-close {
  position: fixed !important;
  top: 14px !important;
  right: 16px !important;
  z-index: 999999 !important;

  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  pointer-events: auto !important;
  cursor: pointer !important;
}


/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 520px) {
  .vth-basket-page {
    width: 100%;
  }

  .vth-basket {
    min-height: 100vh;
    padding: 24px 18px !important;
  }

  .vth-basket-summary {
    grid-template-columns: 1fr 1fr;
  }

  .vth-basket-item {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .vth-basket-item-actions {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .vth-basket-quantity {
    width: 100% !important;
  }

  .popup .vth-basket,
  .modal .vth-basket,
  .store-modal .vth-basket,
  .popup-content .vth-basket,
  .modal-content .vth-basket,
  .store-modal-content .vth-basket {
    width: calc(100vw - 26px) !important;
    max-width: calc(100vw - 26px) !important;
    max-height: 80vh !important;
    padding: 20px 16px !important;
    border-radius: 20px !important;
  }

}
