/* =========================
   SECTION
========================= */
.product-section {
  background: #f6faf7;
}

.product-section h2 {
  letter-spacing: -0.5px;
}

/* =========================
   CARD WRAPPER
========================= */
.product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 20px 40px rgba(16, 185, 129, 0.08),
    0 2px 6px rgba(0,0,0,0.04);
  transition: transform .35s ease, box-shadow .35s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 32px 60px rgba(16, 185, 129, 0.18),
    0 6px 16px rgba(0,0,0,0.08);
}

/* =========================
   IMAGE AREA
========================= */
.card-image {
  position: relative;
  background: linear-gradient(135deg, #0f5132, #198754);
  padding: 28px;
  text-align: center;
}

.card-image img {
  max-height: 160px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.25));
}

/* SALE BADGE */
.badge-sale {
  position: absolute;
  top: 16px;
  left: 16px;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(220,38,38,.4);
}

/* =========================
   BODY
========================= */
.card-body {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.price-box {
  margin-top: auto;
  font-weight: 700;
  font-size: 18px;
}

.btn-buy {
  margin-top: 14px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  border-radius: 999px;
  padding: 10px;
  font-weight: 600;
}

.provider {
  font-size: 12px;
  font-weight: 600;
  color: #16a34a;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.product-title {
  font-size: 18px;
  font-weight: 700;
  color: #064e3b;
  margin-bottom: 6px;
}

.product-desc {
  font-size: 14px;
  color: #475569;
  margin-bottom: 14px;
}

/* =========================
   FEATURE LIST
========================= */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px 0;
}

.feature-list li {
  font-size: 13px;
  color: #334155;
  margin-bottom: 6px;
  display: flex;
  gap: 6px;
}

/* =========================
   PRICE
========================= */
.price-box {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.price-old {
  font-size: 14px;
  color: #9ca3af;
  text-decoration: line-through;
}

.price-new {
  font-size: 22px;
  font-weight: 800;
  color: #15803d;
}

/* =========================
   CTA BUTTON
========================= */
.btn-buy {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all .3s ease;
}

.btn-buy:hover {
  background: linear-gradient(135deg, #15803d, #16a34a);
  transform: scale(1.03);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 991px) {
  .card-image img {
    max-height: 140px;
  }
}

@media (max-width: 575px) {
  .product-title {
    font-size: 17px;
  }

  .price-new {
    font-size: 20px;
  }
}.card-body {
  display: flex;
  flex-direction: column;
}

.btn-buy {
  margin-top: auto;
}
.product-card:hover .card-image {
  filter: brightness(1.05);
}

/* ===== SLIDER WRAPPER ===== */
.product-slider {
  overflow: hidden;
  width: 100%;
}

/* ===== TRACK ===== */
.product-track {
  display: flex;
  gap: 24px;
  will-change: transform;
}

/* ===== CARD WIDTH ===== */
.product-track > .col-lg-4 {
  flex: 0 0 33.3333%;
}

/* Tablet */
@media (max-width: 992px) {
  .product-track > .col-lg-4 {
    flex: 0 0 50%;
  }
}

/* Mobile */
@media (max-width: 576px) {
  .product-track > .col-lg-4 {
    flex: 0 0 90%;
  }
}
/* ===== SLIDER CORE ===== */
.product-slider {
  overflow: hidden;
  width: 100%;
}

.product-track {
  display: flex;
  gap: 24px;
  will-change: transform;
}
.product-card {
  height: 100%;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-image {
  background: linear-gradient(135deg, #e8f5ec, #f4faf6);
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 180px;
}

.card-image img {
  max-height: 120px;
  object-fit: contain;
}

/* SALE BADGE */
.badge-sale {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #dc3545;
  color: #fff;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
}

/* BODY */
.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.provider {
  font-size: 13px;
  font-weight: 600;
  color: #198754;
}

.product-title {
  font-size: 18px;
  font-weight: 700;
  margin: 6px 0;
}

.product-desc {
  font-size: 14px;
  color: #666;
}

.feature-list {
  margin: 10px 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.feature-list li {
  margin-bottom: 6px;
}

/* PRICE */
.price-box {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-old {
  text-decoration: line-through;
  color: #aaa;
  font-size: 14px;
}

.price-new {
  font-size: 20px;
  font-weight: 800;
  color: #dc3545;
}

/* BUTTON */
.btn-buy {
  margin-top: 12px;
  width: 100%;
  border: none;
  padding: 12px;
  background: linear-gradient(135deg,#198754,#20c997);
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
}
.btn-buy:hover {
  opacity: 0.9;
}

/* MOBILE */
@media (max-width:768px){
  .product-card{
    min-width: 85vw;
    max-width: 85vw;
  }
}
.slider-wrapper {
  overflow: hidden;
  position: relative;
}

.product-track {
  display: flex;
  gap: 24px;
  will-change: transform;
}

.product-slide {
  flex: 0 0 auto;
  width: 320px;
}

@media (max-width: 768px) {
  .product-slide {
    width: 80vw;
  }
    }

    /* Lazy image */
    .product-card img {
    width: 100%;
    display: block;
    }
    .product-slide {
    flex: 0 0 320px;
    }

    @media (max-width: 768px) {
    .product-slide {
        flex: 0 0 85vw;
    }
    }
.slider-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
  pointer-events: none;
}

.slide-btn {
  pointer-events: all;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(22,163,74,.9);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  cursor: pointer;
  transition: .25s;
}

.slide-btn:hover {
  transform: scale(1.1);
  background: #16a34a;
}
.slider-wrapper {
  position: relative;
}

.slider-viewport {
  overflow: hidden;
}

.product-track {
  display: flex;
  gap: 24px;
  transition: transform 0.45s cubic-bezier(.4,0,.2,1); /* Apple-style */
  will-change: transform;
}

.product-slide {
  flex: 0 0 calc((100% - 48px) / 3); /* 3 sản phẩm */
}

/* Mobile */
@media (max-width: 768px) {
  .product-slide {
    flex: 0 0 80%;
  }
}
/* INDICATOR */
.slider-indicators {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.slider-indicators .dot {
  width: 8px;
  height: 8px;
  background: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: all .3s;
}
.slider-indicators .dot.active {
  background: #198754;
  transform: scale(1.4);
}
.product-slide {
  transition: transform .45s ease;
}

.product-slide:not(:hover) {
  transform: scale(.96);
}

/* ======================
   SLIDE BASE
====================== */

/* ===== SLIDE BASIC ===== */
.product-track {
  display: flex;
  gap: 24px;
  will-change: transform;
}

/* ===== CARD ===== */
.product-slide {
  flex: 0 0 calc(33.333% - 16px); /* 3 card / page */
  transition: transform .45s cubic-bezier(.4,0,.2,1),
              opacity .45s ease;
  opacity: .85;
  transform: scale(.96);
}

/* CARD Ở GIỮA */
.product-slide.is-center {
  opacity: 1;
  transform: scale(1.05);
  z-index: 2;
}

/* MOBILE */
@media (max-width: 768px) {
  .product-slide {
    flex: 0 0 85%;
  }
}
.slider-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.slider-indicators span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cfd8d3;
  transition: all .3s ease;
  cursor: pointer;
}

.slider-indicators span.active {
  width: 18px;
  border-radius: 10px;
  background: #1f8f55;
}
/* ===== IMAGE WRAP ===== */
.card-image {
  position: relative;
  height: 200px;              /* 👈 tăng chiều cao */
  background: linear-gradient(135deg, #eefaf3, #f6fdf9);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

/* ===== IMAGE ===== */
.card-image img {
  max-width: 85%;             /* 👈 to hơn */
  max-height: 85%;
  object-fit: contain;
  transition: transform .3s ease;
}

/* Hover nhẹ cho đẹp */
.product-card:hover .card-image img {
  transform: scale(1.05);
}
.card-image {
  height: 220px;
}

.card-image img {
  max-width: 92%;
  max-height: 92%;
}
/* Trong file CSS của bạn */


/* Đảm bảo mỗi card chiếm trọn chiều rộng của track khi cuộn/vuốt */
.product-track .product-card { 
    flex: 0 0 100%; 
    width: 100%;
    scroll-snap-align: start; /* Dừng ở đầu mỗi card */
}

/* Ẩn thanh cuộn mặc định (giúp giao diện mobile sạch hơn) */
.product-track::-webkit-scrollbar {
    display: none;
}
.product-track {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}


/* 2. Sử dụng Media Query để ẨN nút trên Mobile */
/* Giả sử kích thước mobile là nhỏ hơn 768px */
@media (max-width: 767.98px) {
    .slider-controls {
        /* Ẩn hoàn toàn các nút điều khiển trên mobile */
        display: none !important;
    }
}
