/* ============================================
   HOME PAGE STYLES
   ============================================ */

.section {
  padding: 32px 0;
}

/* ---------- HERO BANNER (full-bleed promo banner, Flipkart-style) ---------- */
.hero-banner {
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 65%);
  padding: 34px 0 40px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(201,162,75,0.15);
}

.hero-banner::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(201,162,75,0.22) 0%, transparent 70%);
  pointer-events: none;
}

.hero-banner::before {
  content: "";
  position: absolute;
  left: -40px;
  bottom: -80px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(201,162,75,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.hero-flex {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-slides {
  position: relative;
}

.hero-slide {
  display: none;
  animation: hero-fade-in 0.4s ease;
}

/* ---------- Hero canvas slide (drag-designed in admin/banners.html) ----------
   Same % positions as the admin Design Canvas, so whatever was arranged
   there renders identically here. Every banner now carries TWO independent
   layouts - "mobile" and "desktop" - authored separately in the admin panel.
   We render both and let CSS show/hide the right one per breakpoint, at the
   exact same 900px cutoff the rest of the site already uses for desktop. ---------- */
.hero-slide-canvas {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 1.9 / 1;
  /* Container query context: hero text/tag/button below scale off THIS
     box's own width (cqw), not the browser viewport (vw). That's what
     makes the admin's Design Canvas preview pixel-accurate no matter how
     wide the admin's editor panel happens to be. */
  container-type: inline-size;
  container-name: hero-canvas;
}

.hero-slide-canvas.hero-canvas-desktop {
  display: none;
}

@media (min-width: 900px) {
  .hero-slide-canvas.hero-canvas-mobile {
    display: none;
  }
  .hero-slide-canvas.hero-canvas-desktop {
    display: block;
  }
}

.hero-canvas-image {
  position: absolute;
}

.hero-canvas-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-canvas-text {
  position: absolute;
}

/* Tag pill + heading, scaled to the canvas's own width so they never
   overflow, overlap the button, or get cut off - on any screen size. */
.hero-canvas-text .hero-tag {
  font-size: clamp(10px, 3.1cqw, 12px);
  letter-spacing: 1.5px;
  margin-bottom: clamp(7px, 2.4cqw, 14px);
  padding: clamp(3px, 1cqw, 5px) clamp(8px, 2.3cqw, 12px);
  white-space: nowrap;
}

.hero-canvas-text h1 {
  font-family: var(--font-display);
  color: var(--color-white);
  font-size: clamp(15px, 5.4cqw, 34px);
  line-height: 1.28;
  margin: 0;
  overflow-wrap: break-word;
  letter-spacing: 0.2px;
}

.hero-canvas-text h1 span {
  color: var(--color-gold);
}

.hero-canvas-button {
  position: absolute;
}

.hero-canvas-button .btn {
  font-size: clamp(11px, 2.9cqw, 15px);
  padding: clamp(8px, 2.3cqw, 14px) clamp(14px, 4.4cqw, 28px);
  gap: clamp(4px, 1.4cqw, 8px);
}

.hero-canvas-button .btn svg {
  width: clamp(11px, 3cqw, 16px);
  height: clamp(11px, 3cqw, 16px);
  flex-shrink: 0;
}

/* Older browsers without container query support: fall back to viewport
   units so the banner still looks reasonable instead of using default
   (huge, unstyled) heading sizes. */
@supports not (container-type: inline-size) {
  .hero-canvas-text h1 {
    font-size: clamp(18px, 5.6vw, 30px);
  }
  .hero-canvas-text .hero-tag {
    font-size: 11px;
  }
  .hero-canvas-button .btn {
    font-size: 13px;
    padding: 10px 20px;
  }
}

.hero-slide.active {
  display: block;
}

@keyframes hero-fade-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

.hero-content {
  max-width: 480px;
}

.hero-illustration {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  display: none;
}

.hero-illustration svg,
.hero-illustration img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (min-width: 380px) {
  .hero-illustration {
    display: block;
  }
}

@media (min-width: 480px) {
  .hero-illustration {
    width: 140px;
    height: 140px;
  }
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-gold);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.8px;
  margin-bottom: 14px;
  padding: 5px 12px;
  background: rgba(201,162,75,0.10);
  border: 1px solid rgba(201,162,75,0.25);
  border-radius: var(--radius-full);
}

.hero-tag:empty {
  display: none;
}

.hero-content h1 {
  font-family: var(--font-display);
  color: var(--color-white);
  font-size: clamp(20px, 6vw, 25px);
  line-height: 1.32;
  margin: 0 0 20px;
  word-wrap: break-word;
  letter-spacing: 0.2px;
}

.hero-content h1 span {
  color: var(--color-gold);
}

.hero-content .btn {
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-gold);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-content .btn:active {
  transform: scale(0.96);
  box-shadow: 0 3px 10px rgba(201,162,75,0.25);
}

.hero-dots {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}

.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: width 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.hero-dot.active {
  width: 18px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
}

/* ---------- DEAL STRIP (thin promo band under the hero) ---------- */
.deal-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--color-cream);
  border: 1px solid rgba(201,162,75,0.3);
  border-radius: var(--radius-md);
}

.deal-strip-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-gold);
  color: #1a1400;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deal-strip-text {
  flex: 1;
  font-size: 12.5px;
  color: var(--color-text-dark);
}

.deal-strip-text strong {
  color: var(--color-gold);
}

.deal-strip svg {
  flex-shrink: 0;
  color: var(--color-gold);
}

/* ---------- PROMO RIBBON (scrolling offer strip, app-style) ---------- */
.promo-ribbon {
  background: linear-gradient(90deg, #1a1400 0%, #2a2205 100%);
  border-bottom: 1px solid rgba(201,162,75,0.25);
  overflow: hidden;
  padding: 8px 0;
}

.promo-ribbon-track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: promo-scroll 20s linear infinite;
  width: max-content;
}

.promo-ribbon-track span {
  display: inline-flex;
  align-items: center;
  color: var(--color-gold-light);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.promo-ribbon-track span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 20px;
  border-radius: 50%;
  background: var(--color-gold);
  opacity: 0.6;
}

@keyframes promo-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .promo-ribbon-track { animation: none; }
}

/* ---------- QUICK CATEGORY CIRCLES ---------- */
.quick-cat-section {
  padding: 16px 0 4px;
}

.quick-cat-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 2px 2px 6px;
}

.quick-cat-scroll::-webkit-scrollbar {
  display: none;
}

.quick-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  scroll-snap-align: start;
  width: 64px;
  text-align: center;
}

.quick-cat-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,75,0.22) 0%, rgba(201,162,75,0.08) 100%);
  border: 1px solid rgba(201,162,75,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
  overflow: hidden;
}

.quick-cat-item:active .quick-cat-circle {
  transform: scale(0.92);
}

.quick-cat-circle svg {
  width: 24px;
  height: 24px;
}

.quick-cat-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.quick-cat-item span {
  font-size: 11px;
  color: var(--color-text-gray);
  font-weight: 600;
  line-height: 1.25;
}

/* ---------- HORIZONTAL PRODUCT SCROLL (Trending Products) ---------- */
.product-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 2px 2px 8px;
}

.product-scroll::-webkit-scrollbar {
  display: none;
}

.product-card-scroll {
  min-width: 150px;
  max-width: 150px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

@media (min-width: 480px) {
  .product-card-scroll {
    min-width: 170px;
    max-width: 170px;
  }
}

/* ---------- COMPACT EMPTY STATE (home page sections) ---------- */
.empty-state-compact {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 16px 18px;
  background: var(--color-cream);
  border-radius: var(--radius-md);
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
  border: 1px solid rgba(0,0,0,0.03);
}

.empty-state-compact .empty-state-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  margin: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,75,0.22) 0%, rgba(201,162,75,0.08) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state-compact .empty-state-icon svg {
  width: 20px;
  height: 20px;
}

.empty-state-compact .empty-state-text {
  min-width: 0;
}

.empty-state-compact p {
  color: var(--color-text-dark);
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 2px;
}

.empty-state-compact span {
  color: var(--color-text-gray);
  font-size: 11.5px;
  line-height: 1.35;
  display: block;
}

/* ---------- SECTION HEADING ---------- */
.section .section-heading h2 {
  position: relative;
  padding-left: 12px;
}

.section .section-heading h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
}

/* ---------- CATEGORY GRID (Flipkart-style white tiles) ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.category-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 16px 10px;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  border: 1px solid var(--color-border-light);
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.1);
  border-color: rgba(201,162,75,0.4);
}

.category-card:active {
  transform: translateY(-1px) scale(0.97);
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.category-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 10px;
  background: radial-gradient(circle, rgba(201,162,75,0.18) 0%, rgba(201,162,75,0.08) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease;
}

.category-card:active .category-icon {
  transform: scale(0.92);
}

.category-icon svg {
  width: 22px;
  height: 22px;
}

.category-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.category-card h3 {
  color: var(--color-text-dark);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 3px;
}

.category-card p {
  color: var(--color-text-gray);
  font-size: 10.5px;
  line-height: 1.35;
}

/* ---------- TRUST STRIP ---------- */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 18px 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  font-size: 10.5px;
  line-height: 1.3;
  color: var(--color-text-dark);
  font-weight: 600;
}

.trust-item svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ---------- PRODUCT GRID (Best Deals / New Arrivals / Popular Products) ---------- */
.product-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 480px) {
  .product-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- BRAND CAROUSEL (horizontal scroll, Firebase-driven) ---------- */
.brand-scroll-wrap {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin: 0 -2px;
  padding: 2px;
}

.brand-scroll-wrap::-webkit-scrollbar {
  display: none;
}

.brand-chips {
  display: flex;
  gap: 10px;
}

.brand-chip {
  background: var(--color-white);
  color: var(--color-text-dark);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-light);
  padding: 18px 10px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  flex: 0 0 calc((100% - 20px) / 3);
  scroll-snap-align: start;
}

.brand-chip:hover {
  border-color: rgba(201,162,75,0.4);
  box-shadow: 0 6px 14px rgba(0,0,0,0.1);
}

.brand-chip:active {
  transform: scale(0.95);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.skeleton-chip {
  flex: 0 0 calc((100% - 20px) / 3);
}

/* ---------- SHARED CAROUSEL DOTS (used by hero banner + brand carousel) ---------- */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.carousel-dots.hidden {
  display: none;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(201,162,75,0.25);
  border: none;
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.carousel-dot.active {
  width: 18px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
}

/* ---------- SMALL MOBILE REFINEMENTS ---------- */
@media (max-width: 380px) {
  .section {
    padding: 26px 0;
  }

  .category-grid {
    gap: 8px;
  }

  .category-card {
    padding: 14px 8px;
  }

  .category-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
  }

  .category-card h3 {
    font-size: 13px;
  }

  .category-card p {
    font-size: 10px;
  }

  .trust-strip {
    padding: 14px 6px;
    gap: 8px;
  }

  .trust-item {
    font-size: 9.5px;
    gap: 6px;
  }

  .trust-item svg {
    width: 20px;
    height: 20px;
  }

  .brand-chips {
    gap: 8px;
  }

  .brand-chip,
  .skeleton-chip {
    padding: 14px 8px;
    font-size: 12px;
    flex-basis: calc((100% - 16px) / 3);
  }
}

@media (min-width: 380px) and (max-width: 480px) {
  .category-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

}

/* ---------- DESKTOP ---------- */
@media (min-width: 900px) {
  .hero-banner {
    padding: 70px 0;
  }

  .hero-content {
    max-width: 560px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .category-card {
    padding: 28px 20px;
  }

  .trust-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .brand-chip,
  .skeleton-chip {
    flex-basis: calc((100% - 30px) / 4);
  }

  .quick-cat-circle {
    width: 68px;
    height: 68px;
  }

  .quick-cat-circle svg,
  .quick-cat-circle img {
    width: 30px;
    height: 30px;
  }

  .quick-cat-item {
    width: 78px;
  }

  .quick-cat-item span {
    font-size: 12.5px;
  }

  .promo-ribbon-track span {
    font-size: 13px;
  }
}