/* Theme-aware base (variables set in layout.html) */
body.site-themed {
  background-color: var(--site-bg, #FFFFFF);
  color: var(--site-text, #0A0A0A);
}
#site-bg-video-wrap { z-index: -1; }
#site-bg-video { object-fit: cover; width: 100%; height: 100%; }

/* Mizaaj Soles — retail-inspired (Sulafah / Insignia / Clicky patterns) */

html { scroll-behavior: smooth; }
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: #0A0A0A; color: #fff; padding: 12px 20px; z-index: 100;
  font-size: 13px; font-weight: 600;
}
.skip-link:focus { left: 0; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid #0A0A0A;
  outline-offset: 3px;
}

.size-chip {
  border: 1.5px solid #E6E6E4;
  color: #5C5C5C;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  background: #fff;
  transition: border-color .15s, color .15s, background .15s;
}
.size-chip.in-stock,
.peer:checked + .size-chip {
  border-color: #0A0A0A;
  color: #0A0A0A;
  background: #F7F7F5;
}

.box-label {
  border: 1.5px solid #E6E6E4;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,.04);
}
.box-label-row { border-top: 1px solid #E6E6E4; }
.box-label-row:first-child { border-top: none; }
.box-label-cell { border-left: 1px solid #E6E6E4; }
.box-label-cell:first-child { border-left: none; }

.stamp {
  border: 2px solid currentColor;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 10px;
  font-weight: 600;
}

/* ---- Trust / feature cards: subtle lift, replaces flat text-only blocks ---- */
.trust-card {
  transition: box-shadow .3s cubic-bezier(.16,1,.3,1), transform .3s cubic-bezier(.16,1,.3,1), border-color .3s ease;
}
.trust-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 28px -18px rgba(10,10,10,.18), 0 4px 10px -6px rgba(10,10,10,.08);
  border-color: var(--site-accent, #3F6146);
}
@media (prefers-reduced-motion: reduce) {
  .trust-card { transition: none !important; }
  .trust-card:hover { transform: none; }
}

.sneaker-placeholder {
  background: linear-gradient(165deg, #F7F7F5 0%, #EEEEEC 100%);
}

/* Premium product card treatment: soft floor shadow + lift on hover,
   subtle image zoom instead of a static flat box. */
.product-card-media {
  transition: box-shadow .35s cubic-bezier(.16,1,.3,1), transform .35s cubic-bezier(.16,1,.3,1);
  will-change: transform;
}
.product-card:hover .product-card-media {
  transform: translateY(-4px);
  box-shadow: 0 24px 40px -20px rgba(10,10,10,.22), 0 6px 12px -6px rgba(10,10,10,.10);
}
.product-card-img {
  transition: transform .6s cubic-bezier(.16,1,.3,1);
}
.product-card:hover .product-card-img {
  transform: scale(1.06);
}
/* Floor gradient — reads as a soft cast shadow under the shoe rather than
   a flat cutout, without needing per-photo editing. */
.product-card-media::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 22%;
  background: radial-gradient(ellipse at center, rgba(10,10,10,.10) 0%, rgba(10,10,10,0) 72%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
}
.product-card:hover .product-card-media::after {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .product-card-media, .product-card-img, .product-card-media::after {
    transition: none !important;
  }
}

.hero-reveal { opacity: 1; }

/* ---- Scroll reveal system ----
   reveal.js adds `reveal-init` via JS only (never in the HTML/CSS as a
   default-hidden state), so if JS fails to load the page just renders
   normally with no animation — content can never get stuck invisible. */
.reveal-init {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
.reveal-init.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal-init { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---- Page-enter fade (every navigation, since this is a classic
   server-rendered multi-page app, not an SPA) ---- */
#main-content {
  animation: page-fade-in .6s cubic-bezier(.16,1,.3,1);
}
@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  #main-content { animation: none; }
}

/* ---- Hero entrance ----
   Pure CSS keyframes, no JS dependency at all — this guarantees it plays
   on first load, on every browser, and (via the pageshow handler below)
   on back/forward-cache restores too, where JS-driven IntersectionObserver
   reveals can otherwise be skipped because the DOM is restored already
   "settled" instead of re-triggering. */
.hero-anim {
  opacity: 0;
  transform: translateY(22px);
  animation: hero-rise .7s cubic-bezier(.16,1,.3,1) forwards;
}
.hero-anim-1 { animation-delay: .05s; }
.hero-anim-2 { animation-delay: .16s; }
.hero-anim-3 { animation-delay: .28s; }
.hero-anim-4 { animation-delay: .40s; }
@keyframes hero-rise {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-anim { opacity: 1; transform: none; animation: none; }
}

/* ---- Nav link underline sweep ----
   A persistent, always-testable micro-interaction: hover any main nav
   link and a thin underline draws in from the left. */
.nav-link-anim {
  position: relative;
}
.nav-link-anim::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s cubic-bezier(.16,1,.3,1);
}
.nav-link-anim:hover::after {
  transform: scaleX(1);
}
@media (prefers-reduced-motion: reduce) {
  .nav-link-anim::after { transition: none; }
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: .45; }
  50% { opacity: .85; }
}
.skeleton, .skeleton-line, .skeleton-card .skeleton-thumb {
  background: #F0F0EE;
  border: 1px solid #E6E6E4;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
  border-radius: 2px;
}
.skeleton-line { height: .75rem; }
.skeleton-card { display: flex; flex-direction: column; gap: .75rem; }
.skeleton-card .skeleton-thumb { aspect-ratio: 1; width: 100%; }

input, select, textarea { color: #0A0A0A; }
input::placeholder { color: #9A9A9A; }


/* ---- Announcement rotate ---- */
#announcement-text {
  transition: opacity 0.32s ease, transform 0.32s ease;
  opacity: 1;
  transform: translateY(0);
}
#announcement-text.announcement-out {
  opacity: 0;
  transform: translateY(-6px);
}

/* ---- Hero image slider ---- */
.hero-slide {
  opacity: 0;
  transition: opacity 1s ease-in-out;
  will-change: opacity;
}
.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  border: 1.5px solid rgba(255,255,255,0.85);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, width 0.2s;
}
.hero-dot.is-active {
  background: #fff;
  width: 22px;
}

/* ---- Brand marquee (continuous infinite loop) ---- */
.brand-marquee {
  padding: 0;
  overflow: hidden;
}
.brand-marquee-viewport {
  overflow: hidden;
  width: 100%;
  padding: 1.1rem 0;
}
.brand-marquee-track {
  display: flex;
  width: max-content;
  animation: brand-marquee-scroll 40s linear infinite;
  will-change: transform;
}
.brand-marquee:hover .brand-marquee-track {
  animation-play-state: paused;
}
.brand-marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand-marquee-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 2.5rem;
  height: 3rem;
  opacity: 1;
  transition: opacity 0.2s;
  text-decoration: none;
  color: var(--site-text, #0A0A0A);
}
.brand-marquee-item:hover {
  opacity: 1;
}
.brand-marquee-name {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand-marquee-logo {
  max-height: 40px;
  max-width: 130px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: none;
  opacity: 1;
  transition: opacity 0.2s, transform 0.2s;
}
.brand-marquee-item:hover .brand-marquee-logo {
  opacity: 1;
  transform: scale(1.04);
}
@keyframes brand-marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .brand-marquee-track { animation: none; }
  .hero-slide { transition: none; }
}


/* ---- Search modal ---- */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 1rem 1rem;
}
.search-modal.hidden { display: none; }
.search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.45);
  backdrop-filter: blur(4px);
}
.search-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 36rem;
  background: var(--site-bg, #fff);
  border: 1px solid var(--site-border, #E6E6E4);
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
  padding: 1rem 1rem 0.85rem;
}
.search-modal-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.search-modal-icon {
  flex-shrink: 0;
  color: var(--site-muted, #5C5C5C);
}
.search-modal-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--site-text, #0A0A0A);
  padding: 0.6rem 0.25rem;
  outline: none;
}
.search-modal-submit {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.55rem 1rem;
  background: var(--site-text, #0A0A0A);
  color: #fff;
  border: none;
  cursor: pointer;
}
.search-modal-close {
  flex-shrink: 0;
  padding: 0.4rem;
  border: none;
  background: transparent;
  color: var(--site-muted, #5C5C5C);
  cursor: pointer;
}
.search-modal-hint {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: var(--site-muted, #5C5C5C);
  padding-left: 1.75rem;
}

/* ---- Sticky mobile bottom nav ---- */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  background: color-mix(in srgb, var(--site-bg, #fff) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--site-border, #E6E6E4);
  padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
}
.mobile-bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.35rem 0.15rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--site-text, #0A0A0A);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  min-width: 0;
}
.mobile-bottom-nav__badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 18px);
  background: var(--site-accent, #3F6146);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 14px;
  height: 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}
@media (max-width: 767px) {
  body {
    padding-bottom: calc(3.75rem + env(safe-area-inset-bottom, 0px));
  }
}

/* ---- Intro video overlay (v4) ---- */
.site-intro-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  background: #000 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.35s ease;
}
.site-intro-overlay.is-done {
  opacity: 0;
  pointer-events: none;
}
.site-intro-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #000;
  image-rendering: auto;
}
.site-intro-skip {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 0.6rem 1.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.site-intro-skip:hover { background: rgba(255,255,255,0.28); }
body.intro-active { overflow: hidden !important; }

/* ---- Wishlist heart pop ---- */
@keyframes wishlist-pop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.35); }
  60%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}
.wishlist-pop { animation: wishlist-pop .4s cubic-bezier(.16,1,.3,1); }
@media (prefers-reduced-motion: reduce) {
  .wishlist-pop { animation: none !important; }
}

/* ---- Premium button micro-interaction ----
   Buttons across the site rely on Tailwind utility classes for color/layout,
   so this targets the shared shape (px-8/px-5 py-3.x, font-bold, primary
   accent or ink background) without needing every template touched. Adds a
   quick tactile press instead of relying only on hover:scale. */
a.inline-flex.font-bold, button.font-bold, .btn-primary, .quick-view-btn,
button[type="submit"], #add-to-cart-btn, #wishlist-btn {
  transition: transform .15s cubic-bezier(.16,1,.3,1), box-shadow .15s ease, opacity .15s ease;
}
a.inline-flex.font-bold:active, button.font-bold:active, .btn-primary:active,
button[type="submit"]:not(:disabled):active, #add-to-cart-btn:not(:disabled):active, #wishlist-btn:active {
  transform: scale(.97);
}
@media (prefers-reduced-motion: reduce) {
  a.inline-flex.font-bold, button.font-bold, .btn-primary, .quick-view-btn,
  button[type="submit"], #add-to-cart-btn, #wishlist-btn {
    transition: none !important;
  }
}
