/* ==========================================================================
   첫 화면 9차 (2026-11-16 하투키 서드 · 이동국님 「배포해」)
   ① 맨 위 3칸(.hx) = 지금 파는 겨울 신상 3개(레더 워머 패딩 점퍼 · 투웨이 하찌 니트집업 · 기모 성조기 후드집업)
      칸마다 다른 짜임: 큰 사진 + 확대 두 장 / 검은 바탕 네 칸 / 모델 + 메모판
   ② 그 아래 겨울 배너 3칸(.wb) = 니트 모음전 · 한파 아우터 · 2개 담으면 무료배송(택배차는 htk-home9-2026.js 가 코드로 그림)
   사진 = 상품 상세 사진에서 잘라 쓴 것 + 분류 띠 묶음 사진 · 그림 생성 0 · 사진 창고 hearttokiss/home-9cha/
   전에 있던 것: 맨 위 고정 사진 3장(hero-wide.js HTK_HERO_FIXED) · 산타 선물 상자 배너(htk-santa-2026.*) — 파일은 그대로 둠
   ========================================================================== */

.hx, .wb {
  --h9-head: 'Pretendard', 'IBM Plex Sans KR', 'Malgun Gothic', sans-serif;
  --h9-latin: 'Montserrat', 'IBM Plex Sans KR', sans-serif;
  --h9-hand: 'Nanum Pen Script', 'IBM Plex Sans KR', sans-serif;
  --h9-ease: cubic-bezier(.22, 1, .36, 1);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

/* ══ ① 맨 위 3칸 · 정사각 ══ */
.hx { position: relative; width: 100%; margin: 0; padding: 0; }
.hx__track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(4px, .55vw, 10px); }
.hx__p {
  position: relative; display: block; overflow: hidden; aspect-ratio: 1 / 1;
  container-type: inline-size; isolation: isolate;
  background: #d9d4cc; color: #fff; text-decoration: none;
}
.hx__p:hover, .hx__p:focus { color: #fff; }
.hx__p:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.hx__main { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; object-fit: cover; z-index: -2; transition: transform 1.1s var(--h9-ease); }
.hx__p:hover .hx__main { transform: scale(1.025); }

/* 왼쪽 아래 제목 + 한 줄 + 가격 */
.hx .hx__txt { position: absolute; left: 5.4cqw; right: 6cqw; bottom: 5.8cqw; z-index: 2; margin: 0; color: #fff; font-family: var(--h9-head); font-weight: 400; letter-spacing: normal; text-shadow: 0 1px 14px rgba(0, 0, 0, .28); }
.hx__title { display: block; font: 600 max(14px, 4.5cqw)/1.25 var(--h9-head); letter-spacing: -.03em; white-space: nowrap; }
.hx__title em { font-style: normal; font-weight: 500; opacity: .82; margin-right: .2em; }
.hx__sub { display: block; margin-top: 1.5cqw; font: 400 max(12px, 2.75cqw)/1.45 var(--h9-head); letter-spacing: -.02em; color: rgba(255, 255, 255, .86); }
.hx__price { display: block; margin-top: 2.2cqw; font: 700 max(13px, 3.6cqw)/1 var(--h9-head); letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: #fff; }
.hx__price small { font-size: .8em; font-weight: 600; margin-left: .06em; }
.hx__shade { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(8, 7, 6, .66) 0%, rgba(8, 7, 6, .34) 26%, rgba(8, 7, 6, 0) 50%); }

/* 레더 워머 패딩 점퍼: 큰 사진 + 흰 테 확대 두 장 */
.hx__p--coat .hx__main { object-position: 50% 0%; }
.hx__inset {
  position: absolute; z-index: 1; margin: 0; aspect-ratio: 1 / 1; overflow: hidden;
  border: 1.5px solid rgba(244, 238, 228, .9); box-shadow: 0 .8cqw 2.6cqw rgba(0, 0, 0, .28);
}
.hx__inset img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hx__inset--a { left: 5.2cqw; top: 5.2cqw; width: 21cqw; }
.hx__inset--b { right: 5.2cqw; top: 46cqw; width: 22cqw; }

/* 투웨이 하찌 니트집업: 검은 바탕 네 칸 */
.hx__p--grid { background: #0b0b0b; }
.hx__grid { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 1.8cqw; padding: 2.4cqw; }
.hx__grid img { width: 100%; height: 100%; min-height: 0; object-fit: cover; display: block; transition: transform 1.1s var(--h9-ease); }
.hx__p--grid:hover .hx__grid img { transform: scale(1.02); }

/* 기모 성조기 후드집업: 모델 + 왼쪽 메모판 */
.hx__p--mood { background: #e7e2da; }
.mood__sheet {
  position: absolute; left: 3.5cqw; top: 22cqw; width: 43cqw; height: 71cqw; z-index: 1;
  background: #f3efe7; transform: rotate(-1.2deg);
  box-shadow: 0 1.4cqw 4cqw rgba(40, 30, 20, .2), 0 .2cqw .5cqw rgba(40, 30, 20, .12);
}
.mood__photo {
  position: absolute; left: 6cqw; top: 13cqw; width: 23cqw; z-index: 2; margin: 0;
  padding: 2.3cqw 1.1cqw 3cqw; background: #fff; transform: rotate(-2.5deg);
  box-shadow: 0 1cqw 2.6cqw rgba(30, 20, 10, .24);
}
.mood__photo img { width: 100%; aspect-ratio: 300 / 330; object-fit: cover; display: block; }
.mood__clip { position: absolute; left: 50%; top: -4.7cqw; width: 8.4cqw; transform: translateX(-50%); display: block; }
.mood__sketch {
  position: absolute; left: 11cqw; top: 40cqw; width: 36cqw; z-index: 3; margin: 0;
  padding: 1.4cqw 1.2cqw; background: #fbf9f4; transform: rotate(2.6deg);
  box-shadow: 0 1cqw 2.8cqw rgba(30, 20, 10, .22);
}
.mood__sketch svg { width: 100%; height: auto; display: block; }
.hx .mood__note {
  position: absolute; left: 7cqw; top: 73cqw; z-index: 3; margin: 0;
  font: 400 4.1cqw/1.12 var(--h9-hand); color: #2e2924; transform: rotate(-1.2deg);
}
.mood__note span { display: block; }
.mood__note .n-price { font-size: 5.2cqw; margin-top: .4cqw; }
.hx .mood__badge {
  position: absolute; right: 4cqw; top: 4cqw; width: 19cqw; aspect-ratio: 1 / 1; z-index: 4; margin: 0;
  border-radius: 50%; overflow: hidden; display: grid; place-content: center; text-align: center;
  background: url('https://img.hearttokiss.com/hearttokiss/home-9cha/flg-fleece.__a5a441af.jpg') center / cover;
  border: 1px solid rgba(255, 255, 255, .6); box-shadow: 0 1cqw 2.8cqw rgba(0, 0, 0, .28);
}
.mood__badge::before { content: ''; position: absolute; inset: 0; background: rgba(22, 20, 18, .52); }
.mood__badge span { position: relative; display: block; color: #fff; }
.mood__badge .b-en { font: 600 max(8px, 1.8cqw)/1 var(--h9-latin); letter-spacing: .22em; text-indent: .22em; opacity: .85; }
.mood__badge .b-kr { margin-top: .9cqw; font: 800 max(11px, 3.5cqw)/1 var(--h9-head); letter-spacing: -.03em; }

/* 11-18 가운데 칸 = 상품 네 개(이동국님 「중앙은 칸 4개를 제품 4개로」) · 칸마다 그 상품으로 감 · 아래 왼쪽 = 이름 + 값 */
.hx__q { position: relative; display: block; min-width: 0; min-height: 0; overflow: hidden; isolation: isolate; color: #fff; text-decoration: none; }
.hx__q:hover, .hx__q:focus { color: #fff; }
.hx__q:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.hx__grid .hx__q img { position: absolute; inset: 0; z-index: -1; max-width: none; }
.hx__q::after { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(8, 7, 6, .64) 0%, rgba(8, 7, 6, .3) 28%, rgba(8, 7, 6, 0) 52%); }
.hx__qtxt { position: absolute; left: 2.6cqw; right: 2.6cqw; bottom: 2.5cqw; z-index: 1; text-shadow: 0 1px 10px rgba(0, 0, 0, .3); }
.hx__qname { display: block; font: 600 max(11px, 2.9cqw)/1.25 var(--h9-head); letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx__qprice { display: block; margin-top: .9cqw; font: 700 max(11px, 2.7cqw)/1 var(--h9-head); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.hx__qprice small { font-size: .8em; font-weight: 600; margin-left: .06em; }
/* 칸 전체가 아니라 손 올린 상품만 살짝 커짐 */
.hx__p--quad:hover .hx__grid img { transform: none; }
.hx__p--quad .hx__q:hover img { transform: scale(1.035); }

/* 폰 넘김 숫자(넓은 화면에선 숨김) */
.hx__count, .wb__count {
  display: none; position: absolute; right: 12px; bottom: 12px; z-index: 5; margin: 0;
  padding: 6px 10px; border-radius: 999px; background: rgba(0, 0, 0, .62); color: #fff;
  font: 700 11px/1 var(--h9-head); letter-spacing: .02em; font-variant-numeric: tabular-nums; pointer-events: none;
}
.hx__count b, .wb__count b { font-weight: 700; }
.hx__count i, .wb__count i { font-style: normal; opacity: .7; margin: 0 .3em; }

/* ══ ② 겨울 배너 3칸 · 가로 8 : 세로 7 ══ */
.wb { position: relative; width: 100%; margin: clamp(40px, 4vw, 64px) 0 0; }
.wb__track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wb__tile {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 8 / 7; container-type: inline-size;
  background: #e9e5e1; color: #fff; text-decoration: none; isolation: isolate;
}
.wb__tile:hover, .wb__tile:focus { color: #fff; }
.wb__art { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; object-fit: cover; z-index: -2; transition: transform 1.1s var(--h9-ease); }
.wb__tile:hover .wb__art { transform: scale(1.03); }
.wb__tile:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
/* 글 읽히게 아래만 살짝 어둡게 + 가장자리 은은하게 */
.wb__tile::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, rgba(10, 8, 6, .56) 0%, rgba(10, 8, 6, .26) 27%, rgba(10, 8, 6, 0) 50%),
    radial-gradient(130% 100% at 50% 38%, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, .14) 100%);
}
/* 묶음 사진은 세로로 긴 사진 → 사진 전체가 들어오게 줄여 넣고 남는 자리는 사진 바탕색과 똑같이 */
.wb__tile--knit { background: #ebe8e3; }
.wb__tile--pad  { background: #e3e8ec; }
.wb__art--knit, .wb__art--pad { top: 3.5%; bottom: auto; height: 96%; object-fit: contain; object-position: 50% 0%; }

/* 니트·아우터 칸: 아래 가운데 */
.wb .pile { position: absolute; left: 0; right: 0; bottom: 6.2cqw; margin: 0; padding: 0 3cqw; text-align: center; color: #fff; font-family: var(--h9-head); font-weight: 400; letter-spacing: normal; text-shadow: 0 2px 22px rgba(0, 0, 0, .3); }
.pile__sub { display: block; font: 700 max(12px, 3.6cqw)/1.25 var(--h9-head); letter-spacing: -.025em; color: #fff; }
.pile__title { display: block; margin-top: 1.2cqw; font: 800 18.4cqw/1 var(--h9-head); letter-spacing: -.045em; color: #fff; white-space: nowrap; }

/* 무료배송 칸: 왼쪽 아래 */
.wb .ship { position: absolute; left: 5.8cqw; right: 4cqw; bottom: 6.6cqw; margin: 0; text-align: left; color: #fff; font-family: var(--h9-head); font-weight: 400; letter-spacing: normal; text-shadow: 0 2px 18px rgba(0, 0, 0, .24); }
.ship__sub { display: block; font: 700 max(12px, 4.4cqw)/1.25 var(--h9-head); letter-spacing: -.03em; color: #fff; }
.ship__title { display: block; margin-top: 1.4cqw; font: 800 8.8cqw/1.05 var(--h9-head); letter-spacing: -.04em; color: #fff; white-space: nowrap; }

/* 11-19 이동국님 「너무 큰데 · 가운데 좀 작게」 = 넓은 화면에서만 가운데 좁은 틀(1920 화면 = 칸 450×519) + 칸 사이 띄움
   글씨는 칸 너비 따라 같이 줄어듦 · 폰(767 이하)은 그대로 · 되돌리기 = 이 덩어리만 지움 */
@media (min-width: 768px) {
  .wb { width: min(1410px, 74vw); margin-left: auto; margin-right: auto; }
  .wb__track { gap: clamp(16px, 1.6vw, 30px); }
  .wb__tile { aspect-ratio: 450 / 519; }
}

/* 겨울 배너 글씨 = 은색 금속 + 옅은 회색 빛 (2026-11-16 이동국님 「시안 C 수정 · 빛 번짐 약하게」 · 시안 = 작업물\하투키\배너글씨\2026-11-16\보기.html)
   큰 글씨 = 위는 밝고 가운데 회색 띠가 지나가는 은빛 + 아래로 가는 두께 2겹 + 아주 좁은 회색 빛
   작은 글씨 = 연회색 + 얇은 두께 + 옅은 빛 · 되돌리기 = 이 덩어리만 지움 */
.wb .pile, .wb .ship { text-shadow: none; }
.wb .pile__sub, .wb .ship__sub {
  color: #eceef1;
  text-shadow: 0 .04em 0 #9a9ea4, 0 0 .22em rgba(225, 228, 233, .38), 0 1px 8px rgba(0, 0, 0, .3);
}
.wb .pile__title, .wb .ship__title {
  color: #e9ebee;
  text-shadow: 0 .05em .08em rgba(0, 0, 0, .38);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .wb .pile__title, .wb .ship__title {
    background: linear-gradient(180deg, #ffffff 0%, #f1f2f4 34%, #b4b9c0 50%, #e6e8eb 60%, #8e939a 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    filter:
      drop-shadow(0 0 .012em rgba(36, 38, 42, .6))
      drop-shadow(0 .012em 0 #8e9298)
      drop-shadow(0 .012em 0 #72767c)
      drop-shadow(0 .05em .08em rgba(0, 0, 0, .38))
      drop-shadow(0 0 .08em rgba(222, 225, 231, .4));
  }
}

/* ══ 폰: 두 줄 다 한 칸씩 옆으로 넘김 ══ */
@media (max-width: 767px) {
  .hx__track, .wb__track {
    display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .hx__track::-webkit-scrollbar, .wb__track::-webkit-scrollbar { display: none; }
  .hx__p, .wb__tile { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
  .hx__count, .wb__count { display: block; }
  /* 아래 오른쪽 넘김 숫자와 안 겹치게 글을 조금 올림 */
  .hx .hx__txt { bottom: 12.5cqw; right: 5.4cqw; }
  .wb { margin-top: 32px; }
  .wb .pile, .wb .ship { bottom: 11.5cqw; }
}
@media (prefers-reduced-motion: reduce) {
  .wb__art, .hx__main, .hx__grid img { transition: none; }
  .wb__tile:hover .wb__art, .hx__p:hover .hx__main, .hx__p--grid:hover .hx__grid img, .hx__p--quad .hx__q:hover img { transform: none; }
}
