@charset "utf-8";

#ao-template-hub.tpl-hub {
  padding: 110px 0 140px;
  color: #121212;
  font-family: Pretendard, Arial, system-ui, sans-serif;
  background: #fff;
}

#ao-template-hub .tpl-hub__inner {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
}

#ao-template-hub .tpl-hub__eyebrow {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(18, 18, 18, 0.45);
}

#ao-template-hub .tpl-hub__title {
  margin: 16px 0 0;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
}

#ao-template-hub .tpl-hub__title em {
  font-style: normal;
}

#ao-template-hub .tpl-hub__desc {
  margin: 18px 0 0;
  max-width: 640px;
  font-size: 16px;
  line-height: 1.9;
  color: rgba(18, 18, 18, 0.58);
}

#ao-template-hub .tpl-hub__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 48px 0 32px;
}

#ao-template-hub .tpl-hub__filter {
  border: 1px solid rgba(18, 18, 18, 0.12);
  background: #fff;
  color: rgba(18, 18, 18, 0.72);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

#ao-template-hub .tpl-hub__filter.is-active,
#ao-template-hub .tpl-hub__filter:hover {
  background: #121212;
  border-color: #121212;
  color: #fff;
}

#ao-template-hub .tpl-hub__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#ao-template-hub .tpl-hub__card-link,
#ao-template-hub .tpl-hub__card-btn {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

#ao-template-hub .tpl-hub__card-btn:focus-visible {
  outline: 2px solid #121212;
  outline-offset: 4px;
  border-radius: 12px;
}

#ao-template-hub .tpl-hub__thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 45%, #d1d5db 100%);
  border: 1px solid rgba(18, 18, 18, 0.08);
  transition: transform 0.25s ease;
}

#ao-template-hub .tpl-hub__thumb:hover {
  transform: translateY(-4px);
  z-index: 1;
}


#ao-template-hub .tpl-hub__thumb-label {
  position: absolute;
  left: 20px;
  bottom: 18px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(18, 18, 18, 0.42);
  font-weight: 700;
}

#ao-template-hub .tpl-hub__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#ao-template-hub .tpl-hub__card-body {
  padding: 18px 4px 0;
  background: transparent;
  box-shadow: none;
}

#ao-template-hub .tpl-hub__card-title {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

#ao-template-hub .tpl-hub__card-desc {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(18, 18, 18, 0.55);
}

#ao-template-hub .tpl-hub__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

#ao-template-hub .tpl-hub__tags li {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.06);
  color: rgba(18, 18, 18, 0.62);
}

#ao-template-hub .tpl-hub__cta {
  margin-top: 80px;
  padding: 48px;
  border-radius: 16px;
  background: #121212;
  color: #fff;
  text-align: center;
}

#ao-template-hub .tpl-hub__cta-title {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

#ao-template-hub .tpl-hub__cta-desc {
  margin: 14px auto 0;
  max-width: 520px;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.62);
}

#ao-template-hub .tpl-hub__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  padding: 14px 28px;
  border-radius: 999px;
  background: #fff;
  color: #121212;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 0.2s ease;
}

#ao-template-hub .tpl-hub__cta-btn:hover {
  transform: translateY(-2px);
}

@media (max-width: 1024px) {
  #ao-template-hub .tpl-hub__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #ao-template-hub.tpl-hub {
    padding: 72px 0 100px;
  }

  #ao-template-hub .tpl-hub__inner {
    width: min(1440px, calc(100% - 32px));
  }

  #ao-template-hub .tpl-hub__grid {
    grid-template-columns: 1fr;
  }

  #ao-template-hub .tpl-hub__cta {
    padding: 36px 24px;
  }
}

/* ── Template detail modal ── */
body.tpl-modal-open {
  overflow: hidden;
}

.tpl-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.tpl-modal[hidden] {
  display: none !important;
}

.tpl-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 16, 0.62);
  backdrop-filter: blur(6px);
}

.tpl-modal__panel {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  max-height: min(92vh, 920px);
}

.tpl-modal__dialog {
  position: relative;
  width: 100%;
  max-height: min(92vh, 920px);
  overflow: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.45);
  padding: 28px 28px 24px;
  font-family: Pretendard, Arial, system-ui, sans-serif;
  color: #121212;
}

.tpl-modal__close {
  position: absolute;
  top: -6px;
  right: 0;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #121212;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-50%);
}

.tpl-modal__close:hover {
  background: rgba(18, 18, 18, 0.12);
}

.tpl-modal__top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 28px;
  align-items: start;
}

.tpl-modal__media {
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 45%, #d1d5db 100%);
  border: 1px solid rgba(18, 18, 18, 0.08);
  aspect-ratio: 16 / 10;
  position: relative;
}

.tpl-modal__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tpl-modal__img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(18, 18, 18, 0.42);
}

.tpl-modal__eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: rgba(18, 18, 18, 0.42);
}

.tpl-modal__title {
  margin: 10px 0 0;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.tpl-modal__meta {
  margin: 22px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(18, 18, 18, 0.08);
}

.tpl-modal__meta-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  line-height: 1.6;
}

.tpl-modal__meta-row dt {
  margin: 0;
  color: rgba(18, 18, 18, 0.48);
  font-weight: 600;
}

.tpl-modal__meta-row dd {
  margin: 0;
  color: #121212;
}

.tpl-modal__meta-row--price dd {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.tpl-modal__meta-row--price dd span {
  font-size: 15px;
  font-weight: 600;
  margin-left: 2px;
}

.tpl-modal__desc {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(18, 18, 18, 0.62);
}

.tpl-modal__demo-wrap {
  margin: 14px 0 0;
}

.tpl-modal__demo {
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  color: #121212;
}

.tpl-modal__options {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(18, 18, 18, 0.08);
}

.tpl-modal__options-title {
  margin: 0 0 14px;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.tpl-modal__options-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tpl-modal__option-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(18, 18, 18, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.tpl-modal__option-label:hover {
  border-color: rgba(18, 18, 18, 0.22);
}

.tpl-modal__option-label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tpl-modal__option-check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid rgba(18, 18, 18, 0.22);
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
}

.tpl-modal__option-label input:checked + .tpl-modal__option-check {
  background: #121212;
  border-color: #121212;
}

.tpl-modal__option-label input:checked + .tpl-modal__option-check::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.tpl-modal__option-label input:checked ~ .tpl-modal__option-body .tpl-modal__option-name {
  color: #121212;
}

.tpl-modal__option-label:has(input:checked) {
  border-color: #121212;
  background: rgba(18, 18, 18, 0.03);
}

.tpl-modal__option-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.tpl-modal__option-name {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(18, 18, 18, 0.82);
}

.tpl-modal__option-price {
  font-size: 13px;
  color: rgba(18, 18, 18, 0.52);
}

.tpl-modal__footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(18, 18, 18, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.tpl-modal__total-label {
  display: block;
  font-size: 12px;
  color: rgba(18, 18, 18, 0.48);
  margin-bottom: 4px;
}

.tpl-modal__total-value {
  font-size: 28px;
  letter-spacing: -0.03em;
}

.tpl-modal__total-unit {
  font-size: 16px;
  font-weight: 700;
  margin-left: 2px;
}

.tpl-modal__total-note {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: rgba(18, 18, 18, 0.42);
}

.tpl-modal__cta {
  border: 0;
  border-radius: 999px;
  background: #121212;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 24px;
  cursor: pointer;
  white-space: nowrap;
}

.tpl-modal__cta:hover {
  transform: translateY(-1px);
}

@media (max-width: 860px) {
  .tpl-modal__top {
    grid-template-columns: 1fr;
  }

  .tpl-modal__options-list {
    grid-template-columns: 1fr;
  }

  .tpl-modal__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .tpl-modal__cta {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .tpl-modal {
    padding: 12px;
    padding-top: 28px;
  }

  .tpl-modal__close {
    top: -4px;
    right: 4px;
  }

  .tpl-modal__dialog {
    padding: 22px 18px 18px;
    border-radius: 16px;
  }
}
