.carousel-wrap {
  max-width: 1280px;
}

.carousel .carousel-item img {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  display: block;
}

.carousel-control-prev,
.carousel-control-next {
  width: 8%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

#heroCarousel.carousel.slide .carousel-item {
  transition: transform 900ms cubic-bezier(.22, .61, .36, 1);
  backface-visibility: hidden;
  will-change: transform;
}

#heroCarousel .carousel-inner {
  overflow: hidden;
  border-radius: 16px;
}

#heroCarousel .carousel-item {
  height: auto;
  aspect-ratio: 16 / 9;
}

.section-bg {
  background: #f7f9fb;
  padding-top: clamp(18px, 3vw, 36px);
}

.content-wrap {
  max-width: 1280px;
}

.category-card {
  position: relative;
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  height: clamp(210px, 27vw, 315px);
  box-shadow: 0 10px 25px rgba(16, 24, 40, 0.12);
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 300ms ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 20, 10, 0.75) 0%,
    rgba(10, 20, 10, 0.25) 45%,
    rgba(10, 20, 10, 0.05) 100%
  );
}

.category-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 18px 20px;
}

.category-tag {
  display: inline-block;
  color: var(--theme-primary);
  font-size: 11px;
  letter-spacing: 1.2px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.category-title {
  color: #fff;
  font-weight: 800;
  font-size: clamp(16px, 1.6vw, 22px);
  line-height: 1.15;
  margin: 0;
  max-width: 95%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-card:hover img {
  transform: scale(1.06);
}

.btn-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--theme-primary);
  border: 0;
  color: #fff;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  box-shadow: 0 14px 28px rgba(var(--theme-primary-rgb), 0.28), 0 4px 10px rgba(16, 24, 40, 0.10);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn-all:hover,
.btn-all:focus {
  background: var(--theme-primary-hover);
  color: #fff;
  box-shadow: 0 18px 34px rgba(var(--theme-primary-rgb), 0.32), 0 6px 14px rgba(16, 24, 40, 0.12);
  transform: translateY(-1px);
}

.btn-all:active {
  transform: translateY(0);
  box-shadow: 0 10px 22px rgba(var(--theme-primary-rgb), 0.24), 0 4px 10px rgba(16, 24, 40, 0.10);
}

.btn-all:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(var(--theme-primary-rgb), 0.25), 0 14px 28px rgba(var(--theme-primary-rgb), 0.28), 0 4px 10px rgba(16, 24, 40, 0.10);
}

.btn-all .btn-arrow {
  font-size: 18px;
  line-height: 1;
}

.feature-wrap {
  max-width: 1200px;
}

.feature-card {
  background: #fff;
  border-radius: 28px;
  padding: clamp(22px, 3vw, 42px);
  text-align: center;
  border: 1px solid rgba(16, 24, 40, 0.06);
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.10), 0 2px 10px rgba(16, 24, 40, 0.06);
  overflow: hidden;
}

.feature-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: rgba(var(--theme-primary-rgb), 0.10);
  display: grid;
  place-items: center;
  color: var(--theme-primary);
}

.feature-title {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #1f2a1f;
  font-size: clamp(22px, 2.2vw, 34px);
  text-transform: uppercase;
}

.feature-underline {
  width: 70px;
  height: 4px;
  background: var(--theme-primary);
  border-radius: 999px;
  margin: 10px auto 18px;
}

.feature-desc {
  margin: 0 auto 18px;
  max-width: 860px;
  color: #6b7280;
  font-size: clamp(13px, 1.15vw, 15px);
  line-height: 1.8;
  font-weight: 500;
}

.feature-badges {
  margin-top: 6px;
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--theme-primary);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.feature-badge i {
  font-size: 14px;
}

@media (max-width: 575.98px) {
  .feature-badge {
    white-space: normal;
  }
}

/* ─── Mobile performance ─────────────────────────────── */

/* 1. Faster carousel transition on mobile (900ms → 450ms) and release GPU */
@media (max-width: 767.98px) {
  #heroCarousel.carousel.slide .carousel-item {
    transition: transform 450ms ease;
    will-change: auto;
  }

  /* Slightly shorter category cards on small phones */
  .category-card {
    height: clamp(140px, 44vw, 210px);
  }
}

/* 2. Disable hover-zoom on touch devices (pointer:none / hover:none) */
@media (hover: none) {
  .category-card:hover img {
    transform: scale(1.02);
  }
}

/* 3. Content-visibility for below-fold feature section */
.feature-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}

