/* Main container padding to account for fixed topbar */
main {
  padding-top: 50px; /* Match new topbar height */
}

/* =========================================
   HERO SECTION
========================================= */
.hero {
  position: relative;
  /* Make the hero much smaller, like a banner */
  height: 65vh; 
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  overflow: hidden;
}

@media (max-width: 768px) {
  .hero {
    height: 55vh; /* Even shorter on mobile */
  }
}

.hero img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  z-index: 1;
}

/* =========================================
   MARQUEE
========================================= */
.marquee-container {
  background-color: #000;
  color: #fff;
  padding: 8px 0; /* Made smaller */
  overflow: hidden;
  white-space: nowrap;
}

.marquee-content {
  display: inline-block;
  animation: marquee 20s linear infinite;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: none;
}

@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* =========================================
   CATEGORIES SECTION
========================================= */
.categories-section {
  width: 100%;
  margin-top: 2px; /* Thin gap between Hero and Categories */
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px; /* Very thin border effect */
  background: #fff;
}

.category-card {
  position: relative;
  display: block;
  aspect-ratio: 4/5;
  overflow: hidden;
}

.category-card:nth-child(1) {
  grid-column: span 2;
  aspect-ratio: 3/2; /* Wider format for the full-width top item */
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.category-card:hover img {
  transform: scale(1.05);
}

.category-title {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: none;
  z-index: 2;
}

/* Add a subtle dark gradient at the bottom so white text is always visible */
.category-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
  pointer-events: none;
}

/* =========================================
   PRODUCT GRID
========================================= */
.product-section {
  padding: var(--gap-section) 0; /* Edge to edge */
}

.section-title {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 2px;
  margin-bottom: var(--gap-element-lg);
}

/* Product grid styles moved to components.css for global reuse */

/* =========================================
   REELS / SHORTS SECTION (Hypertown Style)
========================================= */
.reels-section {
  position: relative;
  width: 100%;
  padding: var(--gap-section) 0;
  background: #fff;
  overflow: hidden;
}

@media (max-width: 768px) {
  .reels-section {
    padding: var(--gap-section-sm) 0;
  }
}

.discover-btn-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: var(--gap-element-lg);
}

.btn-discover {
  border: 1px solid #000;
  padding: 10px 24px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #000;
  text-transform: none;
  letter-spacing: 1px;
  background: transparent;
  transition: all 0.3s ease;
}

.btn-discover:hover {
  background: #000;
  color: #fff;
}

.reels-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: 8px; /* Tighter gap like screenshot */
  /* Padding to center 75vw item on mobile */
  padding: 0 12.5vw; 
}

/* Hide scrollbar for seamless look */
.reels-container::-webkit-scrollbar {
  display: none;
}
.reels-container {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.reel-item {
  flex: 0 0 75vw; /* Take up 75% of viewport width */
  max-width: 320px; 
  aspect-ratio: 9/16; 
  scroll-snap-align: center;
  position: relative;
  background: #000;
  border-radius: 0; /* Sharp edges like screenshot */
  overflow: hidden;
}

.mute-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  color: #fff;
  font-size: 1.2rem;
  z-index: 10;
  opacity: 0.8;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  pointer-events: none;
}

.reel-item video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none; /* Prevents controls from showing up */
}

/* Bottom Gradient Overlay & Marquee */
.reels-bottom-marquee {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px 0 15px 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
}

.marquee-content-small {
  display: inline-block;
  animation: marquee 25s linear infinite;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 1px;
  opacity: 0.9;
}

@media (min-width: 768px) {
  .reels-container {
    padding: 0 calc(50% - 160px); 
  }
}

/* =========================================
   DYNAMIC HOME PAGE STYLES (SSR & CSR)
========================================= */

/* Skeleton Loader Animation */
.skeleton-loader {
  background: #e2e8f0;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite linear;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Hero Slider */
.hero-slider-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}

.hero-slide.active {
  opacity: 1;
  z-index: 2;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* YouTube Reels Embed */
.reel-item iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  pointer-events: auto; /* Allow interactions for YouTube player */
}

