.products {
  padding: 0px 0 0px;
  margin-bottom: 20px;

  /* ✅ mobile overflow cut off */
  overflow-x: clip; /* modern */
}

/* fallback old browser */
@supports not (overflow: clip) {
  .products { overflow-x: hidden; }
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

.section-head .line {
  flex: 1;
  height: 2px;
  background: #6e6e6e;
  max-width: 100%;
  opacity: 0.8;
}

.section-head .title {
  margin: 0;
  padding: 6px 18px;
  border: 2px solid #000000;
  border-radius: 12px;
  font-size: 22px;
  font-weight: 700;
  color: #1b1b1b;
  background: var(--color-text-white);
}

/* =========================
   Product Grid (normal view)
   ========================= */

.product-card-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.product-card {
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: var(--color-text-white);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.product-card .thumb {
  aspect-ratio: 1 / 1;
  background: #f9f9f9;
  display: block;
  position: relative;
}

.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-card .quick-view {
  position: absolute;
  left: 10px;
  top: 10px;
  transform: translateY(-12px);
  opacity: 0;
  background: #077a45;
  color: var(--color-text-white);
  width: 44px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.product-card .quick-view i {
  font-size: 14px;
}

.product-card:hover .quick-view {
  opacity: 1;
  transform: translateY(6px);
}

.product-card .name {
  font-size: 18px;
  font-weight: 700;
  color: #00834a;
  margin: 12px 12px 6px;
  text-align: center;
}

.product-card .meta {
  color: #000000;
  margin: 0 12px 8px;
  font-size: 13px;
  text-align: center;
}

.product-card .meta .label {
  color: #000000;
  font-weight: 600;
}

.product-card .price {
  margin: 0 12px 14px;
  font-weight: 700;
  color: #111;
  text-align: center;
}

.product-card .price .old {
  text-decoration: line-through;
  color: #ff0000;
  margin-right: 6px;
  font-weight: 600;
}

/* =========================
   Shop Grid
   ========================= */

.shop-products-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
}

.shop-card-two {
  background: #fff !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shop-card {
  border-radius: 10px;
  background: var(--color-secondary) !important;
  padding: 10px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  height: 100%;
}

.shop-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.card-link.price {
  text-align: center !important;
}

.card-link h3 {
  text-decoration: none !important;
  color: #000;
  text-align: start;
}

/* =========================
   Section title
   ========================= */

.top-title {
  text-align: start;
  margin-bottom: 20px;
}

.top-title .subtitle {
  display: block;
  font-size: 14px;
  color: var(--color-primary);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 5px;
  letter-spacing: 1px;
}

/* .top-title .title {
  font-size: 32px;
  font-weight: 700;
  color: #1A1A1A;
  position: relative;
  padding-bottom: 8px;
}

.top-title .title::before {
  content: "";
  position: absolute;
  text-align: center;
  left: 50%;
  transform: translateY(50%);
  bottom: 0;
  width: 60px;
  height: 3px;
  background-color: var(--color-primary);
} */


.top-title .title{
  position: relative;
  padding-left: 14px;  
  margin: 0;
  line-height: 1.2;
}

.top-title .title::before{
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 32px;
  background-color: var(--color-primary);
}

/* =========================
   Bootstrap carousel arrows
   ========================= */

.products .carousel-control-prev-icon,
.products .carousel-control-next-icon {
  width: 45px;
  height: 45px;
  background-color: var(--color-primary);
  border-radius: 999px;
  background-size: 12px 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.products .carousel-control-prev {
  left: -58px;
}
.products .carousel-control-next {
  right: -58px;
}

/* ✅ Carousel er vitore grid force (design venge jabe na) */
.products .carousel-item .product-card-grid {
  display: grid !important;
  gap: 18px;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

/* ✅ Carousel: each view fixed columns (no mismatch) */
.products .products-carousel.pc-xl .product-card-grid { grid-template-columns: repeat(5, minmax(0,1fr)) !important; }
.products .products-carousel.pc-lg .product-card-grid { grid-template-columns: repeat(4, minmax(0,1fr)) !important; }
.products .products-carousel.pc-md .product-card-grid { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
.products .products-carousel.pc-sm .product-card-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }


/* =========================
   Swiper Product Section (SAFE)
   ========================= */

.products .products-swiper {
  position: relative;
  width: 100%;
  box-sizing: border-box;

  /* ✅ must: stop side cut on mobile */
  overflow: hidden;

  /* arrow space */
  padding: 16px 34px;
}

/* wrapper safe */
.products .products-swiper .swiper-wrapper {
  box-sizing: border-box;
}

/* slide safe */
.products .products-swiper .swiper-slide {
  min-width: 0;
  box-sizing: border-box;
}

/* slide inner */
.products .products-swiper .ps-slide {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

/* ensure card does NOT exceed slide width */
.products .products-swiper .ps-slide .product-card {
  width: 100%;
  max-width: 100%;
}

/* arrows */
.products .products-swiper .swiper-button-next,
.products .products-swiper .swiper-button-prev {
  width: 28px;
  height: 28px;
  margin-top: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-primary);
  color: var(--color-text-white);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.products .products-swiper .swiper-button-next::after,
.products .products-swiper .swiper-button-prev::after {
  font-size: 12px;
  font-weight: 700;
}

.products .products-swiper .swiper-button-prev {
  left: 2px;
}
.products .products-swiper .swiper-button-next {
  right: 2px;
}

.products .products-swiper .swiper-button-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* =========================
   Responsive
   ========================= */


@media (max-width: 1199.98px) {
   .shop-products-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .products .carousel-control-prev {
    left: -30px;
  }

  .products .carousel-control-next {
    right: -30px;
  }

  .products .carousel-item .product-card-grid {
    grid-template-columns: repeat(4, minmax(0,1fr)) !important;
  }
}

@media (max-width: 992px) {
  .shop-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .product-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* Carousel grid */
  .products .carousel-item .product-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  .shop-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 12px;
    gap: 14px;
  }

  .product-card-grid {
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section-head .line {
    max-width: 260px;
  }

  .products .carousel-control-prev {
  left: -15px;
}
.products .carousel-control-next {
  right: -15px;
}

.products .carousel-control-prev-icon,
.products .carousel-control-next-icon { 
  width: 38px;
  height: 38px;
}
}

@media (max-width: 576px) {
  .section-head {
    margin-bottom: 15px;
  }

  .section-head .line {
    max-width: 215px; 
  }
 
  .shop-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px 10px;
    gap: 12px;
  }

  /* ✅ IMPORTANT: mobile e margin 8px dile overflow হয় (Swiper/Carousel) */
  .product-card-grid {
    gap: 14px;
    padding: 0 5px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
  }

  /* Carousel grid */
  .products .carousel-item .product-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin: 0 !important;
  }

  .range {
    font-size: 13px;
    text-align: center;
  }

  .section-head .line {
    max-width: 111px;
  }

  .products {
    padding: 0px 0 0px;
  }

  .top-title {
    padding: 0 5px;
  }

  .top-title .title {
    font-size: 28px;
  }

  /* Swiper padding a bit tighter */
  .products .products-swiper {
    padding: 14px 28px;
  }

  .products .carousel-control-prev {
  left: -10px;
}
.products .carousel-control-next {
  right: -10px;
}
}

@media (max-width: 400px) {
  .shop-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .section-head .line {
    max-width: 85px;
  }

  .products .carousel-control-prev {
  left: -5px;
}
.products .carousel-control-next {
  right: -5px;
}
}

@media (max-width: 320px) {
  .shop-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .section-head .line {
    max-width: 60px;
  }
}
