/* Bazaario FX Stylesheet (public/css/fx.css) */

/* 1. Toast: bottom center pill, brand bg, white text, 2.2s fade */
.baz-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: var(--brand, #4f46e5);
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 9999px;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.baz-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* 2. Theme toggle button style: small button in header right area */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 9999px;
  border: 1.5px solid var(--border);
  background-color: var(--bg);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--brand);
  color: var(--brand);
  background-color: var(--card);
}

/* 3. Countdown row style: big monospace digits, gradient text */
.countdown-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.countdown-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
[data-countdown],
.countdown-digits {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: var(--grad, linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  line-height: 1.2;
}

/* 4. Heart button: absolute top-right of card 36px */
.wishlist-heart {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--card);
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  cursor: pointer;
  z-index: 10;
  color: var(--muted);
  transition: transform 0.15s ease, color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.wishlist-heart:hover {
  transform: scale(1.12);
  color: #ef4444;
  border-color: #ef4444;
}
.wishlist-heart svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: fill 0.15s ease, stroke 0.15s ease;
  pointer-events: none;
}
.wishlist-heart.active svg,
.wishlist-heart.filled svg {
  fill: #ef4444;
  stroke: #ef4444;
}
.wishlist-heart.active,
.wishlist-heart.filled {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

/* Header wishlist badge and button */
.wishlist-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background-color: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.wishlist-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background-color: var(--card);
}
.wishlist-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background-color: #ec4899;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--card);
  box-shadow: 0 2px 5px rgba(236, 72, 153, 0.35);
  line-height: 1;
}

/* 5. Dark palette ONLY under html[data-theme=dark] selector overriding the :root CSS variables */
html[data-theme=dark] {
  --bg: #0b1020;
  --card: #141a2e;
  --ink: #e5e7eb;
  --muted: #94a3b8;
  --header-bg: #10162a;
  --border: #232d4b;
  --border-light: #182038;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}
html[data-theme=dark] .site-header {
  background-color: #10162a;
  border-bottom-color: #232d4b;
}
html[data-theme=dark] .search-pill:focus-within {
  background-color: #141a2e;
}
/* Subtle card hover glow in dark */
html[data-theme=dark] .pcard:hover,
html[data-theme=dark] .product-card:hover {
  box-shadow: 0 0 18px rgba(79, 70, 229, 0.35), 0 10px 25px -5px rgba(0, 0, 0, 0.6);
  border-color: rgba(79, 70, 229, 0.45);
}

/* Dark coverage pass 2 (inline-white removal + form/chip polish) */
.section-alt { background-color: var(--bg); border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
html[data-theme=dark] .section-alt { background-color: #0e1424; border-color: #1e293b; }
html[data-theme=dark] .chip { background: #141a2e; color: #cbd5e1; border-color: #24304a; }
html[data-theme=dark] .chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
html[data-theme=dark] .form-input,
html[data-theme=dark] .form-textarea,
html[data-theme=dark] .coupon-input,
html[data-theme=dark] select { background: #0b1020; color: var(--ink); border-color: #24304a; }
html[data-theme=dark] .form-card,
html[data-theme=dark] .summary-card { background: var(--card); }
html[data-theme=dark] .cart-row:hover { background: #1a2138; }
html[data-theme=dark] .cart-thumb { background: #0f1526; }
html[data-theme=dark] .breadcrumb, html[data-theme=dark] .section-sub { color: var(--muted); }
