/* ======================================================== */
/*                     PRODUCT SECTION                      */
/* ======================================================== */

/* --- Home product carousel (arrows + dots, cùng pattern team profile) --- */
.product-grid-carousel-wrap {
  position: relative;
  margin-top: 18px;
  padding: 0 44px 36px;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .product-grid-carousel-wrap {
    padding-left: 40px;
    padding-right: 40px;
  }
}

.product-grid-swiper {
  overflow: hidden;
  box-sizing: border-box;
  padding: clamp(8px, 2vw, 14px) clamp(6px, 2vw, 16px) clamp(12px, 2.5vw, 20px);
}

.product-grid-carousel-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition:
    background 0.2s,
    transform 0.2s,
    opacity 0.2s;
}

.product-grid-carousel-nav:hover {
  background: #1d4ed8;
  transform: translateY(-50%) scale(1.04);
}

.product-grid-carousel-nav.swiper-button-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.product-grid-carousel-prev {
  left: 0;
}

.product-grid-carousel-next {
  right: 0;
}

.product-grid-carousel-wrap .swiper-pagination {
  position: relative;
  margin-top: 14px;
  bottom: auto !important;
}

.product-grid-carousel-wrap .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: #cbd5e1;
  opacity: 1;
}

.product-grid-carousel-wrap .swiper-pagination-bullet-active {
  background: #2563eb;
  width: 22px;
  border-radius: 4px;
}

/* Trang chủ: carousel sản phẩm (Swiper slides) */
.product-grid-swiper .swiper-wrapper {
  align-items: stretch;
}

.product-grid-swiper .swiper-slide {
  height: auto;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: clamp(6px, 1.5vw, 12px) clamp(6px, 1.5vw, 10px);
}

.product-grid-swiper .swiper-slide > .product-card {
  width: 100%;
  max-width: 100%;
}

/* Thẻ sản phẩm */
.product-card {
  display: block;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

/* Ảnh nền của thẻ */
.product-card-image {
  width: 100%;
  padding-bottom: 75%; /* Tạo tỷ lệ khung hình 4:3, có thể đổi thành 100% cho ảnh vuông */
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card-image {
  transform: scale(1.05); /* Hiệu ứng zoom nhẹ khi hover */
}

/* Lớp phủ chứa nội dung */
.product-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
  padding: 1.5rem;
  /* Xóa display: flex đi vì chúng ta sẽ dùng định vị tuyệt đối */
}

/* Logo watermark */
.product-card-logo {
  /* THAY ĐỔI QUAN TRỌNG: Định vị tuyệt đối ở góc trên bên trái */
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;

  max-width: 120px;
  opacity: 0.8;
}

/* Nút "READ MORE" */
.product-card-button {
  /* THAY ĐỔI QUAN TRỌNG: Định vị tuyệt đối ở góc dưới bên trái */
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;

  background-color: var(--brand);
  color: #fff;
  padding: 0.7rem 1.5rem;
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;

  /* THAY ĐỔI QUAN TRỌNG: Xóa transform và opacity để nút luôn hiện ra */
}
.product-card-button:hover {
  background-color: #d9880b; /* Thêm hiệu ứng hover đơn giản */
}
.product-card:hover .product-card-button {
  transform: translateY(0);
  opacity: 1; /* Nút chỉ hiện ra khi hover */
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-title h2 {
  font-size: clamp(1.8rem, 3vw, 2.2rem); /* Tăng nhẹ kích thước tiêu đề */
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  /* Tạo đường gạch chân bên dưới /
display: inline-block; / Quan trọng: để gạch chân vừa với chữ */
  padding-bottom: 0.75rem;
  margin-bottom: 2rem;
  border-bottom: 3px solid var(--brand);
}
.section-title p {
  /* THAY ĐỔI 1: Đổi màu chữ thành màu văn bản chính */
  color: var(--text);

  font-size: clamp(1rem, 1.5vw, 1.1rem);

  /* THAY ĐỔI 2: Giảm nhẹ chiều cao dòng để giống gốc hơn */
  line-height: 1.7;

  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* THAY ĐỔI 3: Thêm khoảng cách giữa 2 đoạn văn */
.section-title p + p {
  margin-top: 1.5rem;
}

.section-title .home-section-text {
  color: var(--text);
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  line-height: 1.7;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.section-title .home-section-text + .home-section-text {
  margin-top: 1.5rem;
}
@media (max-width: 768px) {
  .product-card-button {
    /* Hiện nút ngay cả khi không hover trên mobile */
    transform: translateY(0);
    opacity: 1;
  }
}
