/* 보드멜 자사몰 — 흰 종이 위에 케이크 한 개. 애플 스토어의 리듬, 디저트 가게의 온도. */
:root {
  --bg: #ffffff;
  --paper: #f6f4ef;      /* 머랭 표면 */
  --ink: #1d1c1a;
  --muted: #6f6b64;
  --line: #e7e3db;
  --berry: #d63a2f;      /* 딸기. 링크와 합계에만 */
  --berry-deep: #b52e24;
  --pist: #a8c46c;
  --radius: 18px;
  --nav-h: 52px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.55;
  font-feature-settings: "ss05"; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; letter-spacing: -0.035em; line-height: 1.08; font-weight: 700; }
h2 { font-size: clamp(34px, 5vw, 56px); }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
main > section { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* 링크 — 애플식 "→" 대신 딸기색 밑줄 */
.link { color: var(--berry); text-decoration: none; font-weight: 600; border-bottom: 1px solid transparent; }
.link:hover { border-bottom-color: currentColor; }

/* 내비 */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); background: rgba(255,255,255,.72); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { max-width: 1120px; margin: 0 auto; height: 100%; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.brand { font-weight: 800; font-size: 19px; letter-spacing: -0.04em; color: var(--ink); text-decoration: none; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: 14px; opacity: .8; }
.nav-links a:hover { opacity: 1; }
.cart-btn { position: relative; background: none; border: 0; padding: 8px; margin-right: -8px; display: grid; place-items: center; color: var(--ink); border-radius: 50%; }
.cart-count { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--berry); color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; }
.cart-btn.bump .cart-count { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.5); } }

/* 히어로: 헤드라인 → 케이크 → 각주. 가운데 정렬은 여기 딱 한 번. */
.hero { text-align: center; padding-top: clamp(48px, 9vh, 96px); padding-bottom: 24px; }
.hero h1 { font-size: clamp(38px, 7vw, 84px); font-weight: 800; letter-spacing: -0.045em; }
.hero-sub { margin-top: 18px; font-size: clamp(18px, 2.2vw, 24px); color: var(--muted); }
.hero-links { display: flex; justify-content: center; gap: 28px; margin-top: 18px; font-size: 18px; }
.hero-fig { margin: 40px auto 0; width: min(560px, 82vw); will-change: transform; }
.hero-fig img { filter: drop-shadow(0 30px 40px rgba(60, 40, 20, .18)); }
.hero-note { margin-top: 28px; font-size: 14px; color: var(--muted); }

/* 세 가지 사실: 카드 대신 여백으로 나눈다 */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding-top: 88px; padding-bottom: 88px; }
.fact strong { display: block; font-size: 20px; letter-spacing: -0.03em; margin-bottom: 8px; }
.fact span { color: var(--muted); font-size: 16px; }

/* 구매 섹션 */
.buy { padding-top: 40px; padding-bottom: 40px; }
.buy-head { max-width: 640px; margin-bottom: 40px; }
.buy-head p { margin-top: 12px; color: var(--muted); font-size: 19px; }
.buy-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: start; }
.buy-media { position: sticky; top: calc(var(--nav-h) + 16px); }
.buy-stage { background: var(--paper); border-radius: 28px; aspect-ratio: 1; display: grid; place-items: center; padding: 8%; overflow: hidden; }
.buy-stage img { width: 100%; height: 100%; object-fit: contain; transition: opacity .25s ease, transform .35s cubic-bezier(.2,.7,.2,1); }
.buy-stage img.swap { opacity: 0; transform: scale(.96); }
.buy-thumbs { list-style: none; margin: 14px 0 0; padding: 0; display: flex; gap: 10px; }
.buy-thumbs button { width: 60px; height: 60px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); padding: 6px; overflow: hidden; }
.buy-thumbs button[aria-pressed="true"] { border-color: var(--ink); }
.buy-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.buy-panel { padding-top: 4px; }
.opt-title { font-size: 15px; font-weight: 600; margin: 26px 0 10px; }
.opt-title:first-child { margin-top: 0; }

/* 옵션 카드 — iPhone 구매 페이지의 그 목록 */
.opt-list { display: grid; gap: 10px; }
.opt { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; text-align: left; width: 100%; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .15s; }
.opt:hover { border-color: #c9c4ba; }
.opt[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.opt b { font-weight: 600; font-size: 17px; }
.opt .price { font-weight: 600; font-size: 16px; text-align: right; }
.opt small { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }
.opt .tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--paper); color: var(--muted); margin-left: 6px; vertical-align: 2px; }
.opt .tag.ok { background: #eef4e2; color: #4c6a1e; }

.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 42px; height: 40px; border: 0; background: none; font-size: 20px; line-height: 1; }
.qty output { min-width: 36px; text-align: center; font-weight: 600; }

.chk { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.chk input { width: 20px; height: 20px; accent-color: var(--ink); margin: 0; }
.chk span { flex: 1; }
.chk em { font-style: normal; color: var(--muted); font-size: 15px; }
.hint { color: var(--muted); font-size: 14px; margin-top: 12px; }
.hint.center { text-align: center; }

.panel-foot { margin-top: 28px; display: grid; gap: 12px; }
.panel-price { display: flex; justify-content: space-between; align-items: baseline; }
.panel-price span { color: var(--muted); font-size: 15px; }
.panel-price strong { font-size: 26px; letter-spacing: -0.03em; }
.btn-primary { display: inline-block; text-align: center; text-decoration: none; background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 15px 24px; font-weight: 600; font-size: 16px; transition: transform .12s, background .15s; }
.btn-primary:hover { background: #000; }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { background: #d9d5cd; color: #fff; cursor: not-allowed; }
.btn-secondary { display: inline-block; text-align: center; text-decoration: none; background: #fff; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 999px; padding: 13px 22px; font-weight: 600; font-size: 15px; }
.btn-secondary:hover { background: var(--paper); }
.link-btn { background: none; border: 0; padding: 0; color: var(--berry); font-weight: 600; font-size: 14px; }
.link-btn:hover { text-decoration: underline; }

/* 큰 사진 */
.wide { padding-top: 56px; padding-bottom: 56px; }
.wide img { border-radius: 28px; width: 100%; }
.wide > p { max-width: 560px; margin: 22px auto 0; text-align: center; color: var(--muted); font-size: 18px; }
.wide.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: stretch; }
.wide.two figure { margin: 0; display: flex; flex-direction: column; }
.wide.two figure img { flex: 1; object-fit: cover; height: 100%; }
.wide.two figcaption { margin-top: 12px; color: var(--muted); font-size: 15px; }
.mini-buy { background: var(--paper); border-radius: 28px; padding: 20px; }
.mini-buy img { border-radius: 18px; aspect-ratio: 4/3; }
.mini-buy figcaption { display: grid; gap: 8px; margin-top: 16px !important; color: var(--ink) !important; }
.mini-buy strong { font-size: 20px; letter-spacing: -0.03em; }
.mini-buy span { color: var(--muted); font-size: 15px; }
.mini-buy .btn-secondary { justify-self: start; margin-top: 6px; }

/* 마카롱 박스 빌더 — 이 페이지의 한 번뿐인 장난감 */
.box-size { display: inline-flex; gap: 8px; padding: 5px; border-radius: 999px; background: var(--paper); margin-bottom: 28px; }
.box-size button { border: 0; background: none; border-radius: 999px; padding: 10px 20px; display: flex; gap: 8px; align-items: baseline; transition: background .15s, box-shadow .15s; }
.box-size button b { font-weight: 600; }
.box-size button span { color: var(--muted); font-size: 14px; }
.box-size button[aria-checked="true"] { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.box-size button[aria-checked="true"] span { color: var(--ink); }

.builder { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: start; }
.builder-box { position: sticky; top: calc(var(--nav-h) + 16px); }
.box-tray { background: #f0e9d9; border: 6px solid #e6dcc6; border-radius: 22px; padding: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; box-shadow: inset 0 6px 14px rgba(120, 90, 40, .12), 0 20px 30px -20px rgba(80, 60, 30, .35); min-height: 200px; transition: grid-template-columns .2s; }
.box-tray.cols-4 { grid-template-columns: repeat(4, 1fr); gap: 10px; }
.box-tray.cols-1 { grid-template-columns: repeat(3, 1fr); }
.slot { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.55); box-shadow: inset 0 2px 6px rgba(120, 90, 40, .15); position: relative; }
.slot .mac { width: 84%; height: 84%; border-radius: 50%; position: relative; border: 0; padding: 0; background: var(--c, #ddd); box-shadow: 0 6px 10px -4px rgba(0,0,0,.35), inset 0 -8px 0 rgba(0,0,0,.08), inset 0 3px 0 rgba(255,255,255,.35); animation: drop .35s cubic-bezier(.2,.9,.3,1.3); cursor: pointer; }
.slot .mac::after { content: ""; position: absolute; left: 6%; right: 6%; top: 44%; height: 12%; border-radius: 999px; background: var(--f, #fff4dc); opacity: .9; }
.slot .mac:hover::before { content: "빼기"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0,0,0,.35); border-radius: 50%; }
@keyframes drop { from { transform: translateY(-18px) scale(.7); opacity: 0; } }
.box-status { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-weight: 600; font-size: 15px; }
.box-tools { display: flex; gap: 16px; }
.box-legend { margin-top: 14px; font-size: 14px; color: var(--muted); line-height: 1.7; }

.flavors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.flavor { border: 1.5px solid var(--line); border-radius: 16px; background: #fff; padding: 0; overflow: hidden; text-align: left; position: relative; transition: border-color .15s, transform .12s; }
.flavor:hover { border-color: #c9c4ba; }
.flavor:active { transform: scale(.97); }
.flavor img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.flavor .f-body { padding: 10px 12px 12px; }
.flavor b { display: block; font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }
.flavor small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }
.flavor .f-count { position: absolute; top: 8px; right: 8px; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.flavor .f-count:empty { display: none; }
.flavor.hot::before { content: "인기"; position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.9); color: var(--berry); }
.flavor .f-swatch { width: 100%; aspect-ratio: 1; display: grid; place-items: center; background: var(--paper); }
.flavor .f-swatch i { width: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--c); box-shadow: 0 8px 14px -6px rgba(0,0,0,.35), inset 0 -10px 0 rgba(0,0,0,.08), inset 0 3px 0 rgba(255,255,255,.3); position: relative; }
.flavor .f-swatch i::after { content: ""; position: absolute; left: 8%; right: 8%; top: 44%; height: 12%; border-radius: 999px; background: #c9a24b; }
.flavors.full .flavor:not(.has) { opacity: .45; }
.builder-foot { max-width: 520px; margin: 36px 0 0 auto; display: grid; gap: 12px; }

/* 주문 안내 */
.how { padding-top: 96px; padding-bottom: 64px; }
.steps { list-style: none; counter-reset: s; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.steps li { counter-increment: s; padding-top: 16px; border-top: 1.5px solid var(--ink); }
.steps li::before { content: counter(s); display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.steps strong { display: block; font-size: 22px; letter-spacing: -0.03em; margin-bottom: 6px; }
.steps span { color: var(--muted); font-size: 16px; }
.how-grid { margin-top: 64px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.how-grid div { background: var(--paper); border-radius: 22px; padding: 24px; }
.how-grid strong { display: block; font-size: 18px; margin-bottom: 8px; letter-spacing: -0.02em; }
.how-grid span { color: var(--muted); font-size: 15px; }

/* 오시는 길 */
.visit { padding-top: 64px; padding-bottom: 96px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; }
.visit p { margin-top: 18px; color: var(--muted); font-size: 17px; }
.visit p:first-of-type { color: var(--ink); }
.visit-links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 22px; }
.visit img { border-radius: 28px; aspect-ratio: 4/3; object-fit: cover; }

.foot { border-top: 1px solid var(--line); padding: 28px 24px 48px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); max-width: 1120px; margin: 0 auto; }

/* 장바구니 드로어 */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 80; backdrop-filter: blur(2px); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; z-index: 90; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .32s cubic-bezier(.2,.8,.2,1); box-shadow: -20px 0 50px rgba(0,0,0,.08); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 20px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--paper); font-size: 22px; line-height: 1; }
.drawer-body { flex: 1; overflow: auto; padding: 8px 22px; }
.cart-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.cart-item img, .cart-item .ci-disc { width: 56px; height: 56px; border-radius: 12px; object-fit: contain; background: var(--paper); }
.cart-item .ci-disc { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 3px; padding: 6px; }
.cart-item .ci-disc i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.cart-item b { display: block; font-weight: 600; font-size: 15px; }
.cart-item small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.45; }
.cart-item .ci-right { text-align: right; display: grid; gap: 6px; justify-items: end; }
.cart-item .ci-price { font-weight: 600; font-size: 15px; }
.cart-item .link-btn { font-size: 13px; color: var(--muted); }
.cart-empty { padding: 48px 0; text-align: center; color: var(--muted); }
.cart-empty a { display: block; margin-top: 10px; }
.drawer-foot { padding: 18px 22px 26px; border-top: 1px solid var(--line); display: grid; gap: 12px; }

/* 주문서 시트 */
.sheet { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.sheet-in { width: 100%; max-width: 560px; min-width: 0; max-height: 92vh; background: #fff; border-radius: 24px 24px 0 0; transform: translateY(100%); transition: transform .35s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; box-shadow: 0 -20px 60px rgba(0,0,0,.15); }
.sheet.open { pointer-events: auto; }
.sheet.open .sheet-in { transform: none; }
.sheet-body { overflow: auto; padding: 4px 22px 30px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: var(--paper); border-radius: 999px; }
.seg button { border: 0; background: none; border-radius: 999px; padding: 10px; font-weight: 600; font-size: 15px; }
.seg button[aria-checked="true"] { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.seg button:disabled { color: #b9b4aa; }
.dates { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.dates::-webkit-scrollbar { display: none; }
.dates button { flex: 0 0 auto; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; font-size: 14px; white-space: nowrap; }
.dates button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.in { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; font-size: 16px; }
.in:focus { border-color: var(--ink); outline: none; }
textarea.in { resize: vertical; margin-top: 10px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.preview { background: var(--paper); border-radius: 14px; padding: 14px 16px; font: 500 14px/1.6 var(--font); white-space: pre-wrap; margin: 0; }
.actions { display: grid; gap: 10px; margin-top: 18px; }

.toast { position: fixed; left: 50%; top: calc(var(--nav-h) + 12px); transform: translate(-50%, -12px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; transition: .25s; z-index: 120; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 반응형 */
@media (max-width: 900px) {
  .buy-grid, .builder, .visit, .wide.two { grid-template-columns: 1fr; }
  .buy-media, .builder-box { position: static; }
  .facts, .steps, .how-grid { grid-template-columns: 1fr; gap: 28px; }
  .flavors { grid-template-columns: repeat(3, 1fr); }
  .builder-foot { max-width: none; }
  .box-tray { max-width: 420px; margin: 0 auto; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  main > section { padding-left: 18px; padding-right: 18px; }
  .nav-links { display: none; }
  .hero-links { flex-direction: column; gap: 10px; }
  .flavors { grid-template-columns: repeat(2, 1fr); }
  .box-size { display: flex; width: 100%; }
  .box-size button { flex: 1; justify-content: center; padding: 10px 8px; flex-direction: column; gap: 0; align-items: center; }
  .row { grid-template-columns: 1fr; }
  .buy-stage { border-radius: 20px; }
  .wide img, .visit img { border-radius: 20px; }
}
