/* =====================================================================
   SKELETON LOADER — Shared Styles (matches actual page CSS)
   ===================================================================== */

/* ── Overlay ─────────────────────────────────────────────────────────── */
/* Visible immediately on page load, dismissed by JS once content is ready */
.page-skeleton-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99999;
  background: #ffffff;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
/* JS adds this to fade out after content loads */
.page-skeleton-overlay.skel-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── Bone (shimmer block) ────────────────────────────────────────────── */
.skel-bone {
  background: linear-gradient(90deg, #eef1f5 25%, #f7f8fa 50%, #eef1f5 75%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
}
@keyframes skel-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* =====================================================================
   HEADER (matches .main-header: bg #28a745, height ~56px)
   ===================================================================== */
.skel-header {
  display: flex;
  align-items: center;
  padding: 8px 2.5%;
  background: #28a745;
  gap: 15px;
  min-height: 56px;
}
.skel-header-menu   { width: 28px; height: 28px; border-radius: 4px; background: rgba(255,255,255,0.3); flex-shrink: 0; }
.skel-header-logo   { width: 110px; height: 40px; border-radius: 4px; background: rgba(255,255,255,0.25); flex-shrink: 0; }
.skel-header-search { width: 600px; height: 40px; border-radius: 4px; background: rgba(255,255,255,0.2); flex-shrink: 1; margin: 0 10px; }
.skel-header-icons  { margin-left: auto; display: flex; gap: 15px; align-items: center; }
.skel-header-icon   { width: 28px; height: 28px; border-radius: 4px; background: rgba(255,255,255,0.25); }


/* =====================================================================
   INDEX.PHP — Category Strip (matches .category-strip)
   ===================================================================== */
.skel-cat-strip {
  display: flex;
  gap: 12px;
  padding: 15px 40px;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid #ddd;
  max-width: 1400px;
  margin: 0 auto;
}
.skel-cat-item { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; width: 90px; }
.skel-cat-circle { width: 75px; height: 75px; border-radius: 50%; }
.skel-cat-label  { width: 60px; height: 9px; border-radius: 3px; }


/* =====================================================================
   INDEX.PHP — Hero Slider (matches .hero-slider: 380px, max-w 1400)
   ===================================================================== */
.skel-hero {
  width: 100%;
  max-width: 1400px;
  height: 380px;
  margin: 10px auto 30px auto;
  border-radius: 8px;
}


/* =====================================================================
   INDEX.PHP — Promo Cards (matches .promo-container)
   ===================================================================== */
.skel-promo-container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1400px;
  margin: 20px auto;
  padding: 0 10px;
}
.skel-promo-card { flex: 1; height: 120px; border-radius: 6px; }


/* =====================================================================
   INDEX.PHP — Section Title
   ===================================================================== */
.skel-section {
  max-width: 1300px;
  margin: 0 auto;
  padding: 40px 20px 20px;
}
.skel-section-title {
  width: 280px; height: 24px; margin: 0 auto; border-radius: 6px;
}
.skel-section-title-left {
  width: 220px; height: 22px; border-radius: 6px; margin: 0;
}


/* =====================================================================
   INDEX.PHP — Premium Stores Banners (matches .stores-container: 3-col grid)
   ===================================================================== */
.skel-banner-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}
.skel-banner-card { height: 180px; border-radius: 8px; }


/* =====================================================================
   INDEX.PHP — Product Row (horizontal scroll cards)
   ===================================================================== */
.skel-product-row {
  display: flex;
  gap: 16px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px 20px;
  overflow: hidden;
}
.skel-product-card {
  flex: 0 0 200px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #f0f0f0;
}
.skel-product-img  { width: 100%; height: 180px; border-radius: 0; }
.skel-product-info { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.skel-product-name { height: 13px; width: 80%; }
.skel-product-price{ height: 13px; width: 50%; }
.skel-product-btn  { height: 34px; width: 100%; border-radius: 20px; margin-top: 4px; }


/* =====================================================================
   INDEX.PHP — Features Bar
   ===================================================================== */
.skel-features-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 16px 20px;
  max-width: 1400px;
  margin: 10px auto;
  background: #fafbfc;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
.skel-feature-item { display: flex; align-items: center; gap: 10px; }
.skel-feature-icon { width: 40px; height: 40px; border-radius: 50%; }
.skel-feature-text { width: 110px; height: 12px; }


/* =====================================================================
   INDEX.PHP — Brands Row
   ===================================================================== */
.skel-brands-row {
  display: flex;
  gap: 20px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 10px 20px 20px;
  overflow: hidden;
}
.skel-brand-item { width: 100px; height: 50px; border-radius: 8px; flex-shrink: 0; }


/* =====================================================================
   INDEX.PHP — Services Grid (6 columns)
   ===================================================================== */
.skel-services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px 20px;
}
.skel-service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 10px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
}
.skel-service-icon  { width: 52px; height: 52px; border-radius: 50%; }
.skel-service-label { width: 70px; height: 11px; }


/* =====================================================================
   INDEX.PHP — Testimonials
   ===================================================================== */
.skel-testimonials {
  display: flex;
  gap: 16px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px 30px;
  overflow: hidden;
}
.skel-testimonial-card {
  flex: 0 0 280px;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.skel-testimonial-header { display: flex; align-items: center; gap: 10px; }
.skel-testimonial-avatar { width: 40px; height: 40px; border-radius: 50%; }
.skel-testimonial-name   { width: 100px; height: 13px; }
.skel-testimonial-text   { width: 100%; height: 11px; }
.skel-testimonial-text2  { width: 85%; height: 11px; }


/* =====================================================================
   PRODUCT DETAIL — Store Bar (matches .pd-store-bar)
   ===================================================================== */
.skel-pd-store-bar {
  background: #f5f5f5;
  padding: 10px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}
.skel-pd-store-name { width: 180px; height: 16px; }
.skel-pd-store-stars { width: 100px; height: 14px; }

/* Two-Column Hero (matches .pd-hero) */
.skel-pd-hero {
  display: flex;
  gap: 30px;
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 30px;
}
.skel-pd-left  { flex: 1; max-width: 500px; }
.skel-pd-right { flex: 1; }

.skel-pd-main-img { width: 100%; height: 400px; border-radius: 10px; margin-bottom: 14px; }
.skel-pd-thumbs   { display: flex; gap: 10px; }
.skel-pd-thumb    { width: 70px; height: 70px; border-radius: 6px; flex-shrink: 0; }

.skel-pd-title       { width: 90%; height: 26px; margin-bottom: 12px; }
.skel-pd-desc-line   { width: 100%; height: 13px; margin-bottom: 6px; }
.skel-pd-desc-line2  { width: 75%; height: 13px; margin-bottom: 16px; }
.skel-pd-meta-line   { width: 60%; height: 13px; margin-bottom: 8px; }
.skel-pd-price       { width: 200px; height: 28px; margin: 10px 0 15px; border-radius: 4px; }
.skel-pd-dropdown    { width: 100%; height: 42px; margin-bottom: 12px; border-radius: 8px; }
.skel-pd-qty-row     { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.skel-pd-qty-btn     { width: 40px; height: 40px; border-radius: 6px; }
.skel-pd-qty-input   { width: 80px; height: 40px; border-radius: 6px; }
.skel-pd-total       { width: 250px; height: 16px; margin-bottom: 18px; }
.skel-pd-pincode-row { display: flex; gap: 10px; margin-bottom: 18px; }
.skel-pd-pincode-input { flex: 1; height: 42px; border-radius: 6px; }
.skel-pd-pincode-btn   { width: 100px; height: 42px; border-radius: 6px; }
.skel-pd-action-row  { display: flex; gap: 12px; margin-bottom: 12px; }
.skel-pd-btn         { flex: 1; height: 44px; border-radius: 20px; }
.skel-pd-btn-full    { width: 100%; height: 44px; border-radius: 8px; margin-bottom: 10px; }

/* Tabs (matches .pd-tabs-container) */
.skel-pd-tabs {
  max-width: 1200px;
  margin: 20px auto 0;
  padding: 0 30px;
}
.skel-pd-tab-nav {
  display: flex;
  gap: 6px;
  border-bottom: 2px solid #eee;
  padding-bottom: 12px;
  margin-bottom: 20px;
  overflow-x: auto;
}
.skel-pd-tab-btn { width: 100px; height: 32px; border-radius: 6px; flex-shrink: 0; }
.skel-pd-tab-content-line  { width: 100%; height: 13px; margin-bottom: 8px; }
.skel-pd-tab-content-line2 { width: 80%; height: 13px; margin-bottom: 8px; }
.skel-pd-tab-content-line3 { width: 60%; height: 13px; }


/* =====================================================================
   STORE PAGE (matches store.css dimensions exactly)
   ===================================================================== */

/* Banner (matches .store-cover-area: 280px) */
.skel-store-banner { width: 100%; height: 280px; border-radius: 0; }

/* Profile Bar (matches .store-profile-bar) */
.skel-store-profile-bar {
  background: #fff;
  padding: 0 5% 30px;
  display: flex;
  align-items: flex-end;
  gap: 30px;
  max-width: 1700px;
  margin: 0 auto;
  position: relative;
}
/* Logo (matches .store-logo-box: 180px circle, margin-top -90px) */
.skel-store-logo {
  width: 180px; height: 180px; border-radius: 50%;
  border: 6px solid #fff;
  flex-shrink: 0;
  margin-top: -90px;
  background: #e2e6ea;
}
.skel-store-info-box  { flex: 1; padding-bottom: 10px; }
.skel-store-name-line { width: 220px; height: 28px; margin-bottom: 10px; }
.skel-store-loc-line  { width: 280px; height: 13px; margin-bottom: 12px; }
.skel-store-stars-line{ width: 120px; height: 14px; }

/* Nav Tabs (matches .store-nav-tabs) */
.skel-store-nav {
  display: flex;
  gap: 15px;
  max-width: 1700px;
  margin: 0 auto;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid #eee;
}
.skel-store-tab { width: 90px; height: 48px; border-radius: 0; flex-shrink: 0; background: linear-gradient(90deg, #eef1f5 25%, #f7f8fa 50%, #eef1f5 75%); background-size: 200% 100%; animation: skel-shimmer 1.5s ease-in-out infinite; }

/* Layout (matches .store-layout: grid 280px 1fr, max-w 1700) */
.skel-store-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  max-width: 1700px;
  margin: 40px auto 0;
  padding: 0 20px;
}
.skel-store-sidebar { }
.skel-store-widget { margin-bottom: 30px; background: #fff; padding: 25px; border-radius: 12px; border: 1px solid #efefef; }
.skel-store-widget-title { width: 80px; height: 14px; margin-bottom: 25px; }
.skel-store-search-input { width: 100%; height: 38px; border-radius: 5px; }
.skel-store-cat-line { width: 100%; height: 13px; margin-bottom: 20px; }

.skel-store-main { }
.skel-store-results-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.skel-store-results-text { width: 180px; height: 14px; }
.skel-store-sort { width: 150px; height: 36px; border-radius: 5px; }

/* Product Grid (matches .store-product-grid: 5-col) */
.skel-store-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
}
.skel-store-product-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
  background: #fff;
}
.skel-store-product-img  { width: 100%; height: 200px; border-radius: 0; }
.skel-store-product-info { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.skel-store-product-name { height: 14px; width: 85%; }
.skel-store-product-stars{ height: 12px; width: 110px; }
.skel-store-product-price{ height: 14px; width: 55%; }
.skel-store-product-vendor { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.skel-store-vendor-logo  { width: 24px; height: 24px; border-radius: 50%; }
.skel-store-vendor-name  { width: 80px; height: 12px; }
.skel-store-product-btn  { height: 36px; width: 100%; border-radius: 20px; margin-top: 4px; }


/* =====================================================================
   MOBILE RESPONSIVE
   ===================================================================== */
@media (max-width: 768px) {
  /* Header */
  .skel-header { padding: 8px 16px; }
  .skel-header-search { display: none; }
  .skel-header-logo { width: 90px; height: 32px; }

  /* Index */
  .skel-cat-strip { padding: 10px 16px; gap: 8px; }
  .skel-cat-item { width: 70px; }
  .skel-cat-circle { width: 55px; height: 55px; }
  .skel-cat-label { width: 50px; }
  .skel-hero { height: 180px; margin: 6px auto 16px; }
  .skel-promo-container { flex-direction: column; padding: 12px 16px; gap: 10px; }
  .skel-promo-card { height: 90px; }
  .skel-section { padding: 20px 16px 10px; }
  .skel-banner-row { grid-template-columns: 1fr; padding: 0 16px; }
  .skel-banner-card { height: 140px; }
  .skel-product-row { padding: 0 16px 14px; gap: 12px; }
  .skel-product-card { flex: 0 0 155px; }
  .skel-product-img { height: 130px; }
  .skel-features-bar { flex-wrap: wrap; gap: 8px; padding: 12px 16px; justify-content: center; }
  .skel-brands-row { padding: 10px 16px; gap: 12px; }
  .skel-brand-item { width: 70px; height: 36px; }
  .skel-services-grid { grid-template-columns: repeat(3, 1fr); padding: 0 16px 14px; gap: 10px; }
  .skel-testimonials { padding: 0 16px 20px; gap: 12px; }
  .skel-testimonial-card { flex: 0 0 240px; }

  /* Product Detail */
  .skel-pd-hero { flex-direction: column; padding: 0 16px; gap: 20px; }
  .skel-pd-left { max-width: 100%; }
  .skel-pd-main-img { height: 260px; }
  .skel-pd-thumb { width: 55px; height: 55px; }
  .skel-pd-store-bar { padding: 10px 16px; }
  .skel-pd-tabs { padding: 0 16px; }

  /* Store */
  .skel-store-banner { height: 200px; }
  .skel-store-profile-bar { padding: 0 16px 20px; flex-direction: column; align-items: center; gap: 15px; }
  .skel-store-logo { width: 120px; height: 120px; margin-top: -60px; }
  .skel-store-info-box { text-align: center; }
  .skel-store-name-line { width: 160px; height: 22px; margin: 0 auto 8px; }
  .skel-store-loc-line { width: 200px; margin: 0 auto 8px; }
  .skel-store-stars-line { margin: 0 auto; }
  .skel-store-nav { gap: 2px; padding: 0 5px; }
  .skel-store-tab { flex: 1; width: auto; height: 40px; }
  .skel-store-layout { grid-template-columns: 1fr; padding: 0 16px; gap: 20px; margin-top: 20px; }
  .skel-store-sidebar { display: none; }
  .skel-store-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .skel-store-product-img { height: 150px; }
}

@media (max-width: 1500px) {
  .skel-store-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1250px) {
  .skel-store-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .skel-store-layout { grid-template-columns: 1fr; }
  .skel-store-sidebar { display: none; }
}
