/* XANY UI Contract — Header (barra sticky superior) */

/* ─── contenedor header ─── */
.xany-home-header {
  position: sticky;
  top: var(--xany-shell-top-gap);
  z-index: 60;
  width: min(100%, 1820px);
  min-height: 74px;
  margin: 0 auto 22px;
  padding: 12px;
  display: grid;
  grid-template-columns: auto auto minmax(240px, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-radius: 24px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(226,232,240,.94);
  box-shadow: 0 18px 44px rgba(15,23,42,.07);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ─── logo ─── */
.xany-home-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: #111827 !important;
}

.xany-home-logo span {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #ffffff;
  font-weight: 1000;
  box-shadow: 0 12px 24px rgba(109,40,217,.22);
}

.xany-home-logo strong {
  font-size: 19px;
  font-weight: 1000;
  letter-spacing: -.4px;
}

/* ─── nav ─── */
.xany-home-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.xany-home-nav a {
  min-height: 40px;
  padding: 11px 13px;
  border-radius: 14px;
  color: #111827 !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 950;
  transition: .18s ease;
}

.xany-home-nav a:hover,
.xany-home-nav a.is-active {
  color: #6d28d9 !important;
  background: #f5f3ff;
}

/* ─── search ─── */
.xany-home-search {
  position: relative;
}

.xany-home-search span {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 18px;
}

.xany-home-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #e5e7eb !important;
  border-radius: 16px !important;
  padding: 13px 16px 13px 46px !important;
  background: #ffffff !important;
  color: #111827 !important;
  outline: none !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

.xany-home-search input:focus {
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 0 4px rgba(139,92,246,.12) !important;
}

/* ─── search overrides por vista ─── */
.xany-home-v2-platform[data-xany-current-view="games"] .xany-home-search input {
  border-color: rgba(139,92,246,.45) !important;
  box-shadow: 0 0 0 4px rgba(139,92,246,.10) !important;
}

.xany-home-v2-platform[data-xany-current-view="product"] .xany-home-search input {
  border-color: rgba(34,197,94,.42) !important;
  box-shadow: 0 0 0 4px rgba(34,197,94,.10) !important;
}

/* ─── actions area ─── */
.xany-home-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.xany-home-actions .xany-home-shop-clock {
  order: 10;
}

.xany-home-actions .xany-home-icon-btn[data-xany-cart-toggle] {
  order: 20;
}

.xany-home-actions #xanyProfileToggle {
  order: 30;
}

/* ─── icon button ─── */
.xany-home-icon-btn {
  min-height: 46px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none !important;
  box-shadow: 0 12px 24px rgba(15,23,42,.05);
  cursor: pointer;
  transition: .18s ease;
  position: relative;
  width: 46px;
}

.xany-home-header .xany-home-icon-btn[data-xany-cart-toggle] {
  color: #111827 !important;
  font-size: 18px !important;
  line-height: 1 !important;
  overflow: visible !important;
}

/* ─── cart mark (SVG icon) ─── */
.xany-home-cart-mark {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

/* ─── cart badge ─── */
.xany-home-icon-btn [data-xany-cart-badge] {
  position: absolute;
  right: -5px;
  top: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #7c3aed;
  color: #ffffff;
  font-size: 11px;
  font-style: normal;
  font-weight: 1000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ─── shop clock (countdown) ─── */
.xany-home-shop-clock {
  display: none;
  min-height: 42px;
  padding: 4px 10px 5px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  color: #111827;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: default;
  transition: none;
}

.xany-home-v2-platform.is-pavosnow-mode .xany-home-shop-clock {
  display: inline-flex;
}

.xany-home-shop-clock span {
  position: relative;
  z-index: 1;
  color: #64748b;
  font-size: 10px;
  line-height: 1;
  font-weight: 1000;
  text-transform: uppercase;
}

.xany-home-shop-clock strong {
  position: relative;
  z-index: 1;
  color: #111827;
  font-size: 14px;
  line-height: 1.05;
  font-weight: 1000;
  font-variant-numeric: tabular-nums;
}

/* ─── user mini (avatar + nombre) ─── */
.xany-home-user-mini {
  min-height: 46px;
  padding: 6px 10px 6px 6px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  text-decoration: none !important;
  box-shadow: 0 12px 24px rgba(15,23,42,.05);
}

button.xany-home-user-mini {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}

.xany-home-user-mini img {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.xany-home-user-mini strong {
  display: block;
  color: #111827;
  font-size: 13px;
  font-weight: 1000;
}

.xany-home-user-mini small {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

/* ─── hover states ─── */
.xany-home-icon-btn:hover,
.xany-home-user-mini:hover {
  transform: translateY(-2px);
}

/* ─── responsive ─── */
@media (max-width: 1480px) {
  .xany-home-nav {
    display: none;
  }

  .xany-home-header {
    grid-template-columns: auto minmax(240px, 1fr) auto;
  }
}

@media (max-width: 780px) {
  .xany-home-header {
    top: 8px;
    grid-template-columns: 1fr auto;
    gap: 10px;
    min-height: auto;
    border-radius: 20px;
  }

  .xany-home-logo strong {
    font-size: 16px;
  }

  .xany-home-search {
    grid-column: 1 / -1;
    order: 3;
  }

  .xany-home-user-mini div,
  .xany-home-icon-btn:nth-of-type(2):not([data-xany-cart-toggle]) {
    display: none;
  }
}

@media (max-width: 520px) {
  .xany-home-actions {
    gap: 6px;
  }
}
