/* Hero Carousel Styles */
.hero-carousel {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.hero-carousel .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 2rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-carousel .slide.active {
  opacity: 1;
}

/*.hero-carousel .slide:nth-child(1) {*/
/*  background-color: #FED7AA;*/
/*}*/

/*.hero-carousel .slide:nth-child(2) {*/
/*  background-color: #FFEDD5;*/
/*}*/

/*.hero-carousel .slide:nth-child(3) {*/
/*  background-color: #FEE2E2;*/
/*}*/

.hero-carousel .slide:nth-child(1) {
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/img/hero-1.jpg');
}

.hero-carousel .slide:nth-child(2) {
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/img/hero-2.jpg');
}

.hero-carousel .slide:nth-child(3) {
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/img/hero-3.jpg');
}

.hero-carousel .slide-content {
  max-width: 800px;
}

.hero-carousel .slide h1 {
  font-size: 3rem;
  /*color: var(--dark-gray);*/
  color: white;
  text-shadow: 2px 2px 4px #8B4513;
  margin-bottom: 1rem;
}

.hero-carousel .slide p {
  /*color: var(--medium-gray);*/
  color: white;
  stroke: #8B4513;
  margin-bottom: 2rem;
  font-size: 1.1rem;
  text-shadow: 2px 2px 4px #8B4513;
}

/*.hero-carousel .slide h1 {*/
/*  color: white;*/
/*  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);*/
/*}*/

/*.hero-carousel .slide p {*/
/*  color: rgba(255, 255, 255, 0.9);*/
/*  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);*/
/*}*/

/* Benefits Section Styles */
.benefits {
  padding: 4rem 2rem;
  background: white;
}

.benefits h2 {
  text-align: center;
  color: var(--dark-gray);
  margin-bottom: 1rem;
  font-size: 2rem;
}

.benefits > p {
  text-align: center;
  color: var(--medium-gray);
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.benefits-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.benefit-card {
  text-align: center;
  padding: 2rem;
  border-radius: 8px;
  background: var(--light-gray);
  transition: transform 0.3s;
}

.benefit-card:hover {
  transform: translateY(-5px);
}

.benefit-card img {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
}

.benefit-card h3 {
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
}

.benefit-card p {
  color: var(--medium-gray);
  font-size: 0.9rem;
}

/* Trending Categories Styles */
.trending {
  padding: 4rem 2rem;
  background: var(--light-gray);
  overflow: hidden;
}

.trending h2 {
  text-align: center;
  color: var(--dark-gray);
  margin-bottom: 2rem;
  font-size: 2rem;
}

.trending-nav {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 3rem;
  /*overflow: hidden;*/
  overflow: visible;
}

.trending-prev,
.trending-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-orange);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  z-index: 10;
}

.trending-prev {
  left: 0;
}

.trending-next {
  right: 0;
}

.trending-prev:hover,
.trending-next:hover {
  background: var(--dark-orange);
}

.categories-grid {
  /*display: grid;*/
  /*grid-template-columns: repeat(3, 1fr);*/
  /*gap: 2rem;*/
  /*margin: 0 auto;*/
  /*transition: transform 0.3s ease-in-out;*/
  width: 100%;
  overflow: hidden;
}

.category-card {
  /*position: relative;*/
  /*height: 300px;*/
  /*width: 100%;*/
  /*max-width: 100%;*/
  /*border-radius: 8px;*/
  /*overflow: hidden;*/
  /*flex: 0 0 calc((100% - 4rem) / 3); !* Display 3 cards with proper gaps *!*/
  /*min-width: calc((100% - 4rem) / 3);*/

  /*cursor: pointer;*/
  /*display: block;*/
  /*text-decoration: none;*/
  position: relative;
  height: 300px;
  width: 340px; /* Fixed width for each card */
  margin-right: 2rem; /* Space between cards */
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0; /* Prevent shrinking */
}

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

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

.category-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  transform: translateY(0);
  transition: transform 0.3s;
}

.category-overlay h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.category-overlay p {
  font-size: 0.9rem;
  opacity: 0.9;
}

.category-card:hover .category-overlay {
  transform: translateY(-5px);
}

/* Add responsive styles for trending section */
@media (max-width: 1024px) {

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    /*grid-template-columns: repeat(2, 1fr);*/
    /*gap: 1.5rem;*/
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    /*grid-template-columns: repeat(2, 1fr);*/
    /*gap: 1.5rem;*/
  }

  .category-card {
    /*flex: 0 0 calc(50% - 1rem);*/
    /*max-width: calc(50% - 1rem);*/
    flex: 0 0 calc((100% - 2rem) / 2); /* Display 2 cards on medium screens */
    min-width: calc((100% - 2rem) / 2);
    width: 300px;
  }
}

@media (max-width: 480px) {
  .categories-grid,
  .products-grid {
    grid-template-columns: 1fr;
  }

  .trending-nav,
  .category-nav {
    /*padding: 0 1.5rem;*/
  }

  .category-card {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    margin-right: 1rem;
  }

  .product-card {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    margin-right: 1rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .categories-wrapper .category-card,
  .products-wrapper .product-card {
    flex: 0 0 calc(100% - 1rem);
    max-width: calc(100% - 1rem);
    width: 100%;
  }

  .categories-wrapper,
  .products-wrapper {
    gap: 1rem;
  }

  .category-card {
    width: calc(100vw - 3rem);
    margin-right: 1rem;
  }
}

@media (max-width: 768px) {
  .categories-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Category Section Styles */
.category-section {
  margin: 4rem 0;
  padding: 0 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.category-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--dark-gray);
}

/* Category Carousel Styles */
.category-carousel {
  position: relative;
  height: 400px;
  width: 100%;
  overflow: hidden;
  background-color: var(--light-gray);
  border-radius: 8px;
  margin-bottom: 2rem;
}

.category-carousel .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.category-carousel .slide.active {
  opacity: 1;
}

.category-carousel .slide-content {
  text-align: center;
  max-width: 800px;
  padding: 0 2rem;
}

.category-carousel .slide-content h2 {
  font-size: 2.5rem;
  /*color: var(--dark-gray);*/
  color: white;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px #8B4513;
}

.category-carousel .slide-content p {
  font-size: 1.1rem;
  /*color: var(--medium-gray);*/
  margin-bottom: 2rem;
  color: white;
  text-shadow: 2px 2px 4px #8B4513;
}

/* Living Room Category Backgrounds */
.category-section:nth-of-type(3) .category-carousel .slide:nth-child(1) {
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/img/living-room.jpg');
}

.category-section:nth-of-type(3) .category-carousel .slide:nth-child(2) {
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/img/living-room-2.jpg');
}

.category-section:nth-of-type(3) .category-carousel .slide:nth-child(3) {
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/img/living-room-3.jpg');
}

/* Bedroom Category Backgrounds */
.category-section:nth-of-type(4) .category-carousel .slide:nth-child(1) {
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/img/bedroom.jpg');
}

.category-section:nth-of-type(4) .category-carousel .slide:nth-child(2) {
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/img/bedroom-2.jpg');
}

.category-section:nth-of-type(4) .category-carousel .slide:nth-child(3) {
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/img/bedroom-3.jpg');
}

/* Office Category Backgrounds */
.category-section:nth-of-type(5) .category-carousel .slide:nth-child(1) {
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/img/office.jpg');
}

.category-section:nth-of-type(5) .category-carousel .slide:nth-child(2) {
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/img/office-2.jpg');
}

.category-section:nth-of-type(5) .category-carousel .slide:nth-child(3) {
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/img/office-3.jpg');
}

/* Featured Products Styles */
.featured-category {
  margin: 4rem 0;
}

.featured-category h3 {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 2rem;
  color: var(--dark-gray);
}

.category-nav {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 3rem;
  overflow: hidden;
}

.nav-prev,
.nav-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-orange);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  z-index: 10;
}

.nav-prev {
  left: 0;
}

.nav-next {
  right: 0;
}

.nav-prev:hover,
.nav-next:hover {
  background: var(--dark-orange);
}

.products-grid {
  /*display: flex;*/
  /*grid-template-columns: repeat(3, 1fr);*/
  /*gap: 2rem;*/
  /*transition: transform 0.3s ease-in-out;*/
  width: 100%;
  overflow: hidden;
}

.product-card {
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s;
  background: white;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-info {
  padding: 1rem;
}

.product-category {
  color: var(--primary-orange);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.product-name {
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.product-price {
  color: var(--medium-gray);
  font-weight: bold;
  margin-bottom: 1rem;
}

.add-to-cart {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary-orange);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

.add-to-cart:hover {
  background: var(--dark-orange);
}

/* Carousel Navigation */
.carousel-nav {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background-color 0.3s;
}

.carousel-indicator.active {
  background: var(--primary-orange);
}

/* Button Styles */
.cta-button,
.slide-button {
  display: inline-block;
  background: var(--primary-orange);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 25px;
  text-decoration: none;
  font-size: 1.1rem;
  transition: background 0.3s;
}

.cta-button:hover,
.slide-button:hover {
  background: var(--dark-orange);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .benefits-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .search-container {
    width: 300px;
  }

  .hero-carousel .slide h1 {
    font-size: 2.5rem;
  }

  .category-carousel {
    height: 350px;
  }

  .category-carousel .slide-content h2 {
    font-size: 2rem;
  }

  .category-nav {
    padding: 0 2rem;
  }

  .categories-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hero-carousel .slide h1 {
    font-size: 2rem;
  }

  .benefits-container {
    grid-template-columns: 1fr;
  }

  .category-carousel {
    height: 300px;
  }

  .category-carousel .slide-content h2 {
    font-size: 1.75rem;
  }

  .category-nav {
    padding: 0 1.5rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* styles for carousel functionality */
.categories-wrapper,
.products-wrapper {
  display: flex;
  transition: transform 0.3s ease-in-out;
  /*width: max-content;*/
  width: 100%;
}

.categories-grid,
.products-grid {
  overflow: hidden;
  width: 100%;
}

.category-card,
.product-card {
  /*flex: 0 0 auto;*/
  /*width: calc(33.333% - 1.33rem);*/
  /*margin-right: 2rem;*/
  flex: 0 0 calc(33.333% - 1.33rem);
  margin-right: 2rem;
  max-width: calc(33.333% - 1.33rem);
  width: calc((1200px - 64px) / 3);
}

/* Modify the navigation button styles */
.trending-prev,
.trending-next,
.nav-prev,
.nav-next {
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

.trending-prev.disabled,
.trending-next.disabled,
.nav-prev.disabled,
.nav-next.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
