/* ==========================================================
   DDEZERO 모바일 스타일 — 디자인 보강 시 아래 토큰부터 바꾸세요
   ========================================================== */
:root {
  --brand: #7a5f48;          /* 메인 컬러 (로고 토프 브라운 · 버튼·강조) */
  --brand-ink: #ffffff;      /* 메인 컬러 위 글자 */
  --header-bg: #ffffff;      /* 맨 위 헤더 배경 */
  --header-ink: #3a2e25;     /* 맨 위 헤더 아이콘 */
  --accent: #d2473a;         /* 할인율 */
  --cat1: #f3eee7;           /* 생활때제로 칸 */
  --cat2: #e8f1f6;           /* 세탁때제로 칸 */
  --cat3: #fbeee6;           /* 피부때제로 칸 */
  --bg: #ffffff;
  --bg-soft: #f6f3ef;
  --line: #ebe5de;
  --text: #2a221c;
  --muted: #8a8079;
  --ok: #2f7d4f;
  --warn: #b7791f;
  --danger: #c0392b;
  --radius: 12px;
  --strip-bg: #111111;       /* 헤더 위 한줄 이벤트 띠 (검정) */
  --strip-ink: #ffffff;
  --radius-sm: 8px;
  --max: 640px;              /* PC에서 보이는 최대 폭 (오빠믿어봐와 같은 폭, 가운데 정렬) */
  --top-h: 52px;
  --tab-h: 58px;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text);
  background: var(--bg-soft); word-break: keep-all;
}
body > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
small { font-size: 12px; }
.muted { color: var(--muted); font-size: 13px; }
[hidden] { display: none !important; }

/* ── 헤더 위 한줄 이벤트 띠 (화면 가로 전체) ── */
.event-strip {
  max-width: none; margin: 0; width: 100%; background: var(--strip-bg); color: var(--strip-ink);
  font-size: 13px; line-height: 1.3; letter-spacing: -.01em;
}
.event-strip a, .event-strip span {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  max-width: var(--max); margin: 0 auto; padding: 8px 14px; color: inherit; white-space: nowrap;
}
.event-strip .strip-hot { flex: none; width: 44px; height: 18px; display: block; }
.event-strip .strip-txt { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.event-strip a .strip-txt::after { content: " ›"; opacity: .7; }
.in-popup .event-strip { display: none; }

/* ── 상단바 ── */
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--top-h);
  display: flex; align-items: center; gap: 4px; padding: 0 8px;
  background: var(--header-bg); color: var(--header-ink); border-bottom: 1px solid var(--line);
}
.topbar a, .topbar .icon-btn { color: var(--header-ink); }
.topbar .badge { box-shadow: 0 0 0 2px var(--header-bg); }
.topbar-title { color: var(--text); }
.logo { display: flex; align-items: center; padding: 0 8px; margin-right: auto; }
.logo img { height: 34px; width: auto; display: block; }
/* 홈 화면 헤더: 로고가 답답하지 않게 살짝 높게 */
.topbar-home { height: 60px; padding: 0 8px 0 10px; }
.topbar-home .logo img { height: 40px; }
@media (max-width: 340px) { .topbar-home .logo img { height: 30px; } } /* 작은 폰 */
.topbar-title { font-size: 16px; font-weight: 700; margin-right: auto; }
.icon-btn {
  position: relative; width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; background: none; padding: 0; cursor: pointer;
}
.icon-btn svg, .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.badge {
  position: absolute; top: 4px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}

.page { background: var(--bg); min-height: calc(100vh - var(--top-h)); padding-bottom: calc(var(--tab-h) + 96px + env(safe-area-inset-bottom)); }

/* ── 하단 탭바 ── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg); border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--muted); }
.tabbar a.on { color: var(--text); font-weight: 700; }

/* ── 홈 ── */
.hero {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9; min-height: 220px; display: flex; align-items: center;
  padding: 24px 20px; color: var(--text);
  background: #f4f1ec url("../img/hero.jpg") 62% center / cover no-repeat;
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.7) 45%, rgba(255,255,255,0) 72%); }
.hero-text { position: relative; max-width: 62%; }
.hero-kicker { font-size: 10px; letter-spacing: .16em; white-space: nowrap; color: var(--brand); margin-bottom: 10px; font-weight: 700; }
.hero-title { font-size: 24px; line-height: 1.32; font-weight: 800; }
.hero-title em { font-style: normal; color: var(--brand); }
.hero-sub { margin-top: 10px; color: #5c524a; font-size: 13px; }
@media (max-width: 480px) { .hero { padding: 18px 16px; } .hero-text { max-width: 66%; } .hero-title { font-size: 21px; } .hero-sub { font-size: 12px; } .hero-kicker { font-size: 9px; letter-spacing: .1em; } }

.cat-entry { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px 14px; border-radius: var(--radius); text-align: center; }
.cat strong { font-size: 14px; }
.cat-ico { width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--brand); }
.cat-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cat-1 { background: var(--cat1); }
.cat-2 { background: var(--cat2); }
.cat-2 .cat-ico { color: #3f6f8f; }
.cat-3 { background: var(--cat3); }

.block { padding: 20px 16px; border-top: 8px solid var(--bg-soft); }
.block-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.block-head h3 { font-size: 18px; }
.block-head a { font-size: 13px; color: var(--muted); }
.lead { margin-bottom: 12px; color: var(--muted); }

/* ── 상품 그리드 ── */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 10px; }
.page > .grid { padding: 0 16px 20px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 4px; background: var(--brand); color: var(--brand-ink); font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.tag-event { background: var(--accent); }
.soldout { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.7); font-weight: 800; color: var(--muted); }
.card-name { margin-top: 8px; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.card-price em, .pd-price em { color: var(--accent); font-style: normal; font-weight: 800; }
.card-price del, .pd-price del { color: var(--muted); font-size: 12px; }
.card-price small { color: var(--muted); }

.ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 34px; font-weight: 800; color: rgba(0,0,0,.18); }
.ph-shop { background: var(--cat1); color: rgba(122,95,72,.28); }

.chip { flex: none; padding: 4px 10px; border-radius: 99px; background: var(--bg-soft); font-size: 12px; white-space: nowrap; }

/* ── 목록 상단 ── */
.seg { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.seg a { text-align: center; padding: 14px 0; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.seg a.on { color: var(--text); border-color: var(--text); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: none; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; }
.chips a.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.list-bar { display: flex; justify-content: space-between; align-items: center; padding: 0 16px 12px; font-size: 13px; color: var(--muted); }
.list-bar select { border: 0; background: none; font-size: 13px; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); display: grid; gap: 16px; justify-items: center; }

/* ── 상품 상세 ── */
.pd-image { aspect-ratio: 1; background: var(--bg-soft); }
.pd-image img { width: 100%; height: 100%; object-fit: cover; }
.pd-info { padding: 18px 16px; }
.pd-name { font-size: 19px; font-weight: 700; }
.pd-summary { margin-top: 4px; color: var(--muted); font-size: 14px; }
.pd-price { margin-top: 12px; display: flex; align-items: baseline; gap: 6px; font-size: 20px; }
.pd-ship { margin-top: 6px; font-size: 13px; color: var(--muted); }
.pd-meta { margin: 14px 0 0; display: grid; gap: 6px; }
.pd-meta div { display: flex; gap: 12px; }
.pd-meta dt { width: 64px; color: var(--muted); }
.pd-meta dd { margin: 0; }
.pd-detail { padding: 20px 16px; border-top: 8px solid var(--bg-soft); }
.pd-detail h3 { font-size: 16px; margin-bottom: 12px; }
.pd-desc { color: #4a4440; }

/* ── 하단 고정 구매바 ── */
.buybar {
  position: fixed; left: 0; right: 0; z-index: 25; max-width: var(--max); margin: 0 auto;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding: 10px 16px; background: var(--bg); border-top: 1px solid var(--line);
}
.buy-sheet { display: grid; gap: 10px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.qty-row { display: flex; justify-content: space-between; align-items: center; }
.sheet-total { text-align: right; }

/* ── 버튼 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 50px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid var(--brand);
  background: var(--bg); color: var(--text); font-weight: 700; cursor: pointer;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-line { background: var(--bg); }
.btn-block { width: 100%; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; font-weight: 600; }
.btn:disabled { background: var(--line); border-color: var(--line); color: var(--muted); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-stack { display: grid; gap: 8px; padding: 16px; }

.stepper { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.stepper button { width: 36px; height: 36px; border: 0; background: var(--bg-soft); font-size: 18px; cursor: pointer; }
.stepper input { width: 44px; border: 0; text-align: center; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── 장바구니 ── */
.line-items { list-style: none; margin: 0; padding: 0 16px; }
.line { display: grid; grid-template-columns: 80px 1fr auto; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line-thumb { width: 80px; height: 80px; border-radius: var(--radius-sm); overflow: hidden; }
.line-thumb img, .line-thumb .ph { width: 100%; height: 100%; object-fit: cover; font-size: 22px; }
.line-name { font-size: 14px; }
.line-opt { font-size: 12px; color: var(--muted); }
.line-foot { margin-top: 8px; display: flex; justify-content: space-between; align-items: center; }
.line-del { border: 0; background: none; font-size: 22px; color: var(--muted); cursor: pointer; line-height: 1; }

.summary { margin: 0; padding: 16px; display: grid; gap: 8px; border-top: 8px solid var(--bg-soft); }
.summary > div { display: flex; justify-content: space-between; gap: 12px; }
.summary dt { color: var(--muted); flex: none; }
.summary dd { margin: 0; text-align: right; }
.summary .total { padding-top: 10px; border-top: 1px solid var(--line); font-size: 17px; font-weight: 800; }
.summary .total dt { color: var(--text); }
.hint { font-size: 12px; color: var(--accent); text-align: right; }

/* ── 폼 ── */
.form-block { padding: 20px 16px; border-top: 8px solid var(--bg-soft); display: grid; gap: 12px; }
.page > .form-block:first-child, .page > form:first-child > .form-block:first-child { border-top: 0; }
.form-block h3 { font-size: 16px; }
.form-block h3 small { color: var(--muted); font-weight: 400; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--bg); font-size: 16px; /* iOS 확대 방지 */
}
.field input[readonly] { background: var(--bg-soft); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.addr-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.addr-row .btn { height: 48px; }
.err { color: var(--danger); font-size: 13px; margin-top: -6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.check a { text-decoration: underline; }
.notice { padding: 0 16px 16px; font-size: 13px; color: var(--muted); }

.paymethods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pm input, .time input { position: absolute; opacity: 0; pointer-events: none; }
.pm span, .time span {
  display: grid; place-items: center; min-height: 48px; padding: 6px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 14px; text-align: center; cursor: pointer;
}
.pm input:checked + span, .time input:checked + span { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.pm input:focus-visible + span, .time input:focus-visible + span { outline: 2px solid var(--accent); }

.mini-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mini-items li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.mini-items li > span:first-child { display: grid; }
.mini-items small { color: var(--muted); }
.mini-items li > span:last-child { flex: none; color: var(--muted); }

/* ── 예약 ── */
.date-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.date-strip::-webkit-scrollbar { display: none; }
.date-strip a { flex: none; width: 56px; padding: 8px 0; display: grid; justify-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.date-strip a small { font-size: 11px; color: var(--muted); }
.date-strip a b { font-size: 18px; }
.date-strip a.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.date-strip a.on small { color: inherit; opacity: .8; }
.time-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.time { position: relative; }
.time.off span { color: var(--muted); background: var(--bg-soft); text-decoration: line-through; cursor: not-allowed; }

/* ── 결과/주문 ── */
.result { padding: 36px 20px 24px; text-align: center; display: grid; gap: 10px; }
.result h2 { font-size: 21px; }
.result p { color: var(--muted); }
.order-no b { color: var(--text); }
.status { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; background: var(--bg-soft); }
.s-paid, .s-reserved, .s-delivered, .s-visited { color: var(--ok); }
.s-bank_wait, .s-pending, .s-preparing, .s-shipped { color: var(--warn); }
.s-cancelled, .s-failed { color: var(--danger); }
.order-list { list-style: none; margin: 0; padding: 0; }
.order-list a { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.order-list a > div { display: grid; }
.order-list .right { text-align: right; justify-items: end; }
.order-list small { color: var(--muted); }

/* ── 문서/푸터 ── */
.doc { padding: 20px 16px; display: grid; gap: 10px; }
.doc h3 { font-size: 15px; margin-top: 10px; }
.site-footer { padding: 24px 16px calc(var(--tab-h) + 110px); font-size: 12px; color: var(--muted); background: var(--bg-soft); display: grid; gap: 12px; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }
.copy { opacity: .7; }

.toast {
  position: fixed; left: 50%; top: calc(var(--top-h) + 10px); transform: translateX(-50%); z-index: 50;
  max-width: calc(var(--max) - 32px); width: max-content; padding: 10px 16px; border-radius: 99px;
  background: rgba(31,26,23,.92); color: #fff; font-size: 14px; animation: toast 2.6s forwards;
}
@keyframes toast { 0%,85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

/* ── 결제 이동 화면 ── */
.paying { display: grid; place-items: center; min-height: 100vh; background: var(--bg); }
.paying-box { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 24px; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 641px) {
  body { background: #e9e6e2; }
  .page, .topbar { box-shadow: 0 0 0 1px var(--line); }
}

/* ── 무통장입금 안내 ── */
.bank-box { display: grid; gap: 8px; padding: 14px; border-radius: var(--radius-sm); background: var(--bg-soft); }
.bank-box .field input { background: var(--bg); }

/* ── 결제창(새창) 진행 오버레이 ── */
.pay-overlay {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; max-width: none;
  background: rgba(20, 16, 14, .55);
}
.pay-overlay[hidden] { display: none; }
.pay-overlay-box {
  width: 100%; max-width: 360px; padding: 28px 22px 20px; border-radius: var(--radius);
  background: var(--bg); text-align: center; display: grid; gap: 10px; justify-items: center;
}
.pay-overlay-box h3 { font-size: 17px; }
.pay-overlay-box .btn { margin-top: 2px; }

/* 결제 새창 안에서는 사이트 메뉴 숨김 */
.popup-only { display: none !important; }
.in-popup .popup-only { display: inline-flex !important; }
.in-popup .no-popup, .in-popup .tabbar, .in-popup .site-footer, .in-popup .topbar .icon-btn { display: none !important; }
.in-popup .page { padding-bottom: 24px; min-height: 100vh; }

/* ── 무통장입금 안내 (내김치와 같은 구성) ── */
:root { --notice: #fff8e5; --notice-line: #f0dfae; }
.bank { background: var(--notice); border: 1px solid var(--notice-line); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; }
.bank h3 { font-size: 16px; }
.bank dl { display: grid; grid-template-columns: 72px 1fr; gap: 6px 10px; margin: 0; font-size: 16px; }
.bank dt { color: var(--muted); }
.bank dd { margin: 0; font-weight: 700; }
.bank dd.point { color: var(--accent); }
.bank .acct { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.copy { height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); font-size: 13px; font-weight: 600; cursor: pointer; }
.bank ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
.bank .sos { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--notice-line); font-size: 15px; }
.bank .sos b { color: var(--accent); font-size: 17px; letter-spacing: .02em; }
.bank-wrap { padding: 0 16px 16px; }
.card-note { padding: 14px; border-radius: var(--radius-sm); background: var(--bg-soft); font-size: 14px; line-height: 1.6; }

/* ── PC 좌·우 여백 배너 (관리자 > 배너) ──
   가로 1180px 이상에서만 보임. 휴대폰·태블릿에서는 app.js 가 아예 붙이지 않음 */
.side-rail { display: none; }
@media (min-width: 1180px) {
  :root { --rail-w: clamp(200px, calc((100vw - var(--max)) / 2 - 56px), 300px); --rail-gap: 24px; }
  .side-rail {
    display: grid; gap: 12px; align-content: start;
    position: fixed; top: 50%; transform: translateY(-50%); /* 화면 세로 가운데 */
    z-index: 15; width: var(--rail-w); max-width: none; margin: 0;
    max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: none;
  }
  .side-rail::-webkit-scrollbar { display: none; }
  .side-left { right: calc(50% + var(--max) / 2 + var(--rail-gap)); }
  .side-right { left: calc(50% + var(--max) / 2 + var(--rail-gap)); }
  .rail-item { border-radius: var(--radius); overflow: hidden; background: var(--bg); box-shadow: 0 4px 18px rgba(0, 0, 0, .10); }
  .rail-item img, .rail-item video { display: block; width: 100%; height: auto; }
  .rail-item a { display: block; }
  .rail-yt { position: relative; aspect-ratio: 16 / 9; background: #000; }
  .rail-yt.is-short { aspect-ratio: 9 / 16; }
  .rail-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
  .rail-more { padding: 10px 12px; font-size: 13px; font-weight: 700; color: var(--brand); text-align: center; }
  /* 슬라이드: 한 장씩 */
  .side-rail[data-mode="slide"] { display: block; }
  .side-rail[data-mode="slide"] .rail-item { display: none; animation: railFade .5s ease; }
  .side-rail[data-mode="slide"] .rail-item.on { display: block; }
  .rail-dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0 2px; }
  .rail-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .2); cursor: pointer; }
  .rail-dots button.on { background: var(--brand); width: 20px; border-radius: 4px; }
  .in-popup .side-rail { display: none !important; }
}
@keyframes railFade { from { opacity: 0; } to { opacity: 1; } }

/* ── 휴대폰 홈 화면 배너 (관리자 > 배너 > '휴대폰에도 표시') — PC 에서는 숨김 ── */
.m-banner { padding: 14px 16px 4px; }
.m-track {
  display: flex; align-items: center; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; border-radius: var(--radius); -webkit-overflow-scrolling: touch;
}
.m-track::-webkit-scrollbar { display: none; }
.m-track > .rail-item { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
.m-banner .rail-item a { display: block; }
.m-banner .rail-item img, .m-banner .rail-item video { display: block; width: 100%; height: auto; }
.m-banner .rail-yt { position: relative; aspect-ratio: 16 / 9; background: #000; }
.m-banner .rail-yt.is-short { aspect-ratio: 9 / 16; width: min(100%, 300px); margin: 0 auto; }
.m-banner .rail-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.m-banner .rail-more { display: block; padding: 10px 12px; font-size: 13px; font-weight: 700; color: var(--brand); text-align: center; background: var(--bg-soft); }
.m-dots { display: flex; justify-content: center; gap: 6px; padding-top: 8px; }
.m-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 3px; background: var(--line); cursor: pointer; transition: width .2s; }
.m-dots button.on { width: 16px; background: var(--brand); }
@media (min-width: 1180px) { .m-banner { display: none; } }
@media (prefers-reduced-motion: reduce) { .m-dots button { transition: none; } }

/* PC 폭이 넓어 상품을 3줄로 (오빠믿어봐와 같은 기준) */
@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 24px 14px; }
}
