:root {
  --primary: hsl(16, 90%, 55%);
  --primary-dark: hsl(16, 90%, 45%);
  --secondary: hsl(174, 62%, 47%);
  --background: hsl(0, 0%, 98%);
  --foreground: hsl(222, 47%, 11%);
  --card: hsl(0, 0%, 100%);
  --border: hsl(214, 32%, 91%);
  --muted: hsl(210, 40%, 96%);
  --muted-foreground: hsl(215, 16%, 47%);
  --success: hsl(142, 71%, 45%);
  --warning: hsl(38, 92%, 50%);
  --destructive: hsl(0, 84%, 60%);
}

/* Hero Slider */
.hero-slider {
  position: relative;
  height: 400px;
  overflow: hidden;
  margin: 10px;
  border-radius: 10px;
}

.slider-container {
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;   /* 🔥 hidden slides cannot be clicked */
}

.slide.active {
  opacity: 1;
  pointer-events: auto;   /* 🔥 only visible slide is clickable */
}

.slide-content {
  height: 100%;
  display: flex;
  align-items: center;
  color: white;
  padding: 0 4rem;
}

.slide-text {
  max-width: 36rem;
}

.slide-text h1 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.slide-text p {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.btn-primary {
  background: white;
  color: var(--primary);
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  display: inline-block;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--muted);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s;
}

.slider-btn:hover {
  transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
  left: 0.3rem;
}

.slider-btn.next {
  right: 0.3rem;
}

.slider-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  width: 2rem;
  background: var(--primary);
  opacity: 0.6;
}

/* Sections */
.section {
  padding: 1rem 0;
}

.section.bg-muted {
  background: var(--muted);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}


/* Rendering the Hero slider image  */

.slide{
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-radius: 10px; /* optional, matches slider */
  overflow: hidden; 
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;

}

/* CATEGORY SECTIONS IN THE HOMEPAGE */

.section-header,
.products-header,
.service-header,
.flashsale-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1px 12px;

  border-radius: 0px;
  margin-bottom: 10px;

  /* REMOVE fixed height */
  min-height: 40px;
}

.section-header {
  background-color: green;
  color: white;
}
.products-header {
  background-color: red;
  color: white;
}
.service-header {
  background-color: orange;
  color: white;
}
.flashsale-header {
  background-color: blue;
  color: white;
}

/* =========================
    Sliders mobile responsiveness
    ========================= */

@media (max-width: 768px) {
  .hero-slider {
    height: 200px;
  }

  .desktop-only {
    display: none;
  }

  h2.section-title {
    font-size: 20px;
  }

  .section-header{
    margin-left: 0px;
    margin-right: 0px;
  }

  .service-header{
    margin-left: 0px;
    margin-right: 0px;
  }
  
  .flashsale-header{
    margin-left: 0px;
    margin-right: 0px;
   }
}


@media (max-width: 768px) {
  .slider-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    height: 100%;
    /* Hide scrollbar for clean look */
    -ms-overflow-style: none;  
    scrollbar-width: none; 
  }

  .slider-container::-webkit-scrollbar {
    display: none;
  }

  .slide {
    position: relative;
    flex: 0 0 100%;
    opacity: 1 !important;
    pointer-events: auto !important;
    scroll-snap-align: start;
    scroll-snap-stop: always; /* Crucial for smooth JS scrolling */
  }

  /* Keep dots visible so auto-slide has a visual indicator */
  .slider-dots {
    display: flex; 
    bottom: 0.5rem; /* Move them up slightly for mobile */
  }

  /* Keep buttons visible or hide them based on preference */
  .slider-btn {
    display:none;
  }
}


