/* === Custom Product Carousel === */
.custom-product-carousel {
  background: #fff;
  padding: 30px;
  border-top: 4px solid rgb(0, 123, 255);
  position: relative;
  margin-left: 20px;
  margin-right: 20px;
}

/* === Title Section === */
.carousel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 22px;
  font-weight: 600;
  color: #222;
  margin-bottom: 20px;
}

.view-all-btn {
  padding: 8px 16px;
  background-color: rgb(0, 123, 255);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
}

.view-all-btn:hover {
  background-color: #0056b3;
}

/* === GRID LAYOUT === */
.carousel-wrapper {
  display: block;
}

.carousel-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 🟩 Desktop: 5 per row */
  gap: 20px;
  width: 100%;
  padding: 20px 0;
}

/* === Product Card === */
.carousel-item {
  background: #fafafa;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid #eee;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.carousel-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* === Image Wrapper === */
.image-wrapper {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: 6px;
}

/* Main Image */
.image-wrapper img.main-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

/* Hover Image */
.image-wrapper img.hover-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* On Hover: Show hover-image */
.image-wrapper:hover img.hover-image {
  opacity: 1;
}
.image-wrapper:hover img.main-image {
  opacity: 0;
}

/* === Product Title === */
.carousel-item h3 {
  font-size: 16px;
  margin: 10px 0 5px;
  color: #333;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 2.8em;
  line-height: 1.4em;
}

/* === Product Price === */
.price {
  color: rgb(0, 123, 255);
  font-size: 15px;
}

.price .old {
  color: #999;
  text-decoration: line-through;
  margin-left: 6px;
}

/* === Add to Cart Button === */
.cart-link {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 10px;
  background: rgb(0, 123, 255);
  color: white;
  font-size: 14px;
  text-decoration: none;
  border-radius: 4px;
}

.cart-link:hover {
  background-color: #0056b3;
}

.cart-link i {
  margin-right: 5px;
}

/* === Hide Carousel Arrows === */
.nav-btn {
  display: none;
}

/* === RESPONSIVE GRID ADJUSTMENTS === */

/* 🖥️ Large screens */
@media (max-width: 1200px) {
  .carousel-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 💻 Tablets */
@media (max-width: 992px) {
  .carousel-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 📱 Mobiles (medium) */
@media (max-width: 768px) {
  .carousel-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .image-wrapper {
    height: 200px;
  }
}

/* 📱 Small Mobile Devices */
@media (max-width: 480px) {
  .carousel-container {
    grid-template-columns: repeat(2, 1fr); /* ✅ 2 products per row */
  }
  .image-wrapper {
    height: 180px;
  }
  .carousel-item h3 {
    font-size: 14px;
  }
  .price {
    font-size: 13px;
  }
}

/* === FulfillFlex Banner Frame 4 === */
/* === FulfillFlex Banner Frame 4 (3 Columns Responsive Height Only) === */
.fulfillflexbannerframe4 {
  display: flex;
  gap: 10px;
  width: 100%;
  align-items: stretch;
  justify-content: space-between;
  border-radius: 16px;
  overflow: hidden;
  flex-wrap: nowrap; /* ✅ Keep 3 columns side-by-side always */
  transition: all 0.4s ease;
  height: 420px; /* 🟩 Default desktop height */
}

/* === Layout Ratios === */
.fulfillflexbannerframe4 .left-banner {
  flex: 2;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
}
.fulfillflexbannerframe4 .center-banner {
  flex: 1.5;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
}
.fulfillflexbannerframe4 .right-banners {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}
.fulfillflexbannerframe4 .small-banner {
  flex: 1;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
}

/* === Images === */
.fulfillflexbannerframe4 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
  border-radius: 14px;
  filter: brightness(0.95);
}

/* === Links === */
.fulfillflexbannerframe4 a {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

/* === Hover Text Overlay === */
.fulfillflexbannerframe4 .banner-text {
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-size: 22px;
  font-weight: 600;
  color: #030303;
  background: rgba(255, 255, 255, 0.65);
  padding: 8px 16px;
  border-radius: 10px;
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.5s ease;
}
.fulfillflexbannerframe4 .tilt-glass:hover .banner-text {
  opacity: 1;
  transform: translateY(0);
}

/* === Glass Reflection === */
.fulfillflexbannerframe4 .tilt-glass::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0.35) 0%,
    rgba(255,255,255,0.05) 40%,
    rgba(255,255,255,0.35) 100%
  );
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: rotate(25deg);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

/* === 3D Tilt Effect === */
.fulfillflexbannerframe4 .tilt-glass {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.5s ease;
}
.fulfillflexbannerframe4 .tilt-glass:hover {
  transform: rotateY(6deg) rotateX(3deg) scale(1.05);
}
.fulfillflexbannerframe4 .tilt-glass:hover::before {
  opacity: 1;
  transform: translateY(-10%) rotate(25deg);
}
.fulfillflexbannerframe4 .tilt-glass:hover img {
  transform: scale(1.1);
  filter: brightness(1.15) saturate(1.3);
  box-shadow: 0 15px 30px rgba(0,0,0,0.35);
}

/* === Responsive Height Adjustments (Keep 3 Columns) === */
@media (max-width: 1400px) {
  .fulfillflexbannerframe4 { height: 380px; }
}
@media (max-width: 1200px) {
  .fulfillflexbannerframe4 { height: 340px; }
  .fulfillflexbannerframe4 .banner-text { font-size: 20px; }
}
@media (max-width: 992px) {
  .fulfillflexbannerframe4 { height: 300px; }
  .fulfillflexbannerframe4 .banner-text { font-size: 18px; }
}
@media (max-width: 768px) {
  .fulfillflexbannerframe4 { height: 260px; }
  .fulfillflexbannerframe4 .banner-text { font-size: 14px; }
}
@media (max-width: 576px) {
  .fulfillflexbannerframe4 { height: 220px; }
  .fulfillflexbannerframe4 .banner-text { font-size: 10px; }
}
