/* 오늘의 선반 (가상의 생활 소품 편집숍) — 모모듀 샘플 사이트
   하얀 바탕, 올리브 포인트, 작은 고정폭 글씨 라벨, 상품 사진이 주인공인 쇼핑몰 */
:root {
  --white: #FFFFFF;
  --sand: #F4F1EC;
  --ink: #232320;
  --muted: #74716A;
  --line: #E6E2DA;
  --olive: #5B6B3A;
  --olive-deep: #414D28;
  --sale: #B4452B;
  --font: 'Gowun Dodum', 'Malgun Gothic', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--font); font-size: 16.5px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-weight: 400; letter-spacing: -0.02em; line-height: 1.3; }
button { font: inherit; color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.mono { font-family: var(--mono); letter-spacing: .04em; }

.sample-bar { background: var(--ink); color: #E9E6DF; font-size: 13.5px; }
.sample-bar .wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px; padding-top: 7px; padding-bottom: 7px; text-align: center; }
.sample-bar a { color: #D7E1B8; font-weight: 700; text-decoration: none; white-space: nowrap; }
.notice { background: var(--sand); font-size: 13.5px; text-align: center; padding: 7px 12px; letter-spacing: .03em; }

/* 머리 */
.top { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.top .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 60px; gap: 10px; }
.top__menu { display: flex; gap: 18px; font-family: var(--mono); font-size: 13px; }
.top__menu a { text-decoration: none; color: var(--muted); }
.top__menu a[aria-current="page"], .top__menu a:hover { color: var(--ink); }
.logo { text-decoration: none; text-align: center; line-height: 1.05; }
.logo b { display: block; font-size: 21px; font-weight: 400; letter-spacing: -0.02em; }
.logo small { font-family: var(--mono); font-size: 10.5px; letter-spacing: .25em; color: var(--muted); }
.cart-btn { justify-self: end; background: none; border: 1px solid var(--ink); border-radius: 999px; padding: 6px 14px; font-family: var(--mono); font-size: 13px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.cart-btn b { background: var(--olive); color: var(--white); border-radius: 999px; min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; padding: 0 5px; }
.cart-btn.bump { animation: bump .4s ease; }
@keyframes bump { 40% { transform: scale(1.12); } }

/* 첫 화면 */
.hero { position: relative; }
.hero img { width: 100%; height: min(70vh, 560px); object-fit: cover; }
.hero__card { position: absolute; left: 18px; right: 18px; bottom: 18px; background: var(--white); padding: 20px 20px 22px; max-width: 420px; }
.hero__card p.mono { font-size: 12px; color: var(--olive); }
.hero__card h1 { font-size: 27px; margin: 6px 0 8px; }
.hero__card .desc { color: var(--muted); font-size: 15.5px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-family: var(--mono); font-size: 13.5px; text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }

/* 상품 목록 */
.sec { padding: 52px 0; }
.sec__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.sec__head h2 { font-size: 26px; }
.sec__head p { color: var(--muted); font-size: 15px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.cat { flex-shrink: 0; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 15px; cursor: pointer; color: var(--muted); }
.cat[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.sort { font-family: var(--mono); font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: var(--white); }
.count { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 12px; }
.card { position: relative; display: flex; flex-direction: column; gap: 8px; }
.card[hidden] { display: none; }
.card__img { position: relative; background: var(--sand); aspect-ratio: 1; overflow: hidden; display: block; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__img img { transform: scale(1.04); }
.swatch-linen { display: block; width: 100%; height: 100%; background: repeating-linear-gradient(90deg, #E9E3D6 0 14px, #DCD3C2 14px 16px, #E9E3D6 16px 30px, #8E9A6E 30px 33px); }
.badges { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; }
.badge { font-family: var(--mono); font-size: 11px; background: var(--white); padding: 2px 7px; }
.badge--sale { background: var(--sale); color: var(--white); }
.badge--out { background: var(--ink); color: var(--white); }
.card__name { font-size: 16px; line-height: 1.45; text-decoration: none; }
.price { font-family: var(--mono); font-size: 14px; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.price s { color: var(--muted); font-size: 12.5px; }
.price em { font-style: normal; color: var(--sale); }
.quick { position: absolute; right: 8px; bottom: 8px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--white); cursor: pointer; font-size: 20px; line-height: 1; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.quick:disabled { opacity: .4; cursor: not-allowed; }
.quick:not(:disabled):hover { background: var(--olive); color: var(--white); }

/* 소개 띠 */
.about { background: var(--sand); }
.about .wrap { display: grid; gap: 24px; padding-top: 48px; padding-bottom: 48px; }
.about img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.about h2 { font-size: 24px; }
.about p { color: var(--muted); margin-top: 10px; }
.promise { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; font-family: var(--mono); font-size: 13.5px; }
.promise li::before { content: "— "; color: var(--olive); }

/* 상품 상세 */
.crumb { font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding: 18px 0 10px; }
.crumb a { text-decoration: none; }
.pd { display: grid; gap: 24px; padding-bottom: 64px; }
.pd__img { background: var(--sand); aspect-ratio: 1; }
.pd__img img, .pd__img .swatch-linen { width: 100%; height: 100%; object-fit: cover; }
.pd h1 { font-size: 26px; }
.pd .price { font-size: 17px; margin-top: 8px; }
.pd__desc { color: var(--muted); margin-top: 14px; }
.opt-group { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.opt-group legend { font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding: 0; margin-bottom: 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { position: relative; border: 1px solid var(--line); padding: 8px 14px; cursor: pointer; font-size: 15px; }
.opt input { position: absolute; opacity: 0; }
.opt:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--white); }
.opt:has(input:focus-visible) { outline: 2px solid var(--olive); outline-offset: 2px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); }
.qty button { width: 40px; height: 40px; border: 0; background: none; cursor: pointer; font-size: 18px; }
.qty span { min-width: 36px; text-align: center; font-family: var(--mono); }
.pd__total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--ink); margin-top: 22px; padding-top: 14px; }
.pd__total strong { font-family: var(--mono); font-size: 20px; }
.pd__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.btn { min-height: 52px; border: 1px solid var(--ink); background: var(--white); cursor: pointer; font-size: 16px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn--fill { background: var(--ink); color: var(--white); }
.btn--olive { background: var(--olive); border-color: var(--olive); color: var(--white); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.info { margin-top: 26px; border-top: 1px solid var(--line); }
.info details { border-bottom: 1px solid var(--line); }
.info summary { cursor: pointer; padding: 14px 0; font-size: 15.5px; list-style: none; display: flex; justify-content: space-between; }
.info summary::-webkit-details-marker { display: none; }
.info summary::after { content: "+"; font-family: var(--mono); }
.info details[open] summary::after { content: "−"; }
.info details p { padding-bottom: 14px; color: var(--muted); font-size: 15px; }

/* 장바구니 서랍 */
.drawer-bg { position: fixed; inset: 0; background: rgba(35,35,32,.45); z-index: 50; opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--white); z-index: 51; transform: translateX(100%); transition: transform .3s ease; display: flex; flex-direction: column; }
.is-cart .drawer-bg { opacity: 1; pointer-events: auto; }
.is-cart .drawer { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 19px; }
.x { background: none; border: 0; font-size: 26px; cursor: pointer; line-height: 1; width: 40px; height: 40px; }
.ship { padding: 14px 20px; font-size: 14.5px; border-bottom: 1px solid var(--line); }
.ship__bar { height: 4px; background: var(--line); margin-top: 8px; }
.ship__bar i { display: block; height: 100%; background: var(--olive); transition: width .3s; }
.lines { flex: 1; overflow-y: auto; padding: 4px 20px; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line__img { width: 72px; height: 72px; background: var(--sand); overflow: hidden; }
.line__img img, .line__img .swatch-linen { width: 100%; height: 100%; object-fit: cover; }
.line__name { font-size: 15px; line-height: 1.4; }
.line__opt { font-size: 13px; color: var(--muted); }
.line .qty button { width: 30px; height: 30px; font-size: 15px; }
.line .qty span { min-width: 26px; font-size: 13px; }
.line__right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; font-family: var(--mono); font-size: 13.5px; }
.del { background: none; border: 0; color: var(--muted); font-size: 12.5px; text-decoration: underline; cursor: pointer; padding: 0; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }
.drawer__foot { border-top: 1px solid var(--ink); padding: 16px 20px 20px; display: grid; gap: 6px; font-size: 15px; }
.drawer__foot div { display: flex; justify-content: space-between; }
.drawer__foot .sum { font-size: 17px; }
.drawer__foot .sum b { font-family: var(--mono); }
.drawer__foot .btn { margin-top: 8px; width: 100%; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); background: var(--ink); color: var(--white); padding: 11px 18px; font-size: 14.5px; opacity: 0; pointer-events: none; transition: .25s; z-index: 70; max-width: calc(100% - 32px); text-align: center; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.modal { border: 0; padding: 26px 22px; max-width: 420px; width: calc(100% - 32px); color: var(--ink); }
.modal::backdrop { background: rgba(35,35,32,.55); }
.modal h2 { font-size: 22px; }
.modal p { color: var(--muted); margin: 8px 0; font-size: 15px; }
.modal ul { padding-left: 18px; margin: 12px 0; font-size: 15px; }
.modal .btn { width: 100%; margin-top: 8px; }

.foot { border-top: 1px solid var(--line); padding: 32px 0 44px; color: var(--muted); font-size: 14px; }
.foot a { color: var(--olive-deep); }

@media (min-width: 820px) {
  .hero__card { left: 40px; bottom: 40px; padding: 28px 30px 30px; }
  .hero__card h1 { font-size: 34px; }
  .sec { padding: 80px 0; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 40px 22px; }
  .about .wrap { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; padding-top: 72px; padding-bottom: 72px; }
  .pd { grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: start; }
  .pd__info { position: sticky; top: 90px; }
}
