:root {
  --paper: #FCFBFB;
  --ink: #242222;
  --gray: #6B6666;
  --rose: #E3A0A8;
  --rose-deep: #A8485C;
  --rose-soft: #F6E9EB;
  --line: #E7E1E2;
  --tone-1: #F6E9EB;
  --tone-2: #EDE6E4;
  --tone-3: #E6DDDF;
  --tone-4: #F1ECEB;
  --tone-5: #E9E0E2;
  --font: "Pretendard Variable", Pretendard, "Malgun Gothic", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, p, dl, dd { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 100; }
.skip:focus { top: 8px; }

/* 안내 띠 */
.notice { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 var(--gutter); background: var(--rose-soft); font-size: 14px; }
.notice.is-hidden { display: none; }
.notice-close { min-width: 44px; min-height: 44px; background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; }

/* 헤더 */
.site-header { position: relative; z-index: 30; padding: 0 var(--gutter); }
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 84px; gap: 16px; }
.logo { display: block; }
.logo img { height: 76px; width: auto; }
.logo.small img { height: 64px; }

.search { position: relative; display: flex; max-width: 300px; border-bottom: 1px solid var(--ink); }
.search input { flex: 1; min-width: 0; height: 44px; border: 0; background: none; padding: 0 4px; }
.search input::placeholder { color: var(--gray); }
.search input:focus-visible { outline-offset: 2px; }
.search button { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0; background: none; border: 0; }
.search button svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
.search-msg { position: absolute; top: 100%; left: 0; margin-top: 6px; font-size: 14px; color: var(--rose-deep); z-index: 5; background: var(--paper); }
.search-msg:empty { display: none; }

.utility { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 13px; letter-spacing: .06em; }
.utility a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; }
.utility a:hover { color: var(--rose-deep); }
.cart-link span { margin-left: 4px; font-weight: 600; color: var(--rose-deep); }
.menu-toggle { display: none; }

.main-nav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.main-nav > ul { display: flex; justify-content: center; gap: clamp(8px, 2.4vw, 40px); flex-wrap: wrap; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 6px; font-size: 15px; font-weight: 500; color: #4A4646; }
.main-nav > ul > li:hover > a, .main-nav > ul > li:focus-within > a { color: #A7A2A3; }
.sub-toggle { display: none; }
.sub { position: absolute; top: 100%; left: 50%; min-width: 156px; padding: 8px 0; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 20px rgba(36, 34, 34, .08); opacity: 0; visibility: hidden; transform: translate(-50%, 6px); z-index: 40; }
.sub a { display: block; padding: 9px 20px; font-size: 14px; color: #4A4646; white-space: nowrap; }
.sub a:hover, .sub a:focus-visible { background: #F3F1F1; color: var(--ink); }
.has-sub:hover > .sub, .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: no-preference) {
  .sub { transition: opacity .18s, transform .18s, visibility .18s; }
}

/* 첫 화면 */
.hero { position: relative; display: grid; grid-template-columns: 62fr 38fr; height: clamp(520px, calc(100dvh - 190px), 680px); overflow: hidden; }
.hero-photo { position: relative; height: 100%; background: var(--tone-1); overflow: hidden; }
.hero-text { align-self: center; padding: 0 clamp(24px, 5vw, 80px); position: relative; z-index: 1; }
.hero h1 { word-break: keep-all; text-wrap: balance; font-size: clamp(32px, 3.6vw, 52px); line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; max-width: 14em; }
.hero-text p { margin-top: 16px; color: var(--gray); max-width: 26em; }
.hero-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-line path { fill: none; stroke: var(--rose); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .hero-line path { stroke-dashoffset: 1; animation: draw 5s cubic-bezier(.65, 0, .35, 1) infinite; }
  @keyframes draw {
    0% { stroke-dashoffset: 1; opacity: 1; }
    48% { stroke-dashoffset: 0; opacity: 1; }
    88% { stroke-dashoffset: 0; opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 0; }
  }
}

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 28px; padding: 0 32px; background: var(--ink); color: var(--paper); font-weight: 600; white-space: nowrap; }
.btn:hover { background: #3B3737; }
.btn:active { transform: translateY(1px); }

/* 임시 이미지 */
.ph { position: relative; display: block; background: var(--tone-1); }
.ph-label { position: absolute; left: 20px; bottom: 16px; font-size: 14px; color: var(--gray); }

/* 섹션 공통 */
.section { padding: clamp(56px, 8vw, 112px) var(--gutter) 0; }
.section h2 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; }

/* 이번 주 인기 */

/* 상품 공통 */
.item { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.name { font-weight: 500; line-height: 1.4; }
.dots { display: flex; gap: 6px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line); background: var(--c); }
.price { font-weight: 600; }
.price s { margin-right: 6px; font-weight: 400; color: var(--gray); }
.price em { font-style: normal; color: var(--rose-deep); margin-right: 6px; }
.add { align-self: flex-start; min-height: 44px; padding: 0 16px; background: none; border: 1px solid var(--ink); font-weight: 500; white-space: nowrap; }
.add:hover { background: var(--ink); color: var(--paper); }
.add:active { transform: translateY(1px); }

/* 이용 안내 */
.info dl { margin-top: 24px; max-width: 760px; }
.info dl div { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 18px 0; }
.info dl div + div { border-top: 1px solid var(--line); }
.info dt { font-weight: 600; }
.info dd { color: var(--gray); }

/* 푸터 */
.site-footer { margin-top: clamp(64px, 9vw, 120px); padding: 40px var(--gutter) 48px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer ul a { display: inline-flex; min-height: 44px; align-items: center; font-size: 14px; }
.site-footer summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-size: 14px; }
.site-footer details p { color: var(--gray); font-size: 14px; max-width: 40em; }
.copy { color: var(--gray); font-size: 14px; }

/* 알림 */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: 14px 22px; opacity: 0; pointer-events: none; z-index: 50; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: no-preference) { .toast { transition: opacity .25s, transform .25s; } }

/* 모바일 */
@media (max-width: 860px) {
  .top { grid-template-columns: auto 1fr auto; min-height: 64px; gap: 8px; }
  .logo { justify-self: center; grid-column: 2; grid-row: 1; }
  .logo img { height: 56px; }
  .utility { grid-column: 3; grid-row: 1; }
  .utility a:not(.cart-link) { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; background: none; border: 0; font-weight: 600; }
  .search { grid-column: 1; grid-row: 1; max-width: none; border: 0; }
  .search input { position: absolute; inset: 100% 0 auto 0; width: calc(100vw - 32px); }
  .search:not(:focus-within) input { position: absolute; width: 1px; height: 1px; opacity: 0; padding: 0; }
  .search-msg { top: calc(100% + 44px); }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .main-nav > ul > li > a { display: flex; min-height: 48px; font-size: 16px; }
  .main-nav > ul > li + li { border-top: 1px solid var(--line); }
  .main-nav > ul > li.has-sub { display: flex; flex-wrap: wrap; align-items: center; }
  .main-nav > ul > li.has-sub > a { flex: 1; }
  .sub-toggle { display: block; position: relative; width: 48px; height: 48px; background: none; border: 0; }
  .sub-toggle::before, .sub-toggle::after { content: ""; position: absolute; left: 17px; top: 23px; width: 14px; height: 2px; background: var(--ink); }
  .sub-toggle::after { transform: rotate(90deg); }
  .has-sub.open > .sub-toggle::after { transform: none; }
  .sub { position: static; flex-basis: 100%; min-width: 0; padding: 0 0 8px 12px; border: 0; box-shadow: none; background: none; transform: none; opacity: 1; visibility: visible; display: none; }
  .has-sub.open > .sub { display: block; }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub { transform: none; }
  .has-sub:not(.open):hover > .sub, .has-sub:not(.open):focus-within > .sub { display: none; }
  .sub a { padding: 11px 8px; }

  .hero { grid-template-columns: 1fr; grid-template-rows: auto auto; height: auto; }
  .hero-photo { aspect-ratio: 4 / 5; height: auto; }
  .hero-text { padding: 28px var(--gutter) 8px; }


  .info dl div { grid-template-columns: 1fr; gap: 4px; }
}

/* ---- 사진 ---- */
.ph img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.ph { overflow: hidden; }
a.ph { display: block; }
.item .ph { aspect-ratio: 3 / 4; }

/* ---- 목록 페이지 ---- */
.list-page h1 { font-size: clamp(26px, 3vw, 38px); line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; }
.lead { margin-top: 8px; color: var(--gray); }
.list-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 32px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.count { color: var(--gray); font-size: 14px; }
.list-page > .count { margin-top: 24px; }
.sort-label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.sort-label select { min-height: 44px; padding: 0 12px; border: 1px solid var(--ink); background: var(--paper); border-radius: 0; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 16px; margin-top: 28px; }
.empty { grid-column: 1 / -1; color: var(--gray); padding: 40px 0; }
.more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.more:hover { color: var(--rose-deep); }

/* ---- 상품 상세 ---- */
.detail { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.detail-photo { background: var(--tone-1); }
.detail-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; }
.detail-info { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.detail-info h1 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.35; font-weight: 600; letter-spacing: -0.02em; word-break: keep-all; }
.detail-info .price { font-size: 20px; }
.detail-info dl { width: 100%; border-top: 1px solid var(--line); }
.detail-info dl div { display: grid; grid-template-columns: 80px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.detail-info dt { font-weight: 600; }
.detail-info dd { color: var(--gray); }
.back { display: inline-flex; align-items: center; min-height: 44px; color: var(--gray); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.add-lg { width: 100%; max-width: 360px; justify-content: center; background: var(--ink); color: var(--paper); min-height: 52px; }
.add-lg:hover { background: #3B3737; }
.main-nav a[aria-current="true"], .main-nav a[aria-current="page"] { color: var(--rose-deep); box-shadow: inset 0 -2px 0 var(--rose); }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 28px 12px; }
  .detail { grid-template-columns: 1fr; }
  .list-bar { flex-wrap: wrap; }
}

.list-page { padding-top: clamp(32px, 4vw, 56px); }

/* ---- 첫 화면 슬라이드 ---- */
.slides { display: flex; height: 100%; }
.slide { position: relative; flex: 0 0 100%; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.slide .cap { position: absolute; left: 20px; bottom: 40px; max-width: calc(100% - 40px); padding: 6px 12px; background: rgba(252, 251, 251, .9); font-size: 14px; }
.s-arrow { position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); color: var(--ink); }
.s-arrow:hover { background: #fff; }
.s-arrow::before { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border: solid var(--ink); border-width: 0 0 2px 2px; }
.s-prev { left: 12px; }
.s-prev::before { transform: translate(-30%, -50%) rotate(45deg); }
.s-next { right: 12px; }
.s-next::before { transform: translate(-70%, -50%) rotate(-135deg); }
.s-dots { position: absolute; left: 0; right: 0; bottom: 8px; z-index: 2; display: flex; justify-content: center; }
.s-dots button { position: relative; width: 28px; height: 28px; background: none; border: 0; }
.s-dots button::before { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: rgba(36, 34, 34, .28); }
.s-dots button[aria-current="true"]::before { background: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .slides { transition: transform .6s cubic-bezier(.65, 0, .35, 1); }
}

/* ---- 섹션 (BEST / NEW ITEM / MOLLY'S PICK / 상품 리뷰) ---- */
.sec-head { text-align: center; margin-bottom: 36px; }
.sec-head h2 { font-size: clamp(26px, 2.8vw, 36px); letter-spacing: .02em; }
.sec-head p { margin-top: 8px; color: var(--gray); font-size: 14px; }
.sec-foot { display: flex; justify-content: center; margin-top: 36px; }
.sec-foot .more { margin-top: 0; }
.btn-line { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 36px; border: 1px solid var(--ink); font-weight: 500; }
.btn-line:hover { background: var(--ink); color: var(--paper); }

.banner { position: relative; margin: clamp(56px, 8vw, 112px) var(--gutter) 0; aspect-ratio: 16 / 5; min-height: 140px; overflow: hidden; background: var(--tone-4); }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner p { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 16px; text-align: center; font-size: clamp(16px, 2vw, 24px); font-weight: 500; color: var(--gray); }
.banner + .sec { padding-top: clamp(56px, 8vw, 112px); }

/* ---- 상품 카드 (이미지 중심) ---- */
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 44px 16px; }
.pcard { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pimg { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--tone-1); }
.pimg a { display: block; height: 100%; }
.pimg img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.pcard .dots { margin-top: 4px; }
.pcard .name { font-size: 14px; font-weight: 400; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .price { font-size: 14px; }
.pcard:hover .name { text-decoration: underline; text-underline-offset: 3px; }
.pact { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; opacity: 0; transform: translateY(6px); }
.pcard:hover .pact, .pcard:focus-within .pact { opacity: 1; transform: none; }
@media (hover: none) { .pact { opacity: 1; transform: none; } }
.add-ico, .wish-ico { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); }
.add-ico:hover, .wish-ico:hover { background: #fff; }
.add-ico svg, .wish-ico svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wish-ico[aria-pressed="true"] svg { fill: var(--rose-deep); stroke: var(--rose-deep); }
@media (prefers-reduced-motion: no-preference) {
  .pact { transition: opacity .2s, transform .2s; }
}

/* ---- 상품 리뷰 ---- */
.rgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 16px; }
.rcard { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stars { color: #E0A93B; letter-spacing: 2px; font-size: 15px; }
.stars span { color: var(--line); }
.rtitle { font-size: 14px; font-weight: 500; }
.rmeta { font-size: 13px; color: var(--gray); }
.rimg { display: block; aspect-ratio: 1 / 1; margin-top: 4px; overflow: hidden; background: var(--tone-1); }
.rimg img { width: 100%; height: 100%; object-fit: cover; }
.rcard .name { font-size: 13px; color: var(--gray); font-weight: 400; }

/* ---- 스크롤하면 하나씩 나타나는 효과 ---- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
  .js .reveal.show { opacity: 1; transform: none; }
}

/* ---- 왼쪽 섹션 메뉴 ---- */
.side-nav { position: fixed; left: 14px; top: 50%; z-index: 20; display: none; flex-direction: column; gap: 2px; padding: 8px; background: rgba(255, 255, 255, .92); border: 1px solid var(--line); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(-50%); }
.side-nav.visible { opacity: 1; pointer-events: auto; }
.side-nav a { display: flex; align-items: center; min-height: 32px; padding: 0 8px; color: var(--gray); white-space: nowrap; }
.side-nav a:hover { color: var(--ink); }
.side-nav a.on { color: var(--ink); font-weight: 700; background: var(--rose-soft); }
@media (min-width: 1280px) { .side-nav { display: flex; } }
@media (prefers-reduced-motion: no-preference) { .side-nav { transition: opacity .3s; } }

@media (max-width: 860px) {
  .pgrid, .rgrid { grid-template-columns: 1fr 1fr; gap: 28px 12px; }
  .banner { aspect-ratio: 16 / 7; }
}

@media (min-width: 1280px) {
  .sec { padding-left: 144px; padding-right: 144px; }
  .banner { margin-left: 144px; margin-right: 144px; }
}

/* ---- 세부 종류 탭 ---- */
.subtabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.subtabs:empty { display: none; }
.subtabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); font-size: 14px; }
.subtabs a:hover { border-color: var(--ink); }
.subtabs a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---- 히어로 문구 ---- */
.hero h1 { font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif; font-weight: 500; letter-spacing: 0; line-height: 1.1; text-wrap: nowrap; }
.hero h1 span { display: block; }
.hero h1 .h-a { font-family: "Great Vibes", "Snell Roundhand", cursive; font-size: clamp(60px, 6.4vw, 100px); font-weight: 400; line-height: 1.05; }
.hero h1 .h-b { margin-top: 6px; font-size: clamp(30px, 3.2vw, 50px); font-style: italic; }
