/* ==========================================================================
   HNT TEMPLATE CAROUSEL CSS (họ hàng với lise-1, lise-2 & lise-3)
   Prefix: .hnt-w-lise-4
   ========================================================================== */

.hnt-w-lise-4-template-section {
  --hnt-w-lise-4-primary-color: #6b0f1a;
  --hnt-w-lise-4-card-width: 420px;
  --hnt-w-lise-4-card-gap: 24px;

  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  font-family: "Inter", sans-serif;
}

.hnt-w-lise-4-template-section *,
.hnt-w-lise-4-template-section *::before,
.hnt-w-lise-4-template-section *::after {
  box-sizing: border-box;
}

.hnt-w-lise-4-template-section::-webkit-scrollbar,
.hnt-w-lise-4-carousel-outer::-webkit-scrollbar,
.hnt-w-lise-4-carousel-main-container::-webkit-scrollbar,
.hnt-w-lise-4-carousel-track::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.hnt-w-lise-4-carousel-outer {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  cursor: grab;
  padding: 12px 0 24px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hnt-w-lise-4-carousel-outer:active {
  cursor: grabbing;
}

.hnt-w-lise-4-carousel-main-container {
  display: flex;
  width: max-content;
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.hnt-w-lise-4-carousel-track {
  display: flex;
  gap: var(--hnt-w-lise-4-card-gap);
  padding-right: var(--hnt-w-lise-4-card-gap);
  flex-shrink: 0;
}

/* Template Card Item */
.hnt-w-lise-4-card {
  width: var(--hnt-w-lise-4-card-width);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  user-select: none;
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  will-change: transform, opacity;
  box-sizing: border-box;
  position: relative;
}

.hnt-w-lise-4-card-inner {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  position: relative;
}

/* Make sure Elementor internal container/section inside template spans 100% width */
.hnt-w-lise-4-card-inner > .elementor {
  width: 100%;
}

.hnt-w-lise-4-card-inner .elementor-element {
  max-width: 100%;
}

/* Controls Bar */
.hnt-w-lise-4-controls-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
  opacity: 0;
  transform: translateY(16px);
  will-change: transform, opacity;
  padding-bottom: 20px;
}

/* Entrance Animation Disabled: immediately display cards and controls without offset */
.hnt-w-lise-4-template-section.hnt-w-lise-4-no-animation .hnt-w-lise-4-card,
.hnt-w-lise-4-template-section[data-hnt-w-lise-4-animation="false"] .hnt-w-lise-4-card,
.hnt-w-lise-4-template-section.hnt-w-lise-4-no-animation .hnt-w-lise-4-controls-wrapper,
.hnt-w-lise-4-template-section[data-hnt-w-lise-4-animation="false"] .hnt-w-lise-4-controls-wrapper {
  opacity: 1 !important;
  transform: none !important;
  will-change: auto !important;
}

.hnt-w-lise-4-segmented-indicators {
  width: auto;
  max-width: 160px;
  height: 36px;
  border-radius: 9999px;
  padding: 6px 10px;
  background-color: #ededed;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-sizing: border-box;
}

.hnt-w-lise-4-indicator-bar {
  flex: 1 1 32px;
  width: 32px;
  max-width: 32px;
  min-width: 6px;
  height: 4px;
  background-color: #c7c4bc;
  border-radius: 9999px;
  transition: background-color 0.3s ease;
  cursor: pointer;
  outline: none;
}

.hnt-w-lise-4-indicator-bar:hover,
.hnt-w-lise-4-indicator-bar:focus {
  background-color: #a8a59d;
}

.hnt-w-lise-4-indicator-bar.hnt-w-lise-4-active {
  background-color: var(--hnt-w-lise-4-primary-color, #6b0f1a);
}

.hnt-w-lise-4-nav-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hnt-w-lise-4-nav-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  border: none !important;
  background-color: var(--hnt-w-lise-4-primary-color, #6b0f1a);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  outline: none !important;
  transition:
    opacity 0.2s ease,
    transform 0.15s ease;
}

.hnt-w-lise-4-nav-btn:hover,
.hnt-w-lise-4-nav-btn:focus {
  opacity: 0.9;
  background-color: var(--hnt-w-lise-4-primary-color, #6b0f1a);
}

.hnt-w-lise-4-nav-btn:active {
  transform: scale(0.92);
}

.hnt-w-lise-4-nav-btn svg {
  width: 11px;
  height: 8px;
  display: block;
  pointer-events: none;
}

.hnt-w-lise-4-nav-btn svg path {
  stroke: #ffffff;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Responsive Mobile */
@media (max-width: 767px) {
  .hnt-w-lise-4-template-section {
    --hnt-w-lise-4-card-width: 340px;
    --hnt-w-lise-4-card-gap: 16px !important;
  }

  .hnt-w-lise-4-controls-wrapper {
    margin-top: 24px;
    justify-content: center;
  }
}

/* ==========================================================================
   GRID MODE ON PC / DESKTOP (min-width: 1025px)
   ========================================================================== */
@media (min-width: 1025px) {
  .hnt-w-lise-4-template-section.hnt-w-lise-4-grid-desktop {
    overflow: visible;
  }

  .hnt-w-lise-4-template-section.hnt-w-lise-4-grid-desktop
    .hnt-w-lise-4-carousel-outer {
    overflow: visible;
    cursor: default;
    padding: 0;
    display: block;
    width: 100%;
  }

  .hnt-w-lise-4-template-section.hnt-w-lise-4-grid-desktop
    .hnt-w-lise-4-carousel-main-container {
    display: block;
    width: 100%;
    transform: none !important;
  }

  .hnt-w-lise-4-template-section.hnt-w-lise-4-grid-desktop
    .hnt-w-lise-4-carousel-track[data-hnt-w-lise-4="track1"] {
    display: grid !important;
    grid-template-columns: repeat(
      var(--hnt-w-lise-4-grid-cols, 3),
      minmax(0, 1fr)
    ) !important;
    gap: var(--hnt-w-lise-4-card-gap) !important;
    padding-right: 0 !important;
    width: 100% !important;
  }

  .hnt-w-lise-4-template-section.hnt-w-lise-4-grid-desktop
    .hnt-w-lise-4-carousel-track[data-hnt-w-lise-4="track2"] {
    display: none !important;
  }

  .hnt-w-lise-4-template-section.hnt-w-lise-4-grid-desktop .hnt-w-lise-4-card {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* (gird ko có điều hướng nha) */
  .hnt-w-lise-4-template-section.hnt-w-lise-4-grid-desktop
    .hnt-w-lise-4-controls-wrapper {
    display: none !important;
  }
}
