/* ==============================================================================
   File: pages/index.css
   Description: Homepage with hero, categories, flash sale, featured products
   ============================================================================== */

/* ══════════════════════════════════════════════════
   HOMEPAGE — Daraz-style Dynamic Sections
   ══════════════════════════════════════════════════ */

/* ───── Contained section wrapper ───── */

/* ==============================================================================
   SECTION: Section Wrapper
   ============================================================================== */




.home-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 20px 30px;
}

/* ───── Section header ───── */

/* ==============================================================================
   SECTION: Section Header
   ============================================================================== */




.section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(212,175,55,0.15);
  position: relative;
}
.section-hd::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg,#d4af37,rgba(212,175,55,0.2));
}
.section-hd h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #f0ece4;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.section-hd h2 i { color: #d4af37; font-size: 1.2rem; }
.section-hd .view-all {
  color: #d4af37;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: opacity 0.2s;
}
.section-hd .view-all:hover { opacity: 0.7; }


/* ==============================================================================
   SECTION: Hero Section
   ============================================================================== */




/* ════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, #0d0d0d 0%, #1a1209 55%, #0d0d0d 100%);
  padding: 70px 20px;
}
.hero-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width:992px) {
  .hero-container { grid-template-columns: 1fr; text-align: center; }
  .hero-visual, .hero-divider { display: none; }
}
.hero h1 {
  font-size: clamp(2.4rem,5vw,3.6rem);
  font-weight: 700;
  line-height: 1.1;
}
.hero .new-badge {
  display: inline-block;
  background: rgba(212,175,55,0.1);
  color: #d4af37;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 15px;
}
.hero-sub {
  color: #aaa;
  font-size: 1.1rem;
  max-width: 480px;
  margin: 20px 0 30px;
}
.btn-shop-now {
  background: #d4af37;
  color: #111;
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}
.btn-shop-now:hover {
  background: #c9a05f;
  transform: translateY(-2px);
}
.hero-divider {
  width: 2px;
  height: 320px;
  background: linear-gradient(to bottom, transparent, #d4af37, transparent);
  border-radius: 50px;
  box-shadow: 0 0 12px rgba(212,175,55,0.3);
}
.hero-visual img {
  width: 100%;
  max-width: 480px;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}


/* ==============================================================================
   SECTION: Shop By Category
   ============================================================================== */




/* ════════════════════════════════════════════════
   SHOP BY CATEGORY
   ════════════════════════════════════════════════ */
.cat-section-wrap {
  max-width: 1240px;
  margin: 50px auto;
  padding: 0 20px;
}
.cat-hd {
  margin-bottom: 28px;
  position: relative;
}
.cat-hd h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cat-hd h2 i { color: #d4af37; }
.cat-hd p {
  margin: 0;
  color: #888;
  font-size: 0.85rem;
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.cat-card {
  background: #111;
  border: 1px solid #1f1f1f;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: white;
  transition: all 0.35s ease;
}
.cat-card:hover {
  transform: translateY(-5px);
  border-color: #d4af37;
  box-shadow: 0 12px 30px rgba(212,175,55,0.08);
}
.cat-card-img {
  width: 100%;
  height: 165px;
  object-fit: cover;
  transition: transform 0.4s;
}
.cat-card:hover .cat-card-img { transform: scale(1.05); }
.cat-card-placeholder {
  height: 165px;
  background: linear-gradient(135deg,#1a1a1a,#0d0d0d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.cat-card-body {
  padding: 14px 18px;
  position: relative;
}
.cat-card-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg,transparent,#d4af37,transparent);
  opacity: 0;
  transition: opacity 0.35s;
}
.cat-card:hover .cat-card-body::before { opacity: 0.4; }
.cat-card-body h4 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 600;
}
.cat-card-body p {
  margin: 0;
  color: #888;
  font-size: 0.82rem;
}


/* ==============================================================================
   SECTION: Mega Banner
   ============================================================================== */




/* ════════════════════════════════════════════════
   MEGA BANNER
   ════════════════════════════════════════════════ */
.mega-banner-wrap {
  max-width: 1240px;
  margin: 0 auto 10px;
  padding: 0 20px;
  border-radius: 14px;
}
.mega-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 2.8 / 1;
  background: #0d0d0d;
  border-radius: 14px;
  overflow: hidden;
}
.mega-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: scale(0.97);
  pointer-events: none;
}
.mega-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  z-index: 2;
}
.mega-slide-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,#0d0d0d 0%,#1a1209 50%,#0d0d0d 100%);
}
.mega-slide-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
  width: 100%;
  padding: 40px 50px;
}
.mega-text h3 {
  font-size: clamp(1.4rem,2.5vw,2rem);
  font-weight: 700;
  color: #f0ece4;
  margin: 0 0 10px;
  line-height: 1.2;
}
.mega-text .mega-cat {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #d4af37;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}
.mega-text .mega-desc {
  color: #aaa;
  font-size: 0.88rem;
  margin: 0 0 18px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mega-text .mega-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: #d4af37;
  display: block;
  margin-bottom: 16px;
}
.mega-text .mega-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #d4af37;
  color: #0d0d0d;
  padding: 10px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.3s;
}
.mega-text .mega-btn:hover {
  background: #c9a05f;
  transform: translateY(-2px);
}
.mega-image { display: flex; justify-content: center; align-items: center; }
.mega-image img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}
.mega-image .mega-placeholder {
  width: 200px; height: 200px;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
  background: rgba(212,175,55,0.05);
  border-radius: 50%;
}
.mega-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}
.mega-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none; cursor: pointer;
  transition: all 0.3s;
}
.mega-dot.active {
  background: #d4af37;
  width: 28px;
  border-radius: 10px;
}
.mega-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.08);
  color: #f0ece4;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mega-arrow:hover { background: #d4af37; color: #0d0d0d; }
.mega-arrow.prev { left: 20px; }
.mega-arrow.next { right: 20px; }


/* ==============================================================================
   SECTION: Flash Sale
   ============================================================================== */




/* ════════════════════════════════════════════════
   FLASH SALE — Daraz Orange
   ════════════════════════════════════════════════ */
.flash-sale-wrap {
  background: linear-gradient(135deg,#1f0f0a,#0d0d0d);
  border: 1px solid rgba(245,114,36,0.15);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 0 30px;
  position: relative;
  overflow: hidden;
}
.flash-sale-wrap::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(245,114,36,0.04), transparent 60%);
  pointer-events: none;
}
.flash-hd {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.flash-hd h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #f57224;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 20px rgba(245,114,36,0.3);
}
.flash-hd h2 i { font-size: 1.3rem; }
.flash-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #f0ece4;
  font-weight: 600;
}
.flash-timer .tm-block {
  background: #1a0a05;
  border: 1px solid rgba(245,114,36,0.3);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #f57224;
  min-width: 32px;
  text-align: center;
}
.flash-timer .tm-sep { color: #555; font-weight: 700; }


/* ==============================================================================
   SECTION: Best Deals
   ============================================================================== */




/* ════════════════════════════════════════════════
   BEST DEALS — Daraz Teal
   ════════════════════════════════════════════════ */
.best-deals-wrap {
  background: linear-gradient(135deg,#0a1210,#0d0d0d);
  border: 1px solid rgba(46,196,182,0.12);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 0 30px;
  position: relative;
}
.best-deals-wrap .section-hd h2 { color: #2ec4b6; }
.best-deals-wrap .section-hd h2 i { color: #2ec4b6; }
.best-deals-wrap .section-hd::after { background: linear-gradient(90deg,#2ec4b6,rgba(46,196,182,0.2)); }


/* ==============================================================================
   SECTION: Horizontal Scroll Row
   ============================================================================== */




/* ════════════════════════════════════════════════
   HORIZONTAL SCROLL ROW
   ════════════════════════════════════════════════ */
.h-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 8px;
  scrollbar-width: thin;
  scrollbar-color: #d4af37 transparent;
}
.h-scroll::-webkit-scrollbar { height: 4px; }
.h-scroll::-webkit-scrollbar-track { background: transparent; }
.h-scroll::-webkit-scrollbar-thumb { background: #d4af37; border-radius: 10px; }

.h-scroll .h-card {
  flex: 0 0 auto;
  width: 185px;
  scroll-snap-align: start;
  background: #111;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.h-scroll .h-card:hover {
  transform: translateY(-4px);
  border-color: #d4af37;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}
.h-card .hc-img {
  aspect-ratio: 1;
  background: #1a1a1a;
  position: relative;
  overflow: hidden;
}
.h-card .hc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.h-card:hover .hc-img img { transform: scale(1.08); }
.h-card .hc-img .hc-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}
.hc-badge.sale { background: #f57224; color: #fff; }
.hc-badge.new  { background: #2ec4b6; color: #fff; }
.hc-badge.hot  { background: #ef4444; color: #fff; }
.hc-badge.low  { background: #d4af37; color: #0d0d0d; }
.h-card .hc-body { padding: 10px 12px; }
.hc-body .hc-cat {
  font-size: 0.62rem;
  color: #d4af37;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.hc-body .hc-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f0ece4;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.2em;
  margin-bottom: 6px;
}
.hc-body .hc-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: #d4af37;
}
.hc-body .hc-rating {
  font-size: 0.65rem;
  color: #e8c97e;
  margin-top: 2px;
}
.hc-body .hc-stock {
  font-size: 0.65rem;
  color: #ef4444;
  font-weight: 600;
  margin-top: 4px;
}


/* ==============================================================================
   SECTION: Featured Grid
   ============================================================================== */




/* ════════════════════════════════════════════════
   FEATURED — Grid with action buttons
   ════════════════════════════════════════════════ */
.feat-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 20px 100px;
}
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.fcard {
  background: #111;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
}
.fcard:hover {
  transform: translateY(-6px);
  border-color: #d4af37;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}
.fcard-img {
  position: relative;
  aspect-ratio: 1;
  background: #1a1a1a;
  overflow: hidden;
}
.fcard-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.fcard:hover .fcard-img img { transform: scale(1.06); }
.fcard-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #d4af37;
  color: #111;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}
.fcard-body { padding: 14px 16px; }
.fcard-cat {
  font-size: 0.68rem;
  color: #d4af37;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.fcard-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f0ece4;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
  margin-bottom: 10px;
}
.fcard-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.fcard-price {
  font-size: 1.25rem;
  color: #d4af37;
  font-weight: 700;
}
.fcard-actions { display: flex; gap: 6px; }
.fcard-fav, .fcard-cart {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}
.fcard-fav {
  background: #222;
  color: #ccc;
  border: 1px solid #333;
}
.fcard-fav:hover { background: #333; color: #ef4444; }
.fcard-fav.favorited { background: rgba(239,68,68,0.15); color: #ef4444; border-color: #ef4444; }
.fcard-cart {
  background: #d4af37;
  color: #111;
  border: none;
}
.fcard-cart:hover { background: #c9a05f; }

/* Load More */

/* ==============================================================================
   SECTION: Load More
   ============================================================================== */




.btn-load-more {
  background: transparent;
  color: #d4af37;
  border: 2px solid #d4af37;
  padding: 12px 50px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}
.btn-load-more:hover {
  background: #d4af37;
  color: #111;
}
.btn-load-more:disabled { opacity: 0.5; cursor: default; }
.load-more-wrap { text-align: center; margin-top: 55px; }

.hidden-product { display: none; }


/* ==============================================================================
   SECTION: Discount Badges
   ============================================================================== */




/* ════════════════════════════════════════════════
   DISCOUNT BADGES & ORIGINAL PRICE
   ════════════════════════════════════════════════ */
.hc-oprice {
  font-size: 0.75rem;
  color: #888;
  text-decoration: line-through;
  margin-right: 6px;
  font-weight: 500;
}
.hc-price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}
.hc-badge.sale {
  background: #f57224 !important;
  color: #fff !important;
  font-size: 0.65rem !important;
  padding: 3px 7px !important;
  border-radius: 4px !important;
}
.fcard-badge.sale-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #f57224;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}
.fcard-price { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }


/* ==============================================================================
   SECTION: Seller Inspiration
   ============================================================================== */




/* ═══ SELLER INSPIRATION — "You Can Do This Too" ═══ */
.seller-inspire-section { margin-top: 10px; }
.inspire-wrap {
  background: linear-gradient(135deg, #0e0e0e 0%, #141414 50%, #0e0e0e 100%);
  border: 1px solid #1f1f1f;
  border-radius: 16px;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
}
.inspire-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #d4af37, #f59e0b, #d4af37, transparent);
}
.inspire-header { text-align: center; margin-bottom: 20px; }
.inspire-badge {
  display: inline-block;
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.2);
  color: #d4af37;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.inspire-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: #f0ece4;
  margin: 0 0 8px;
}
.inspire-sub { color: #888; font-size: 0.88rem; margin: 0; }
.inspire-sub strong { color: #f0ece4; }

.inspire-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.inspire-stat {
  text-align: center;
  background: #0e0e0e;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  padding: 14px 24px;
  min-width: 120px;
}
.inspire-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: #f0ece4;
  font-family: 'Playfair Display', serif;
}
.inspire-lbl {
  font-size: 0.6rem;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-top: 2px;
}

.inspire-products { margin-bottom: 24px; }
.inspire-label {
  font-size: 0.78rem;
  color: #aaa;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.inspire-label i { color: #ef4444; }

.inspire-card { position: relative; }
.inspire-card .hc-seller {
  font-size: 0.65rem;
  color: #d4af37;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.inspire-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(212,175,55,0.04);
  border: 1px solid rgba(212,175,55,0.12);
  border-radius: 12px;
  padding: 20px 24px;
  flex-wrap: wrap;
}
.inspire-cta-text h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: #f0ece4;
  margin: 0 0 4px;
}
.inspire-cta-text p { color: #888; font-size: 0.82rem; margin: 0; }
.inspire-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #d4af37;
  color: #0d0d0d;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.inspire-btn:hover { background: #e0b940; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(212,175,55,0.25); }


/* ==============================================================================
   SECTION: Responsive
   ============================================================================== */




/* ════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .mega-slide-content {
    grid-template-columns: 1fr;
    padding: 20px 24px;
    text-align: center;
  }
  .mega-image { display: none; }
  .mega-banner { aspect-ratio: 1.2 / 1; }
  .mega-arrow { width: 34px; height: 34px; font-size: 0.9rem; }
  .mega-arrow.prev { left: 8px; }
  .mega-arrow.next { right: 8px; }
  .h-scroll .h-card { width: 155px; }
  .flash-hd { flex-direction: column; align-items: flex-start; }
  .section-hd h2 { font-size: 1.1rem; }
  .feat-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
  .fcard-price { font-size: 1rem; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
}


