/*
 * StayX — System Storefront Styling
 * ─────────────────────────────────────────────────────────────────
 * Brand: StayX (https://stayx.site)
 * Palette: Zinc-950 Dark (#09090B), Purple Accent (#8B5CF6)
 */

/* ── Global Theme CSS Variables Overrides ───────────────────────── */

:root {
  --cl-accent: 139, 92, 246 !important; /* #8B5CF6 StayX Purple */
  --cl-on-accent: 255, 255, 255 !important;
  --radius-card: 12px !important;
  --radius-input: 8px !important;
  --radius-button: 8px !important;
}

/* ── Dark Mode Scheme ───────────────────────────────────────────── */

[data-scheme="dark"] {
  color-scheme: dark !important;
  --cl-background: 9, 9, 11 !important; /* #09090B Zinc 950 */
  --cl-surface: 24, 24, 27 !important; /* #18181B Zinc 900 */
  --cl-surface-raised: 39, 39, 42 !important; /* #27272A Zinc 800 */
  --cl-t-primary: 250, 250, 250 !important; /* #FAFAFA */
  --cl-t-muted: 161, 161, 170 !important; /* #A1A1AA */
  --cl-border: rgba(255, 255, 255, 0.08) !important;
}

/* ── Light Mode Scheme ──────────────────────────────────────────── */

[data-scheme="light"] {
  color-scheme: light !important;
  --cl-background: 250, 250, 250 !important; /* #FAFAFA Zinc 50 */
  --cl-surface: 255, 255, 255 !important; /* #FFFFFF White */
  --cl-surface-raised: 244, 244, 245 !important; /* #F4F4F5 Zinc 100 */
  --cl-t-primary: 9, 9, 11 !important; /* #09090B Zinc 950 */
  --cl-t-muted: 113, 113, 122 !important; /* #71717A Zinc 500 */
  --cl-border: rgba(9, 9, 11, 0.08) !important;
}

/* ── Selection & Custom Scrollbars ──────────────────────────────── */

::selection {
  background: rgba(139, 92, 246, 0.3) !important;
  color: #fafafa !important;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #09090b;
}

::-webkit-scrollbar-thumb {
  background: rgba(161, 161, 170, 0.25);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.5);
}

/* ── Utility Color Overrides ────────────────────────────────────── */

.text-accent-500 {
  color: rgb(139, 92, 246) !important;
}

.bg-accent-500 {
  background-color: rgb(139, 92, 246) !important;
}

.bg-accent-500\/10,
[class*="bg-accent-500/10"] {
  background-color: rgba(139, 92, 246, 0.12) !important;
}

.border-accent-500 {
  border-color: rgba(139, 92, 246, 0.4) !important;
}

.hl-accent {
  color: rgb(139, 92, 246) !important;
}

/* ── Typography & Letter Spacing ────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif !important;
}

h1 { letter-spacing: -0.03em !important; }
h2 { letter-spacing: -0.025em !important; }
h3 { letter-spacing: -0.015em !important; }

/* ── Navbar ─────────────────────────────────────────────────────── */

.sa-navbar-logo > span {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  font-size: 0.85rem !important;
}

.sa-navbar-link {
  font-size: 0.8125rem !important;
  letter-spacing: 0.01em !important;
}

.sa-header.sticky .sa-navbar {
  border-bottom: 1px solid rgba(139, 92, 246, 0.12) !important;
}

/* ── Hero Eyebrow & Badge ───────────────────────────────────────── */

.sa-hero-eyebrow {
  font-family: 'Inter', ui-monospace, monospace !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}

/* ── Primary Action Buttons ─────────────────────────────────────── */

.sa-btn--solid[class*="bg-accent"],
button[class*="bg-accent-500"],
a[class*="bg-accent-500"] {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(139, 92, 246, 0.25) !important;
  transition: all 200ms ease !important;
}

.sa-btn--solid[class*="bg-accent"]:hover,
button[class*="bg-accent-500"]:hover,
a[class*="bg-accent-500"]:hover {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 22px rgba(139, 92, 246, 0.35) !important;
  transform: translateY(-1px) !important;
}

/* ── Product Cards (Uniform Height & Equal Alignment) ───────────── */

.sa-product-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  border-radius: 12px !important;
  transition: border-color 200ms ease, transform 200ms ease !important;
}

.sa-product-card:hover {
  border-color: rgba(139, 92, 246, 0.35) !important;
}

/* Force card inner container to fill available height */
.sa-product-card > div:last-child {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  justify-content: space-between !important;
}

.sa-product-card-title {
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
}

.sa-product-card-stock,
.sa-product-card-stock * {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.sa-product-card-price,
.sa-product-card-price * {
  white-space: nowrap !important;
  font-weight: 700 !important;
}

/* Card footer — fixed alignment, equal height across grid */
.sa-product-card .border-t {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 0.5rem !important;
  margin-top: auto !important;
  padding-top: 0.75rem !important;
}

.sa-product-card .border-t > div:first-child {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.sa-product-card .text-right {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

/* Stack slashed original price neatly under active price */
.sa-product-card .text-right .line-through {
  display: block !important;
  font-size: 0.75rem !important;
  margin-left: 0 !important;
  opacity: 0.55 !important;
  line-height: 1.2 !important;
}

/* ── Footer ─────────────────────────────────────────────────────── */

.sa-footer {
  border-top: 1px solid rgba(139, 92, 246, 0.12) !important;
}

.sa-footer h3,
.sa-footer h4,
.sa-footer .font-heading {
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
}