/* Merged Template Listing Section for Hallo Web Builder (localhost:8083) */
#halloweb-template-listing {
  width: 100%;
  background: #F6F5F0;
  color: #1A1B19;
  padding: 96px 0 112px;
  border-top: 1px solid rgba(26, 27, 25, 0.08);
  border-bottom: 1px solid rgba(26, 27, 25, 0.08);
  font-family: "Inter", "IBM Plex Sans Thai", "Noto Sans Thai", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-sizing: border-box;
}

#halloweb-template-listing *,
#halloweb-template-listing *::before,
#halloweb-template-listing *::after {
  box-sizing: border-box;
}

.hwt-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}

.hwt-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.hwt-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6B6D67;
  margin-bottom: 14px;
}

.hwt-title {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #1A1B19;
  margin: 0;
}

.hwt-subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: #555751;
  max-width: 420px;
  margin: 0;
}

/* Filter Pills */
.hwt-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.hwt-filter {
  appearance: none;
  border: 1px solid rgba(26, 27, 25, 0.16);
  background: #FFFFFF;
  color: #1A1B19;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hwt-filter:hover {
  border-color: #1A1B19;
  transform: translateY(-1px);
}

.hwt-filter[aria-pressed="true"] {
  background: #1A1B19;
  color: #DDF65E;
  border-color: #1A1B19;
  font-weight: 600;
}

/* Grid */
.hwt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 1080px) {
  .hwt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .hwt-container {
    padding: 0 20px;
  }
  .hwt-grid {
    grid-template-columns: 1fr;
  }
}

/* Cards */
.hwt-card {
  background: #FFFFFF;
  border: 1px solid rgba(26, 27, 25, 0.1);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.hwt-card:hover {
  transform: translateY(-5px);
  border-color: rgba(26, 27, 25, 0.28);
  box-shadow: 0 24px 48px -16px rgba(26, 27, 25, 0.14);
}

.hwt-card[hidden] {
  display: none !important;
}

.hwt-shot {
  margin: 0;
  padding: 18px 18px 0;
  background: var(--template-bg, #EFECE4);
  aspect-ratio: 16 / 11;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hwt-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.18);
  display: block;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.hwt-card:hover .hwt-shot img {
  transform: scale(1.03);
}

.hwt-info {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hwt-type {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #6B6D67;
  margin-bottom: 6px;
}

.hwt-info h3 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #1A1B19;
  margin: 0 0 8px;
}

.hwt-info p {
  font-size: 14.5px;
  line-height: 1.55;
  color: #555751;
  margin: 0 0 16px;
}

.hwt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.hwt-tags span {
  font-size: 12px;
  font-weight: 500;
  color: #363834;
  background: #F4F3EE;
  padding: 4px 10px;
  border-radius: 999px;
}

.hwt-view {
  margin-top: auto;
  align-self: flex-start;
  appearance: none;
  border: 1px solid #1A1B19;
  background: transparent;
  color: #1A1B19;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.hwt-view:hover,
.hwt-view[aria-expanded="true"] {
  background: #1A1B19;
  color: #DDF65E;
}

.hwt-details {
  margin-top: 14px;
  padding: 12px 14px;
  background: #F6F5F0;
  border-left: 3px solid #DDF65E;
  border-radius: 8px;
}

.hwt-details p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #363834;
}

.hwt-note {
  margin: 28px 0 0;
  font-size: 13.5px;
  color: #6B6D67;
}
