/* Homepage Specific Styles */

/* Banner Wrapper */
.banner-wrapper {
  position: relative;
  overflow: hidden;
  height: 500px;
}

.banner-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.banner-slide.active {
  opacity: 1;
}

/* Original Banner Slide */
.banner-slide.original-banner {
  height: 500px;
  background: #e7e7e7;
}

.banner-slide.original-banner img {
  width: 100%; 
  height: 100%; 
  object-fit: cover;
}

.banner-text {
  position: absolute;
  top: 51%;
  left: 40px;
  transform: translateY(-50%);
  color: white;
  max-width: 460px;
  z-index:2;
}

.banner-text h1 { 
  font-size: 2.4rem; 
  margin-bottom: 15px; 
  font-weight: 700;
}

.banner-text p { 
  font-size: 1.09rem; 
  margin-bottom: 18px;
}

.banner-text a {
  background-color: #ff3737;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  color: white;
  margin-right: 12px;
  display: inline-block;
  margin-bottom: 8px;
}

.banner-text a:hover { 
  background-color: #d12b2b; 
}

/* Premium Auto Parts Banner */
.premium-banner {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  display: flex;
  align-items: center;
}

.premium-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  width: 100%;
  align-items: center;
}

.premium-text {
  color: #fff;
}

.premium-text h1 {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  line-height: 1.1;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.premium-highlight {
  color: #ffd700;
  font-size: 4rem;
  display: block;
  text-shadow: 2px 2px 8px rgba(255, 215, 0, 0.3);
}

.premium-text p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #e0e0e0;
  margin: 0;
}

.premium-products {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
}

.product-showcase {
  position: relative;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.product-showcase:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 36px rgba(211, 47, 47, 0.4);
}

.product-showcase img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  margin-bottom: 10px;
}

.product-label {
  background: #d32f2f;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  width: 100%;
}

/* Banner Navigation */
.banner-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.banner-dot.active {
  background: #d32f2f;
  width: 30px;
  border-radius: 5px;
}

.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(211,47,47,0.8);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  z-index: 10;
}

.banner-arrow:hover {
  background: rgba(211,47,47,1);
}

.banner-arrow.prev {
  left: 20px;
}

.banner-arrow.next {
  right: 20px;
}

/* Featured Brands Carousel */
.featured-products {
  max-width: 1100px;
  margin: 42px auto 0 auto;
  padding: 0 20px;
  position: relative;
}

.featured-title {
  font-size: 2rem;
  color: #d32f2f;
  margin-bottom: 20px;
  font-weight: 700;
  text-align: center;
}

.carousel-container {
  position: relative;
  overflow: hidden;
  margin-bottom: 60px;
}

.products-grid {
  display: flex;
  transition: transform 0.5s ease;
  gap: 32px;
}

.product-card {
  border: 1px solid #d32f2f;
  border-radius: 8px;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  min-height: 180px;
  min-width: 170px;
  cursor: pointer;
  flex-shrink: 0;
}

.product-card img {
  max-width: 140px;
  max-height: 100px;
  object-fit: contain;
  flex-grow: 1;
  margin-bottom: 15px;
}

.product-card h4 {
  color: #d32f2f;
  margin: 0;
  font-weight: 700;
  font-size: 1.2rem;
  text-align: center;
  line-height: 1.2;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
  width: 100%;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(211,47,47,0.8);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.carousel-nav:hover {
  background: rgba(211,47,47,1);
}

.carousel-nav.prev {
  left: -50px;
}

.carousel-nav.next {
  right: -50px;
}

.carousel-container:hover .carousel-nav {
  opacity: 1;
}

/* Best Selling Products */
.best-selling {
  max-width: 1100px;
  margin: 20px auto 0 auto;
  padding: 0 20px;
}

.best-selling-title {
  font-size: 2rem;
  color: #d32f2f;
  margin-bottom: 20px;
  font-weight: 700;
  text-align: center;
}

/* Categories */
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(160px,1fr));
  gap: 20px;
  padding: 0 20px 40px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.category-card {
  border: 1px solid #d32f2f;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
  background: white;
}

.category-card:hover { 
  box-shadow: 0 5px 15px rgba(211,47,47,0.22); 
}

.category-card img {
  max-width: 100%;
  height: 110px;
  object-fit: contain;
  margin-bottom: 10px;
}

.category-card h3 { 
  font-weight: 600; 
  color: #d32f2f; 
}

/* Responsive Homepage */
@media (max-width: 968px) {
  .premium-content {
    grid-template-columns: 1fr;
    padding: 40px 20px;
    text-align: center;
  }
  
  .premium-text h1 {
    font-size: 2.2rem;
  }
  
  .premium-highlight {
    font-size: 3rem;
  }
  
  .premium-products {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .product-showcase {
    width: 150px;
    height: 150px;
  }
}

@media (max-width: 768px) {
  .banner-text { left: 12px; max-width: 90%; }
  .categories { grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); }
  .product-card { min-width: 140px; min-height: 160px; }
  .product-card img { max-width: 120px; max-height: 80px; }
  .product-card h4 { font-size: 1.1rem; }
  .carousel-nav.prev { left: -30px; }
  .carousel-nav.next { right: -30px; }
  .banner-wrapper { height: 600px; }
  .banner-slide.original-banner { height: 600px; }
  .premium-text h1 { font-size: 1.8rem; }
  .premium-highlight { font-size: 2.4rem; }
  .premium-text p { font-size: 1rem; }
  .product-showcase { width: 130px; height: 130px; }
  .banner-arrow { width: 40px; height: 40px; font-size: 18px; }
  .banner-arrow.prev { left: 10px; }
  .banner-arrow.next { right: 10px; }
}
