/* customer/assets/css/index.css */
:root {
  /* Tweak these to fine‑tune the look */
  --hero-center-width: 60vw;
  /* ≈60% center */
  --hero-side-scale: 0.92;
  /* subtle depth for side slides */
  --hero-gap: 16px;
  /* horizontal gap between slides */
}

body {
  background-color: var(--clr-bg);
}

/* --- Full-Screen Loader Styles --- */
.loader-overlay.hide { opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease; }
.loader-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; display: flex; align-items: center; justify-content: center; background-color: rgba(255, 255, 255, 0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 1; visibility: visible; }
.loader-box { background: white; padding: 2rem; border-radius: 1rem; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.loader-text { font-weight: 500; color: #333; }


/* -----------------Hero Section----------------- */
.hero-section {
  width: 100%;
  margin-block: 2rem;
  position: relative;
  padding: 0;
}

.slider-viewport {
  width: 100%;
  overflow: hidden;
}

.slider-track {
  display: flex;
  gap: 1rem;
}

.slider-track.shifting {
  transition: transform 0.5s ease-in-out;
}

.slide {
  flex: 0 0 35%;
  /* smaller than 50%, adjust as needed */
  width: 35%;
  /* ensures consistency */
  aspect-ratio: 16 / 9;
  box-sizing: border-box;
  transform: scale(0.85);
  opacity: 0.6;
  transition: transform 0.5s ease, opacity 0.5s ease;
  cursor: pointer;
}

.slide.active {
  transform: scale(1);
  opacity: 1;
  cursor: default;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
  /* No rounded border */
  box-shadow: none;
  /* No shadow */
}

.slider-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.slider-nav {
  background: transparent;
  color: var(--clr-dark);
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s, color 0.3s;
}

.slider-nav:hover {
  transform: scale(1.2);
  transition: 0.5s, transform 0.3s;
}

.slider-dots {
  display: flex;
  gap: 8px;
}

.slider-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: var(--clr-accent);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  opacity: 0.5;
}

.slider-dots button.active {
  background: var(--clr-primary);
  transform: scale(1.2);
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .slide {
    flex: 0 0 55%;
    width: 55%;
  }
}

@media (max-width: 600px) {
  .slide {
    flex: 0 0 75%;
    width: 75%;
    padding: 0 0.5rem;
  }
}

/* -----------------Product Category Section----------------- */
.product-categories-heading,
.service-heading,
.best-product-heading {
  margin: 4rem auto 2rem auto;
  /* Increased top margin for better spacing */
  padding-block: 1.5rem;
  text-align: center;
  background-color: transparent;
  /* Removed the old background color */
  border: none;
  /* Removed the old top and bottom borders */
}

.product-categories-heading h2,
.service-heading h2,
.best-product-heading h2 {
  color: var(--clr-dark);
  margin-bottom: 0.5rem;
  position: relative;
  /* Anchor for the decorative line */
  display: inline-block;
  /* Ensures the line is only as wide as needed */
  padding-bottom: 1rem;
  /* Creates space for the line below */
}

/* This is the new decorative line */
.product-categories-heading h2::after,
.service-heading h2::after,
.best-product-heading h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background-color: var(--clr-primary);
  /* Olive Green */
  border-radius: 2px;
}

.product-categories-heading p,
.service-heading p,
.best-product-heading p {
  color: var(--clr-gray);
  margin-top: 0.5rem;
  /* Creates space between the line and the subheading */
}

.product-categories {
  width: 90vw;
  margin-inline: auto;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  /* Single column on mobile */
}

.category-card {
  border: 1px solid var(--clr-primary);
  border-radius: 1rem;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.category-image-container {
  justify-items: center;
  padding: 20px;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  flex-shrink: 0;
}

.category-card img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-card:hover img {
  transform: scale(1.05);
}

.category-info {
  padding: 1.5rem;
  text-align: center;
  width: 100%;
}

.category-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--clr-dark);
  margin-bottom: 1rem;
}

.category-browse-link {
  color: var(--clr-primary);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.category-browse-link i {
  transition: transform 0.3s ease;
}

.category-card:hover .category-browse-link i {
  transform: translateX(5px);
}
/* Mobile adjustments */
@media (max-width: 900px) {
  .category-card {
    padding: 0.75rem;          /* reduce padding */
    min-height: 140px;         /* smaller height */
  }

  .category-image-container {
    width: 100px;               /* smaller image */
    height: 100px;
  }

  .category-title {
    font-size: 1rem;           /* smaller title text */
  }

  .category-description {
    font-size: 0.8rem;         /* smaller description text */
  }
}


/* --- Responsive Layout for Desktop --- */
@media (min-width: 59em) {
  .product-categories {
    grid-template-columns: repeat(3, 1fr);
  }

  .category-card {
    flex-direction: row;
    align-items: center;
    text-align: left;
    /* ⭐ NEW: Set a minimum height to ensure all cards are the same tall size */
    min-height: 180px;
  }

  /* ⭐ UPDATED: Image container size reduced */
  .category-image-container {
    width: 120px;
    /* Reduced from 150px */
    height: 120px;
    /* Reduced from 150px */
    border-radius: 1rem 0 0 1rem;
  }
}

/* -----------------Service Section----------------- */
.service-section {
  width: 90vw;
  margin-inline: auto;
  margin-block: 2rem;
  gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}

.service {
  padding: 20px;
  border: 1px solid var(--clr-primary);
  border-radius: 1rem;
  margin-bottom: 1rem;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 1rem;
  transition: 0.5s, transform 0.3s;
  
}

.service:hover{
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.service-img{
  width: 50px;
  height: 50px;
}

.service .service-info h3 {
  color: var(--clr-dark);
  /* UPDATED */
}

.service .service-info p {
  color: var(--clr-gray);
  /* UPDATED */
}

.service .fs-200 {
  font-size: 0.9rem;
}

.service .fs-50 {
  font-size: 0.79rem;
}

@media (min-width:59em) {
  .service-section {
    width: 90vw;
    margin-inline: auto;
    display: grid;
    gap: 5rem;
    grid-template-columns: repeat(4, 1fr);
  }

  .service .fs-200 {
    font-size: 1rem;
  }

  .service .fs-50 {
    font-size: 0.79rem;
  }
}

/* -----------------Best Selling Product Section----------------- */
.best-seller {
  width: 90vw;
  margin-inline: auto;
  display: grid;
  gap: 1.5rem;
  /* Consistent gap */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  /* Fully responsive grid */
}

.best-seller-product {
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  /* Changed from overflow-x */
  background: var(--clr-white);
  border-radius: 1.5rem;
  /* Slightly less rounded for a cleaner look */
  border: 1px solid var(--clr-primary);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.best-seller-product a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.best-seller-product:hover {
  color: var(--clr-primary);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.product-details {
  position: absolute;
  height: 25%;
  place-items: center;
  font-size: 1.5rem;
  --grid-gap: -1rem;
  width: 10%;
  right: 0;
  top: 0;
  border-radius: 0.5rem;
  transform: translateX(120%);
  transition: transform 250ms ease-in-out;
  background-color: #dc2626;
  /* Kept red for brand accent */
}

.best-seller-product:hover .product-details {
  transform: translateX(0%);
}

.best-seller-product>a>img {
  border-radius: 1rem;
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background-color: var(--clr-light);
  margin-bottom: 1rem;
}

.best-seller-product p {
  margin-top: 0.25rem;
  color: var(--clr-dark);
}

.best-seller-product .product-price {
  color: var(--clr-primary);
  font-weight: 700;
  margin-top: auto;
  /* Pushes the price to the bottom */
}

@media (min-width:35em) and (max-width:59em) {
  .best-seller {
    padding-block: 2rem;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width:59em) {
  .best-seller {
    width: 95vw;
    padding-block: 2rem;
    grid-template-columns: repeat(4, 1fr);
  }
}