/* XANY UI Contract — Carrito (cart panel + cart slot) */

/* ─── fallback when pavosnow-cart is not loaded ─── */
.xany-pavosnow-cart-fallback {
  padding: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(30,185,255,.16), transparent 36%),
    rgba(255,255,255,.92);
}

.xany-pavosnow-cart-fallback p {
  margin: 10px 0 14px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 800;
}

.xany-pavosnow-cart-fallback a {
  min-height: 40px;
  border-radius: 14px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  text-decoration: none !important;
  font-size: 12px;
  font-weight: 1000;
}

/* ─── unified-cart container ─── */
.xany-v2-unified-cart {
  padding: 18px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(139,92,246,.18), transparent 35%),
    rgba(255,255,255,.92);
  border: 1px solid rgba(226,232,240,.94);
  box-shadow: 0 18px 44px rgba(15,23,42,.06);
  backdrop-filter: blur(14px);
}

.xany-v2-unified-cart.is-loading {
  opacity: .72;
  pointer-events: none;
}

/* ─── cart slot layout ─── */
.xany-pavosnow-cart-slot {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  position: relative !important;
  inset: auto !important;
  z-index: 1 !important;
}

.xany-home-right .pavosnow-cart-panel,
.xany-home-right .xany-pavosnow-cart-fallback {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

/* ─── cart items ─── */
.xany-v2-cart-items {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.xany-v2-cart-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.xany-v2-cart-item.is-pavos-projection {
  position: relative;
  grid-template-columns: 54px minmax(0, 1fr);
  grid-template-areas:
    "thumb info"
    "thumb price";
  padding-right: 42px;
}

.xany-v2-cart-item.is-pavos-projection .xany-v2-cart-thumb {
  grid-area: thumb;
}

.xany-v2-cart-item.is-pavos-projection .xany-v2-cart-info {
  grid-area: info;
}

.xany-v2-cart-item.is-pavos-projection .xany-v2-cart-price {
  grid-area: price;
  justify-self: start;
  margin-top: -4px;
}

.xany-v2-cart-item.is-pavos-projection .xany-v2-cart-title {
  display: -webkit-box;
  overflow: hidden;
  max-width: 100%;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.xany-v2-cart-item.is-pavos-projection .xany-v2-cart-meta {
  display: none;
}

.xany-v2-cart-thumb {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  overflow: hidden;
  background: #f8fafc;
  color: #6d28d9;
  font-size: 11px;
  font-weight: 1000;
}

.xany-v2-cart-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.xany-v2-cart-info {
  min-width: 0;
}

.xany-v2-cart-info strong,
.xany-v2-cart-info span,
.xany-v2-cart-info small {
  display: block;
}

.xany-v2-cart-info strong {
  color: #111827;
  font-size: 13px;
  line-height: 1.12;
  font-weight: 1000;
}

.xany-v2-cart-info span,
.xany-v2-cart-info small {
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 850;
}

.xany-v2-cart-price {
  color: #111827;
  font-size: 12px;
  font-weight: 1000;
  white-space: nowrap;
}

.xany-v2-cart-item.is-pavos-projection .xany-v2-cart-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  font-size: 0;
  line-height: 1;
}

.xany-v2-cart-item.is-pavos-projection .xany-v2-cart-remove::before {
  content: "x";
  font-size: 15px;
  line-height: 1;
}

.xany-v2-cart-remove {
  min-height: 32px;
  border: 1px solid rgba(239,68,68,.24);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff5f5;
  color: #dc2626;
  font-size: 10px;
  font-weight: 1000;
  cursor: pointer;
}

.xany-v2-cart-empty {
  padding: 16px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.xany-v2-cart-empty strong,
.xany-v2-cart-empty span {
  display: block;
}

.xany-v2-cart-empty strong {
  color: #111827;
  font-size: 13px;
  font-weight: 1000;
}

.xany-v2-cart-empty span {
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.xany-v2-cart-lines {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.xany-v2-cart-line {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.xany-v2-cart-line strong {
  color: #111827;
  text-align: right;
  font-weight: 1000;
}

.xany-v2-cart-total strong {
  color: #7c3aed;
  font-size: 18px;
}

.xany-v2-cart-note {
  margin-top: 12px;
  padding: 12px;
  border-radius: 15px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.xany-v2-cart-note strong,
.xany-v2-cart-note span {
  display: block;
}

.xany-v2-cart-note strong {
  color: #111827;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.xany-v2-cart-note span {
  margin-top: 8px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.5;
  font-weight: 850;
}

.xany-v2-cart-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

.xany-v2-cart-actions a {
  min-height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  font-size: 12px;
  font-weight: 1000;
}

.xany-v2-cart-actions a.is-disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none !important;
}

.xany-v2-cart-final,
.xany-v2-cart-checkout {
  color: #ffffff !important;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 14px 28px rgba(109,40,217,.22);
}

.xany-v2-cart-view {
  color: #6d28d9 !important;
  background: #ffffff;
  border: 1px solid rgba(139,92,246,.24);
}

.xany-v2-cart-trust {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.xany-v2-cart-trust span {
  padding: 8px 10px;
  border-radius: 999px;
  background: #f5f3ff;
  color: #6d28d9;
  font-size: 10px;
  font-weight: 1000;
}

/* ─── cart interaction states ─── */
.xany-v2-unified-cart.is-loading {
  opacity: 1;
  pointer-events: auto;
}

.xany-v2-unified-cart.is-loading::after {
  content: none !important;
  display: none !important;
}

.xany-v2-unified-cart.is-cart-blocking .xany-v2-cart-remove,
.xany-v2-unified-cart.is-cart-blocking .xany-v2-cart-view {
  pointer-events: none;
}

.xany-home-v2-platform .is-cart-action-pending {
  position: static;
  pointer-events: auto;
  opacity: 1;
  transform: none;
}

.xany-home-v2-platform .is-cart-action-pending::after,
.xany-pavosnow-inline .hover-add-btn.is-cart-action-pending::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}

/* ─── #xanyPavosnowCartSlot content overrides ─── */
.xany-home-v2-platform #xanyPavosnowCartSlot > .xany-v2-unified-cart {
  width: 100% !important;
  min-height: 192px !important;
  padding: 18px !important;
  border-radius: 28px !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(248, 250, 252, .90)) !important;
  box-shadow: var(--xany-polish-shadow), inset 0 1px 0 rgba(255, 255, 255, .92) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-sizing: border-box !important;
}

.xany-home-v2-platform #xanyPavosnowCartSlot .xany-widget-head {
  min-height: 62px !important;
  margin: 0 0 14px !important;
  align-items: center !important;
}

.xany-home-v2-platform #xanyPavosnowCartSlot .xany-widget-head strong {
  font-size: 18px !important;
  line-height: 1 !important;
  font-weight: 1000 !important;
}

.xany-home-v2-platform #xanyPavosnowCartSlot .xany-v2-cart-actions {
  margin-top: 10px !important;
}

.xany-home-v2-platform #xanyPavosnowCartSlot .xany-v2-cart-actions a,
.xany-home-v2-platform #xanyPavosnowCartSlot .xany-v2-cart-final,
.xany-home-v2-platform #xanyPavosnowCartSlot .xany-v2-cart-checkout {
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  padding: 0 14px !important;
  border-radius: 16px !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  font-weight: 950 !important;
  transform: none !important;
  box-sizing: border-box !important;
}

/* ─── responsive ─── */
@media (max-width: 520px) {
  .xany-v2-cart-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .xany-v2-cart-remove {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
