/* shop 页：按 Figma「shop」设计（1440 宽）——白底、粉字、4 列 3:4 竖图 */
* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; }
body { font-family: var(--font); color: var(--pink); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:root { --soft: #fdeef5; --line: 1.5px solid var(--pink); --grey: #b9b9b9; --ink: #2b2b2b; }

/* 「구매 전 공지사항을 꼭 확인해 주세요.」大字 */
.lead {
  display: block;
  margin: clamp(14px, 2.4vw, 36px) var(--m) clamp(14px, 2vw, 30px);
  font-size: var(--t-big); line-height: 1.2; font-weight: 400; letter-spacing: -0.01em;
  color: var(--pink); text-decoration: none;
}
a.lead:hover { text-decoration: underline; text-decoration-thickness: 0.05em; text-underline-offset: 0.12em; }
.lead small { display: block; font-size: var(--t-small); margin-top: .6em; letter-spacing: 0; }
.closed { margin: 0 var(--m) clamp(14px, 2vw, 30px); padding: 12px 16px; background: var(--soft); font-size: var(--t-small); }

/* ---------- 商品格子 ---------- */
.grid {
  margin: 0 var(--m);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: clamp(4px, 0.42vw, 6px);
  row-gap: clamp(22px, 2.6vw, 38px);
}
.card { min-width: 0; }
.ph { position: relative; aspect-ratio: 3 / 4; background: #f3f3f3; overflow: hidden; cursor: pointer; }
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
@media (hover: hover) { .card:hover .ph img { transform: scale(1.03); } }
.soldout .ph img { filter: grayscale(1); opacity: .45; }
.tag { position: absolute; left: 10px; bottom: 10px; padding: 3px 9px; background: #fff; color: #9a9a9a; font-size: var(--t-small); }

/* 圆形「+」，加入后变成「− 1 +」 */
.add, .qty {
  position: absolute; right: clamp(6px, 0.7vw, 10px); bottom: clamp(6px, 0.7vw, 10px);
  height: clamp(34px, 2.8vw, 42px);
  border-radius: 999px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .14);
}
.add {
  width: clamp(34px, 2.8vw, 42px); border: 0; padding: 0;
  background: #fff; color: var(--pink);
  font-size: clamp(22px, 1.8vw, 28px); line-height: 1; cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
}
.add:hover { background: var(--pink); color: #fff; }
.add:active { transform: scale(.92); }
.add .n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--pink); color: #fff; font-size: 11px; line-height: 18px; font-weight: 700; }
.add:hover .n { background: #fff; color: var(--pink); }
.qty { display: flex; align-items: center; background: var(--pink); color: #fff; font-weight: 700; font-size: clamp(14px, 1.1vw, 17px); }
.qty button { border: 0; background: none; color: #fff; width: clamp(30px, 2.5vw, 38px); height: 100%; font-size: 1.3em; line-height: 1; cursor: pointer; padding: 0; }
.qty button:disabled { opacity: .4; cursor: default; }
.qty span { min-width: 1.2em; text-align: center; }

.info { margin-top: clamp(4px, 0.55vw, 8px); font-size: var(--t-small); line-height: 1.3; }
.info p { margin: 0; }
.info .name { cursor: pointer; }
.info .name b { font-weight: 700; }
.info .low { opacity: .75; }
.info .more { font-weight: 700; cursor: pointer; }
.info .more:hover { text-decoration: underline; }
.empty { margin: 0 var(--m); font-size: var(--t-small); }

/* ---------- 通用按钮 / 表单 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 52px; padding: 12px 22px; border: var(--line); background: #fff; color: var(--pink);
  font-size: clamp(16px, 1.25vw, 18px); font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn.pink { background: var(--pink); color: #fff; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.small { min-height: 0; padding: 4px 10px; font-size: 13px; border-width: 1px; }
.link { background: none; border: 0; padding: 0; color: var(--pink); text-decoration: underline; cursor: pointer; font-size: inherit; }

.field { display: block; margin-bottom: 22px; font-size: 14px; }
.field input, .field textarea {
  display: block; width: 100%; margin-top: 4px; padding: 8px 0;
  border: 0; border-bottom: var(--line); border-radius: 0; background: transparent;
  color: var(--ink); font-size: 17px; outline: none;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { border-bottom-width: 3px; padding-bottom: 6.5px; }
.field input::placeholder, .field textarea::placeholder { color: #e6a9c8; }
.req::after { content: ' *'; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.45; margin: 6px 0 18px; cursor: pointer; }
.check a { color: inherit; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--pink); flex: none; }
.error { color: #d0021b; min-height: 1.2em; font-size: 15px; margin: 0 0 12px; }
.muted { opacity: .7; }

.pagehead { margin: clamp(28px, 5.8vw, 84px) var(--m) clamp(18px, 2.5vw, 36px); font-size: var(--t-big); line-height: 1.2; font-weight: 400; }
.pagehead small { display: block; font-size: var(--t-small); margin-top: .5em; }
.back { margin: 0 var(--m) 18px; display: inline-block; font-size: 15px; }

/* ---------- 金额明细表 ---------- */
.sum { width: 100%; border-collapse: collapse; font-size: 16px; }
.sum td { padding: 10px 0; border-bottom: 1px solid #f6c7de; vertical-align: top; }
.sum td:nth-child(2) { width: 3.5em; text-align: right; padding-right: 1em; white-space: nowrap; }
.sum td:last-child { text-align: right; white-space: nowrap; }
.sum tr.sub td { opacity: .8; }
.sum tr.tot td { border-bottom: 0; border-top: var(--line); font-weight: 700; font-size: 20px; padding-top: 14px; }

/* ---------- 结账页 ---------- */
.checkout { margin: 0 var(--m); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5.5vw, 80px); align-items: start; }
.checkout .order { position: sticky; top: 20px; border: var(--line); padding: clamp(16px, 1.7vw, 24px); }
.checkout .order h2 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }

/* ---------- 下单完成 / 订单详情 ---------- */
.result { margin: 0 var(--m); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 60px); align-items: start; }
.box { border: var(--line); padding: clamp(16px, 1.7vw, 24px); }
.box h2 { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.box.bank { background: var(--soft); }
.bank pre { margin: 0 0 14px; font: 700 clamp(18px, 1.6vw, 22px)/1.45 var(--font); white-space: pre-wrap; color: var(--ink); }
.kv { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid #f6c7de; font-size: 16px; }
.kv:last-child { border-bottom: 0; }
.kv > span:first-child { min-width: 8.5em; opacity: .8; font-size: 14px; }
.kv b { color: var(--ink); }
.mono { font-family: ui-monospace, Menlo, monospace; letter-spacing: .02em; }
.note { font-size: 15px; line-height: 1.5; margin: 12px 0 0; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 14px; font-weight: 700; background: var(--pink); color: #fff; }
.status.s-pending { background: #fff; color: var(--pink); border: 1px solid var(--pink); }
.status.s-cancelled { background: #ddd; color: #666; }

/* ---------- 查询订单 ---------- */
.narrow { margin: 0 var(--m); max-width: 560px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { border: 1px solid var(--pink); background: #fff; color: var(--pink); padding: 5px 10px; border-radius: 999px; font-size: 13px; cursor: pointer; }

/* ---------- 购物车按钮（右下角） ---------- */
.cart-fab {
  position: fixed; z-index: 40; right: var(--m); bottom: calc(18px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px; border: 0; border-radius: 999px; background: var(--pink); color: #fff;
  font-size: 17px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 16px rgba(255, 51, 160, .35);
}
.cart-fab .n { background: #fff; color: var(--pink); border-radius: 999px; min-width: 24px; height: 24px; padding: 0 7px; font-size: 14px; display: inline-grid; place-items: center; }

/* ---------- 遮罩 + 抽屉 + 弹窗 ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .18); opacity: 0; transition: opacity .2s; }
.scrim.on { opacity: 1; }
.drawer {
  position: fixed; z-index: 60; top: 0; right: 0; bottom: 0; width: min(460px, 100vw);
  background: #fff; border-left: var(--line); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .25s ease;
}
.drawer.on { transform: none; }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: var(--line); font-size: 24px; }
.x { border: 0; background: none; color: var(--pink); font-size: 30px; line-height: 1; cursor: pointer; padding: 0 4px; }
.drawer .lines { flex: 1; overflow: auto; padding: 6px 20px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid #f6c7de; font-size: 15px; line-height: 1.35; }
.line img, .line .noimg { width: 64px; aspect-ratio: 3 / 4; object-fit: cover; background: #f3f3f3; display: block; }
.line .p { margin-top: 4px; opacity: .8; }
.line .rm { margin-top: 6px; font-size: 13px; }
.mini { display: flex; align-items: center; border: 1px solid var(--pink); border-radius: 999px; height: 32px; align-self: start; }
.mini button { border: 0; background: none; color: var(--pink); width: 30px; height: 100%; font-size: 18px; cursor: pointer; padding: 0; }
.mini button:disabled { opacity: .3; cursor: default; }
.mini span { min-width: 1.4em; text-align: center; font-weight: 700; }
.drawer footer { padding: 14px 20px calc(18px + env(safe-area-inset-bottom)); border-top: var(--line); }
.drawer footer .sum { margin-bottom: 14px; }
.drawer .hint { font-size: 13px; margin: -6px 0 12px; opacity: .8; }
.drawer .emptycart { padding: 30px 0; font-size: 16px; }

.modal { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 4vh 4vw; pointer-events: none; }
.modal .panel {
  pointer-events: auto; position: relative; background: #fff; width: min(1080px, 100%); max-height: 92vh; overflow: auto;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px);
  padding: clamp(14px, 1.7vw, 24px); border: var(--line);
  opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s;
}
.modal.on .panel { opacity: 1; transform: none; }
.modal .x { position: absolute; top: 10px; right: 12px; z-index: 2; background: #fff; border-radius: 50%; width: 40px; height: 40px; }
.modal .pic { aspect-ratio: 3 / 4; background: #f3f3f3; }
.modal .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal .body { padding: clamp(4px, 2vw, 30px) 8px 8px 0; display: flex; flex-direction: column; }
.modal h2 { margin: 0 44px 8px 0; font-size: clamp(22px, 2.2vw, 32px); line-height: 1.2; font-weight: 400; }
.modal h2 b { font-weight: 700; }
.modal .price { font-size: 18px; margin: 0 0 18px; }
.modal .desc { white-space: pre-wrap; font-size: 15px; line-height: 1.6; color: var(--ink); margin: 0 0 22px; }
.opts { border-top: var(--line); margin-bottom: 22px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f6c7de; font-size: 16px; }
.opt .t { flex: 1; min-width: 0; }
.opt .t small { display: block; font-size: 13px; opacity: .75; margin-top: 2px; }
.opt.out { color: var(--grey); }
.modal .body .btn { margin-top: auto; }

.toast {
  position: fixed; z-index: 80; left: 50%; bottom: 90px; transform: translate(-50%, 20px); opacity: 0;
  background: #fff; color: var(--pink); border: var(--line); padding: 10px 18px; font-size: 15px; font-weight: 700;
  transition: opacity .2s, transform .2s; pointer-events: none; white-space: nowrap;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 手机 ---------- */
@media (max-width: 760px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 6px; row-gap: 24px; }
  .info { font-size: 13px; }
  .checkout, .result { grid-template-columns: 1fr; }
  .checkout .order { position: static; order: -1; }
  .two { grid-template-columns: 1fr; }
  .cart-fab { left: var(--m); right: var(--m); justify-content: center; }
  .modal { padding: 0; place-items: end stretch; }
  .modal .panel { grid-template-columns: 1fr; max-height: 94vh; border: 0; border-top: var(--line); padding: 0 0 calc(16px + env(safe-area-inset-bottom)); gap: 14px; }
  .modal .pic { aspect-ratio: 4 / 3.6; }
  .modal .body { padding: 0 16px; }
  .modal .body .btn { position: sticky; bottom: 0; }
  .kv > span:first-child { min-width: 7em; }
}

/* ---------- 系列 / 单独下单 / 配送地区 ---------- */
.subnav a.on { text-decoration: underline; text-underline-offset: .2em; }
.subnav a.ended { opacity: .6; }
.subnav > * + * { margin-right: 1.5em; }
.info .solo { font-size: .85em; opacity: .75; }
.solonote { font-size: 14px; line-height: 1.5; background: var(--soft); padding: 10px 12px; margin: -6px 0 18px; }
.sum small { font-size: 12px; opacity: .8; }
.regions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 4px; }
.regions label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px; border: 1px solid #f2b6d3; cursor: pointer; font-size: 15px; color: var(--pink); }
.regions label:has(input:checked) { border: var(--line); background: var(--soft); }
.regions input { accent-color: var(--pink); margin: 0; }
.regions b { margin-left: auto; color: var(--ink); font-size: 14px; }
.modal .panel.ask { grid-template-columns: 1fr; width: min(540px, 100%); }
.modal .panel.ask .body { padding: 20px 10px 6px; }
.modal .panel.ask .desc { white-space: pre-wrap; }
@media (max-width: 760px) {
  .regions { grid-template-columns: 1fr; }
  .modal .panel.ask .body { padding: 22px 16px 0; }
  .subnav { flex-wrap: wrap; }
}

/* 收款账户 + 复制按钮 */
.acct { background: #fff; border: var(--line); padding: 16px; margin-bottom: 14px; text-align: center; }
.acct-bank { font-size: 15px; font-weight: 700; }
.acct-no { font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; color: var(--ink); letter-spacing: .06em; margin: 4px 0; user-select: all; }
.acct-holder { font-size: 14px; margin-bottom: 12px; }
.acct-holder b { color: var(--ink); }
.acct-tip { font-size: 12px; opacity: .75; margin: 8px 0 0; }

/* ---------- 卡片里的链接 ---------- */
.phlink { display: block; width: 100%; height: 100%; }
.info a.name, .info a.more { display: block; color: inherit; text-decoration: none; }
.info a.name:hover { text-decoration: underline; }
a.add { display: grid; place-items: center; text-decoration: none; }

/* ---------- 商品详情页（参考 Sculptor：左边照片横排，右边信息） ---------- */
.pd { margin: clamp(20px, 3vw, 44px) var(--m) 0; display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(300px, 1fr); gap: clamp(24px, 3vw, 48px); align-items: start; }
.gwrap { position: relative; min-width: 0; }
.gallery { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img, .gallery .noimg { flex: none; height: min(76vh, 880px); aspect-ratio: 3 / 4; object-fit: cover; background: #f3f3f3; scroll-snap-align: start; display: block; }
.gnav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--pink); font-size: 30px; line-height: 1; cursor: pointer; box-shadow: 0 1px 6px rgba(0, 0, 0, .15); }
.gnav.prev { left: 10px; } .gnav.next { right: 10px; }
.gnav:disabled { opacity: 0; pointer-events: none; }
.gcount { position: absolute; left: 10px; bottom: 10px; background: #fff; padding: 2px 9px; font-size: 13px; }
.pinfo { position: sticky; top: 20px; }
.pinfo .back { display: inline-block; font-size: 15px; color: var(--pink); text-decoration: none; margin-bottom: 14px; }
.pinfo .back:hover { text-decoration: underline; }
.pinfo h1 { margin: 0 0 8px; font-size: clamp(22px, 2vw, 30px); line-height: 1.25; font-weight: 400; }
.pinfo h1 b { font-weight: 700; }
.pprice { font-size: 20px; margin: 0 0 18px; }
.pprice .muted { font-size: 15px; }
.plabel { font-size: 14px; margin: 18px 0 8px; }
.optchips { display: flex; flex-wrap: wrap; gap: 6px; }
.optchips button { border: 1px solid var(--pink); background: #fff; color: var(--pink); padding: 8px 12px; font-size: 14px; cursor: pointer; }
.optchips button b { font-weight: 700; }
.optchips button.on { background: var(--pink); color: #fff; }
.optchips button.out { color: #bbb; border-color: #ddd; text-decoration: line-through; }
.optchips button.out.on { background: #eee; color: #999; }
.mini.big { height: 42px; display: inline-flex; margin-bottom: 16px; }
.mini.big button { width: 42px; font-size: 20px; }
.mini.big span { min-width: 2em; font-size: 16px; }
.addbtn { margin-bottom: 8px; }
.addbtn:not(:disabled):hover { background: var(--soft); }
.pstate { margin: 18px 0; font-size: 16px; padding: 12px; background: #f6f6f6; color: #888; text-align: center; }
.incart { font-size: 14px; margin: 12px 0 0; }
.acc { margin-top: 26px; border-top: var(--line); }
.acc details { border-bottom: 1px solid #f6c7de; }
.acc summary { list-style: none; cursor: pointer; padding: 14px 0; font-size: 14px; font-weight: 700; display: flex; justify-content: space-between; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: '+'; font-weight: 400; font-size: 18px; line-height: 1; }
.acc details[open] summary::after { content: '−'; }
.acc details p { margin: 0 0 16px; white-space: pre-wrap; font-size: 14px; line-height: 1.65; color: var(--ink); }

@media (max-width: 760px) {
  .pd { grid-template-columns: 1fr; margin: 12px 0 0; gap: 18px; }
  .gallery { gap: 0; }
  .gallery img, .gallery .noimg { width: 100vw; height: auto; }
  .gnav { display: none; }
  .gcount { left: auto; right: 10px; }
  .pinfo { position: static; padding: 0 var(--m); }
}
@media (max-width: 760px) { .pdp .cart-fab { display: none; } }

/* ---------- 结账：退款账户、提示小字 ---------- */
.three { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 0 14px; }
.fieldhint { display: block; font-size: 13px; margin-top: 6px; line-height: 1.45; }
.cancelrow { margin: 16px 0 0; font-size: 14px; }

/* ---------- 订单查询：名字 或 订单号；多单列表 ---------- */
.lk-or { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0 14px; align-items: center; }
.lk-or .or { font-size: 13px; opacity: .8; }
.lk-or + .fieldhint { margin: -10px 0 16px; }
.olist { display: grid; gap: 8px; }
.orow {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px; align-items: center; text-align: left;
  padding: 12px 14px; border: var(--line); background: #fff; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer;
}
.orow:hover { background: var(--soft); }
.orow > :nth-child(3) { grid-column: 1 / -1; color: var(--pink); }
.orow > b { justify-self: end; }

/* ---------- 定时开售 / 结束：倒计时 ---------- */
.saleinfo {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
  margin: 0 var(--m) clamp(14px, 2vw, 30px); padding: 12px 16px; background: var(--soft); font-size: var(--t-small);
}
.pinfo .saleinfo { margin: 0 0 18px; font-size: 14px; }
.cd { font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: .02em; }
.subnav a small { font-size: .8em; opacity: .8; }

@media (max-width: 760px) {
  .three { grid-template-columns: 1fr 1fr; }
  .three input:nth-child(2) { grid-column: 1 / -1; order: -1; }
  .lk-or { grid-template-columns: 1fr; }
  .lk-or .or { margin: -12px 0 10px; }
}
