/* 홈의 시계 줄 — 카테고리별 가로 스크롤 목록. 한 화면에 세 장이 보인다. */

.hrow-block { margin: 34px 0; }
.hrow-block[hidden] { display: none; }
/* 줄 사이 연한 구분 밴드 */
.hrow-block + .hrow-block::before {
  content: ''; display: block; height: 8px; margin: 0 0 34px;
  background: #f4f5f6;
}

.hrow-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 0 20px; margin-bottom: 16px;
}
.hrow-head-copy { min-width: 0; }
.hrow-title {
  margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.045em; color: #171719;
}
.hrow-description {
  margin: 5px 0 0; font-size: 12.5px; font-weight: 550; line-height: 1.4;
  letter-spacing: -.025em; color: #8a8a90;
}
.hrow-settings {
  flex: 0 0 auto; height: 36px; padding: 0 11px; border: 1px solid #dedee2;
  border-radius: 999px; display: inline-flex; align-items: center; gap: 5px;
  color: #55565b; background: #fff; font-size: 11px; font-weight: 750; cursor: pointer;
}
.hrow-settings[hidden] { display: none; }
.hrow-settings svg { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.hrow-rail {
  display: flex; gap: 14px; padding: 0 0 2px; overflow-x: auto; overflow-y: hidden;
  cursor: grab; scroll-snap-type: x proximity;
  scroll-padding-inline: 20px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.hrow-rail::-webkit-scrollbar { display: none; }
.hrow-rail.drag { cursor: grabbing; scroll-snap-type: none; }

/* 바이버식 가로 스크롤 진행 표시 */
.hrow-progress {
  position: relative; height: 3px; margin: 12px 20px 0; border-radius: 999px;
  background: #ececee; overflow: hidden;
}
.hrow-progress span {
  position: absolute; top: 0; height: 100%; border-radius: 999px;
  background: #1a2925; transition: left .06s linear;
}

/* 약 2.3장이 보이고 다음 카드가 살짝 걸쳐 스크롤을 유도한다.
   min-width:0 이 없으면 flex 자식이 글자 폭 아래로 안 줄어든다. */
.hrow-card {
  flex: 0 0 162px; min-width: 0; display: flex; flex-direction: column; scroll-snap-align: start;
  color: inherit; text-decoration: none;
  -webkit-user-select: none; user-select: none;
  outline: none;
}
.hrow-card:focus-visible {
  outline: none;
}
.hrow-card:focus-visible .hrow-name {
  text-decoration: underline; text-decoration-color: #1a2925;
  text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.hrow-card:first-child { margin-left: 20px; }
.hrow-card, .hrow-card * { -webkit-user-drag: none; }

/* 마지막 상품 뒤에서만 나타나는 전체보기 종료 카드 */
.hrow-view-all {
  flex: 0 0 118px; min-width: 0; min-height: 218px; align-self: stretch;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: #45454a; text-decoration: none; scroll-snap-align: end;
  -webkit-user-select: none; user-select: none;
}
.hrow-view-all:last-child { margin-right: 20px; }
.hrow-view-all-icon {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid #d9dadd; border-radius: 50%; background: #fff;
  font-size: 19px; line-height: 1; color: #222326;
}
.hrow-view-all-label { font-size: 13px; font-weight: 750; letter-spacing: -.03em; }

.hrow-img {
  position: relative; display: block; width: 100%; aspect-ratio: 1; margin-bottom: 11px;
  border-radius: 16px; background-color: #f2f3f5;
  /* 시계 크기·위치는 뱃지와 절대 겹치지 않는 값. 픽셀 비교로 확인한 조합이다. */
  background-size: 68%; background-repeat: no-repeat; background-position: center 58%;
}
/* 시계 아래 바닥 그림자 */
.hrow-shadow {
  position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%);
  width: 44%; height: 6.5%; border-radius: 50%; filter: blur(4px);
  background: radial-gradient(ellipse, rgba(23, 23, 25, .22), rgba(23, 23, 25, 0) 70%);
}
/* 각진 네모. 타일 왼쪽 위에 두되 시계(가운데 74%)와 절대 겹치지 않는다. */
.hrow-badge {
  position: absolute; left: 6px; top: 6px; z-index: 2; padding: 3px 7px; border-radius: 0;
  font-size: 10.5px; font-weight: 800; letter-spacing: -.02em; line-height: 1.5;
  color: #fff; white-space: nowrap;
}
.hrow-badge.is-rate { background: #1a2925; }
.hrow-badge.is-drop { background: #d4342a; }
.hrow-badge.is-new { background: #1a2925; letter-spacing: .04em; }
.hrow-sale-state {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  padding: 5px 9px; border-radius: 999px; color: #fff; background: rgba(26, 41, 37, .92);
  font-size: 10.5px; font-weight: 850; line-height: 1.2; letter-spacing: -.02em;
}
.hrow-sale-state.is-sold { background: rgba(17, 17, 17, .88); letter-spacing: .04em; }
.hrow-card.is-reserved .hrow-img,
.hrow-card.is-sold .hrow-img { background-color: #e8e9ea; }

/* 추천 매물 — 모바일·데스크톱 모두 2열, 최대 6줄(12점) */
#homeOnSale .hrow-head { padding: 0; }
#homeOnSale > .container { padding-top: 4px; }
#homeOnSale .home-sale-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 12px;
}
.home-sale-footer { margin-top: 28px; text-align: center; }
.home-sale-footer .home-sale-more {
  display: inline-flex; width: min(100%, 360px); height: 52px; align-items: center; justify-content: center;
  border: 1px solid #dedee2; border-radius: 12px; color: #171719; background: #fff;
  font-size: 14px; font-weight: 750; text-decoration: none;
}

.hrow-brand {
  display: block; min-height: 16px; margin-bottom: 2px; overflow: hidden;
  color: #77797e; font-size: 12px; font-weight: 650; line-height: 1.35;
  letter-spacing: .015em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap;
}
.hrow-model {
  display: -webkit-box; font-size: 14.5px; font-weight: 650; line-height: 1.4;
  letter-spacing: -.025em; color: #2a2a2e; min-height: 20px;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hrow-reference {
  display: block; min-height: 16px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis;
  color: #8a8c91; font-size: 11.5px; font-weight: 520; line-height: 1.35; white-space: nowrap;
}
.hrow-meta {
  display: block; min-height: 16px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; font-weight: 600; line-height: 1.45; letter-spacing: -.02em; color: #99999f;
}
.hrow-price {
  display: block; margin-top: auto; padding-top: 7px; font-size: 16px; font-weight: 850; letter-spacing: -.04em;
  color: #171719; white-space: nowrap;
}
/* 10억대처럼 자릿수가 긴 금액은 좁은 화면에서 줄이 깨지므로 한 단계 줄인다 */
.hrow-price.is-long { font-size: 11.5px; letter-spacing: -.05em; }
.hrow-price.is-long i { font-size: 10px; }
.hrow-price i { font-style: normal; font-size: 12.5px; font-weight: 800; margin-left: 1px; }
.hrow-old {
  display: block; margin-top: 3px; font-size: 11px; font-weight: 550; white-space: nowrap;
  color: #b0b0b6; text-decoration: line-through;
}

@media (min-width: 520px) {
  .hrow-card { flex-basis: 180px; }
  .hrow-view-all { flex-basis: 118px; min-height: 238px; }
}

body.hrow-settings-open { overflow: hidden; }
.hrow-settings-modal {
  position: fixed; inset: 0; z-index: 5200; display: grid; place-items: center; padding: 16px;
}
.hrow-settings-modal[hidden] { display: none; }
.hrow-settings-backdrop { position: absolute; inset: 0; background: rgba(17, 17, 19, .48); }
.hrow-settings-sheet {
  position: relative; width: min(100%, 420px); max-height: calc(100vh - 32px); overflow: auto;
  border-radius: 18px; background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
}
.hrow-settings-sheet header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 22px 16px; border-bottom: 1px solid #eeeeef;
}
.hrow-settings-sheet header small { display: block; margin-bottom: 4px; font-size: 10px; font-weight: 750; letter-spacing: .12em; color: #929297; }
.hrow-settings-sheet header h2 { margin: 0; font-size: 20px; letter-spacing: -.04em; }
.hrow-settings-sheet header button {
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  color: #55565b; background: #f3f3f5; font-size: 24px; line-height: 1; cursor: pointer;
}
.hrow-settings-sheet form { display: grid; gap: 16px; padding: 20px 22px 22px; }
.hrow-settings-sheet label { display: grid; gap: 7px; }
.hrow-settings-sheet label span { font-size: 12px; font-weight: 750; color: #55565b; }
.hrow-settings-sheet input {
  width: 100%; height: 46px; padding: 0 13px; border: 1px solid #dcdce0; border-radius: 10px;
  color: #171719; background: #fff; font: inherit; font-size: 14px;
}
.hrow-settings-sheet input:focus { outline: 2px solid #1a2925; outline-offset: 1px; }
.hrow-settings-sheet form > p { margin: -3px 0 0; font-size: 11.5px; line-height: 1.55; color: #89898f; }
.hrow-product-editor { display: grid; gap: 9px; min-height: 0; }
.hrow-product-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hrow-product-head strong { font-size: 13px; color: #333438; }
.hrow-product-head span { font-size: 12px; font-weight: 750; color: #1a2925; }
.hrow-product-editor > p { margin: -2px 0 0; font-size: 11px; line-height: 1.45; color: #89898f; }
.hrow-product-list {
  max-height: 300px; overflow: auto; border: 1px solid #e3e3e6; border-radius: 12px;
}
.hrow-product-option {
  display: grid; grid-template-columns: 20px 48px minmax(0, 1fr); align-items: center; gap: 10px;
  min-height: 66px; padding: 8px 10px; border-bottom: 1px solid #eeeeef; cursor: pointer;
}
.hrow-product-option:last-child { border-bottom: 0; }
.hrow-product-option[hidden] { display: none; }
.hrow-product-option > input { width: 17px; height: 17px; padding: 0; accent-color: #1a2925; }
.hrow-product-thumb {
  display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden;
  border-radius: 9px; background: #f2f3f5;
}
.hrow-product-thumb img { width: 86%; height: 86%; object-fit: contain; }
.hrow-product-copy { min-width: 0; display: grid; gap: 3px; }
.hrow-product-copy strong, .hrow-product-copy small {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hrow-product-copy strong { font-size: 12px; color: #252529; }
.hrow-product-copy small { font-size: 10.5px; color: #8b8b91; }
.hrow-settings-sheet footer { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 2px; }
.hrow-settings-sheet footer button {
  height: 46px; border: 1px solid #dedee2; border-radius: 10px; color: #333438;
  background: #fff; font-size: 13px; font-weight: 750; cursor: pointer;
}
.hrow-settings-sheet footer .is-primary { border-color: #1a2925; color: #fff; background: #1a2925; }
.hrow-settings-sheet footer button:disabled { opacity: .55; cursor: wait; }
