/* =========================================================
   GUYS WHO FIT — Page Loader / Skeleton  (page-loader.css)
   ---------------------------------------------------------
   Loaded in <head> on every public page (before any JS).
   Shows a full-page skeleton that mimics each page's shape
   while settings + data load from Supabase.

   settings-injector.js calls GTL.revealPage() on success
   or failure. A 4-second safety timeout also auto-reveals.

   Two skeleton variants:
     .skel--listing  → index, browse, collections, occasions,
                        trending, budget, profile
     .skel--detail   → outfit, collection-single, occasion-single
   ========================================================= */

/* ── Veil overlay ──────────────────────────────────────── */
#gtl-page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #FAFAFA;
  overflow: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* ── Shimmer animation ─────────────────────────────────── */
@keyframes gtlShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skel-block {
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    #E8E8E8 25%,
    #F5F5F5 50%,
    #E8E8E8 75%
  );
  background-size: 200% 100%;
  animation: gtlShimmer 1.6s ease-in-out infinite;
}

/* ── Shared inner layout ───────────────────────────────── */
.skel-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header skeleton (shared) ──────────────────────────── */
.skel-header {
  height: 76px;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  max-width: 100%;
}
.skel-header-logo  { width: 120px; height: 18px; border-radius: 6px; }
.skel-header-space { flex: 1; }
.skel-header-nav   { width: 280px; height: 14px; border-radius: 6px; }
.skel-header-btn   { width: 130px; height: 36px; border-radius: 999px; }

/* ══════════════════════════════════════════════════════════
   LISTING VARIANT  (index, browse, collections, occasions,
                     trending, budget, profile)
   ══════════════════════════════════════════════════════════ */

/* Page-hero block */
.skel-hero {
  padding: 56px 24px 48px;
  max-width: 1280px;
  margin: 0 auto;
}
.skel-hero-eyebrow { width: 80px;  height: 12px; border-radius: 6px; margin-bottom: 16px; }
.skel-hero-title   { width: 340px; height: 36px; border-radius: 8px; margin-bottom: 14px; }
.skel-hero-sub     { width: 240px; height: 16px; border-radius: 6px; }

/* Filter bar */
.skel-filters {
  padding: 0 24px 32px;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.skel-filter-pill {
  width: 80px;
  height: 34px;
  border-radius: 999px;
}

/* Card grid */
.skel-grid {
  padding: 0 24px 64px;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 1024px) { .skel-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .skel-grid { grid-template-columns: repeat(2, 1fr); } }

.skel-card { display: flex; flex-direction: column; gap: 12px; }
.skel-card-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
}
.skel-card-tag   { width: 60%;  height: 12px; border-radius: 5px; }
.skel-card-title { width: 85%;  height: 16px; border-radius: 5px; }
.skel-card-price { width: 40%;  height: 13px; border-radius: 5px; }

/* ══════════════════════════════════════════════════════════
   DETAIL VARIANT  (outfit, collection-single, occasion-single)
   ══════════════════════════════════════════════════════════ */

.skel-detail-hero {
  padding: 40px 24px 48px;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 768px) {
  .skel-detail-hero { grid-template-columns: 1fr; gap: 28px; }
}

.skel-detail-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
}

.skel-detail-content { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
.skel-detail-eyebrow { width: 70px;  height: 12px; border-radius: 5px; }
.skel-detail-title   { width: 90%;  height: 32px; border-radius: 8px; }
.skel-detail-sub     { width: 70%;  height: 16px; border-radius: 6px; }
.skel-detail-stat    { width: 55%;  height: 14px; border-radius: 5px; margin-top: 8px; }
.skel-detail-btn     { width: 160px; height: 48px; border-radius: 999px; margin-top: 12px; }
.skel-detail-btn2    { width: 140px; height: 48px; border-radius: 999px; margin-top: 12px; }

.skel-detail-pieces {
  padding: 0 24px 64px;
  max-width: 1280px;
  margin: 0 auto;
}
.skel-detail-section-label {
  width: 160px; height: 14px; border-radius: 5px; margin-bottom: 24px;
}
.skel-piece-list { display: flex; flex-direction: column; gap: 16px; }
.skel-piece-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.skel-piece-thumb { width: 72px; height: 72px; border-radius: 14px; flex-shrink: 0; }
.skel-piece-info  { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.skel-piece-name  { width: 60%; height: 14px; border-radius: 5px; }
.skel-piece-brand { width: 35%; height: 12px; border-radius: 5px; }
.skel-piece-price { width: 120px; height: 36px; border-radius: 999px; margin-left: auto; flex-shrink: 0; }

/* ── Reveal transition ─────────────────────────────────── */
#gtl-page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
