/* PYDERIN store — tokens, reset, layout, header/footer and shared components. */

:root {
  --ink: #111111;
  --ink-2: #3a3a3a;
  --muted: #7a7a7a;
  --subtle: #a6a6a6;
  --line: #e5e5e5;
  --line-soft: #f0f0f0;
  --surface: #f6f5f3;
  --surface-2: #faf9f7;
  --brand: #9b2246;
  --danger: #c0392b;
  --ok: #2f6b4f;

  --font: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  --font-en: 'Poppins', 'Noto Sans KR', sans-serif;

  --container: 1360px;
  --gutter: 40px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (max-width: 1023px) {
  :root { --gutter: 20px; --header-h: 56px; }
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 64px); }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--ink);
  background: #fff; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; word-break: keep-all;
}
/* keep-all is for Korean; Japanese/Chinese have no spaces and would only break at punctuation. */
html:is([lang="ja"], [lang|="zh"]) body { word-break: normal; line-break: strict; }
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
main { min-height: 60vh; outline: none; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 1400; padding: 10px 16px; background: var(--ink); color: #fff; font-size: 13px; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: calc(560px + var(--gutter) * 2); }
.container-mid { max-width: calc(960px + var(--gutter) * 2); }
.section { padding-top: 96px; }
.home-products { padding-bottom: 96px; } /* sits on the full-bleed statement image, so it needs its own bottom gap */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-head h2 { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; }
.page-head { padding: 56px 0 32px; }
.page-head h1 { font-size: 30px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; }
.page-head p { margin-top: 8px; color: var(--muted); font-size: 14px; }
@media (max-width: 1023px) {
  .section { padding-top: 64px; }
  .home-products { padding-bottom: 64px; }
  .section-head { margin-bottom: 20px; }
  .section-head h2 { font-size: 21px; }
  .page-head { padding: 32px 0 20px; }
  .page-head h1 { font-size: 23px; }
}

/* Links & buttons */
.link-more { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; text-decoration: underline; text-underline-offset: 4px; }
.link-more:hover { color: var(--ink); }
.link-more svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.link-more:hover svg { transform: translateX(3px); }
.text-link { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--subtle); }
.text-link:hover { text-decoration-color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 28px; border: 1px solid var(--ink); background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 500; white-space: nowrap; transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: #2b2b2b; border-color: #2b2b2b; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--surface); border-color: var(--ink); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #fff; border-color: var(--ink); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--line); border-color: var(--line); color: var(--subtle); cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--ink); position: relative; }
.icon-btn svg { width: 22px; height: 22px; }

/* Header */
#header-root { display: contents; }
.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.97); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s, transform .3s var(--ease); }
/* Hidden while scrolling down (layout.js); sticky bars use --header-offset so they follow it. */
:root { --header-offset: var(--header-h); }
body.header-hidden { --header-offset: 0px; }
body.header-hidden .site-header { transform: translateY(-100%); }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { height: var(--header-h); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 48px; }
.header-logo img { height: 30px; width: auto; max-width: none; }
.header-nav { display: flex; align-items: center; gap: 36px; height: 100%; }
.header-nav > a, .nav-drop > button { position: relative; display: inline-flex; white-space: nowrap; align-items: center; gap: 4px; height: 100%; font-size: 15px; font-weight: 500; color: var(--ink-2); transition: color .2s; }
.header-nav > a::after, .nav-drop > button::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ink); transform: scaleX(0); transition: transform .25s var(--ease); }
.header-nav > a:hover, .header-nav > a[aria-current="page"], .nav-drop > button:hover, .nav-drop.is-open > button { color: var(--ink); }
.header-nav > a[aria-current="page"]::after, .header-nav > a:hover::after { transform: scaleX(1); }
.nav-sep { width: 1px; height: 14px; background: var(--line); }
@media (max-width: 1439px) {
  .header-inner { gap: 32px; }
  .header-nav { gap: 22px; }
  .header-nav > a, .nav-drop > button { font-size: 14px; }
  .header-lang span { display: none; }
}
.nav-drop { position: relative; height: 100%; display: flex; }
.nav-drop > button svg { width: 14px; height: 14px; transition: transform .2s; }
.nav-drop.is-open > button svg { transform: rotate(180deg); }
.nav-drop-panel { position: absolute; top: 100%; left: -20px; z-index: 1; min-width: 200px; padding: 12px 0; background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0,0,0,.06); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .2s, transform .2s, visibility .2s; }
.nav-drop.is-open .nav-drop-panel { opacity: 1; visibility: visible; transform: none; }
.nav-drop-panel a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 9px 20px; font-size: 14px; color: var(--ink-2); }
.nav-drop-panel a:hover { color: var(--ink); background: var(--surface-2); }
.nav-drop-panel a svg { width: 12px; height: 12px; color: var(--subtle); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.lang-drop { position: relative; margin-right: 8px; }
.header-lang { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 6px; font-size: 13px; color: var(--ink-2); transition: color .2s; }
.header-lang:hover, .lang-drop.is-open .header-lang { color: var(--ink); }
.header-lang svg { width: 18px; height: 18px; }
.lang-panel { top: calc(100% + 16px); left: auto; right: 0; min-width: 168px; padding: 8px 0; }
.lang-drop.is-open .lang-panel { opacity: 1; visibility: visible; transform: none; }
.lang-panel button { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 16px; padding: 9px 20px; font-size: 14px; color: var(--ink-2); text-align: left; }
.lang-panel button:hover { color: var(--ink); background: var(--surface-2); }
.lang-panel button[aria-current="true"] { color: var(--ink); font-weight: 500; }
.lang-panel button svg { width: 14px; height: 14px; }
.header-actions .account-label { font-size: 13px; color: var(--ink-2); padding: 0 8px; }
.cart-count { position: absolute; top: 4px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--brand); color: #fff; font-family: var(--font-en); font-size: 10px; font-weight: 600; line-height: 17px; text-align: center; }
.cart-count.is-bump { animation: bump .4s var(--ease); }
@keyframes bump { 50% { transform: scale(1.3); } }
.header-menu-btn, .header-mobile-only { display: none; }
/* Seven nav items no longer fit below 1200px (any language), so the menu button takes over there. */
@media (max-width: 1199px) {
  .header-inner { grid-template-columns: 1fr auto 1fr; gap: 0; }
  .header-nav, .header-desktop-only, .header-actions .account-label, .header-lang span { display: none; }
  .lang-drop { margin-right: 0; }
  .header-lang { width: 40px; justify-content: center; padding: 0; }
  .lang-panel { top: calc(100% + 8px); }
  .header-menu-btn, .header-mobile-only { display: inline-flex; }
  .header-logo { justify-self: center; }
  .header-logo img { height: 24px; }
  .header-actions { justify-self: end; gap: 0; }
}

/* Mobile menu drawer */
.drawer-backdrop { position: fixed; inset: 0; z-index: 1100; background: rgba(0,0,0,.4); opacity: 0; transition: opacity .3s; }
.drawer-backdrop.is-open { opacity: 1; }
.drawer { position: fixed; top: 0; bottom: 0; z-index: 1110; width: min(420px, 100%); background: #fff; display: flex; flex-direction: column; transition: transform .35s var(--ease); }
.drawer-right { right: 0; transform: translateX(100%); }
.drawer-left { left: 0; transform: translateX(-100%); width: min(360px, 88%); }
.drawer.is-open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 12px 0 24px; border-bottom: 1px solid var(--line-soft); flex-shrink: 0; }
.drawer-head h2 { font-size: 16px; font-weight: 500; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px 24px; overscroll-behavior: contain; }
.drawer-foot { padding: 20px 24px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); flex-shrink: 0; }
.menu-group { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.menu-group:last-child { border-bottom: 0; }
.menu-group a { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-size: 17px; font-weight: 500; }
.menu-group.is-minor a { font-size: 14px; font-weight: 400; color: var(--ink-2); padding: 7px 0; }
.menu-group a svg { width: 14px; height: 14px; color: var(--subtle); }

/* Search overlay */
.search-panel { position: fixed; inset: 0 0 auto; z-index: 1110; background: #fff; transform: translateY(-100%); transition: transform .35s var(--ease); box-shadow: 0 20px 40px rgba(0,0,0,.08); }
.search-panel.is-open { transform: none; }
.search-form { display: flex; align-items: center; gap: 12px; height: 88px; border-bottom: 1px solid var(--ink); }
.search-form svg { width: 22px; height: 22px; flex-shrink: 0; }
.search-form input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; font-size: 22px; font-weight: 300; background: none; }
.search-form input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-form input::placeholder { color: var(--subtle); }
.search-results { padding: 24px 0 40px; max-height: 60vh; overflow-y: auto; }
.search-keywords { display: flex; flex-wrap: wrap; gap: 8px; }
.search-keywords button { height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 17px; font-size: 13px; color: var(--ink-2); }
.search-keywords button:hover { border-color: var(--ink); color: var(--ink); }
.search-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 32px; }
.search-item { display: flex; align-items: center; gap: 16px; padding: 8px 0; }
.search-item img { width: 64px; height: 64px; object-fit: contain; background: var(--surface); }
.search-item strong { display: block; font-size: 14px; font-weight: 500; line-height: 1.45; }
.search-item span { font-size: 13px; color: var(--muted); }
.search-empty { font-size: 14px; color: var(--muted); }
@media (max-width: 1023px) {
  .search-form { height: 64px; }
  .search-form input { font-size: 17px; }
}

/* Footer */
.site-footer { margin-top: 140px; border-top: 1px solid var(--line); padding: 56px 0 48px; background: #fff; font-size: 13px; color: var(--ink-2); }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line-soft); }
.footer-brand img { height: 22px; width: auto; margin-bottom: 20px; }
.footer-cs strong { display: block; font-family: var(--font-en); font-size: 22px; font-weight: 500; color: var(--ink); letter-spacing: 0; }
.footer-cs p { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.footer-col h3 { font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 14px; }
.footer-col a { display: block; padding: 4px 0; color: var(--muted); }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; gap: 40px; padding-top: 28px; }
.footer-biz { font-size: 12px; line-height: 1.9; color: var(--muted); }
.footer-biz span { display: inline-block; margin-right: 14px; }
.footer-biz b { font-weight: 500; color: var(--ink-2); margin-right: 4px; }
.footer-legal { display: flex; gap: 16px; margin-bottom: 10px; font-size: 12px; }
.footer-legal a { color: var(--ink-2); }
.footer-legal a:first-child { font-weight: 500; color: var(--ink); }
.footer-sns { display: flex; gap: 8px; }
.footer-sns a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; }
.footer-sns a:hover { border-color: var(--ink); }
.footer-sns svg { width: 16px; height: 16px; }
.footer-copy { margin-top: 16px; font-family: var(--font-en); font-size: 11px; color: var(--subtle); letter-spacing: 0; }
@media (max-width: 1023px) {
  .site-footer { margin-top: 96px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col:last-child { grid-column: auto; }
  .footer-bottom { flex-direction: column-reverse; gap: 20px; }
  .footer-biz span { display: block; margin: 0; }
}

/* Forms */
.field { display: block; margin-bottom: 16px; }
.field-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field-label em { font-style: normal; color: var(--brand); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 0; background: #fff;
  font-size: 15px; transition: border-color .2s; -webkit-appearance: none; appearance: none;
}
.textarea { height: auto; min-height: 140px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
.select { padding-right: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px; }
.input:hover, .select:hover, .textarea:hover { border-color: #c9c9c9; }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--ink); }
.input::placeholder, .textarea::placeholder { color: var(--subtle); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--danger); }
.input:disabled { background: var(--surface-2); color: var(--muted); }
.field-error { display: block; margin-top: 6px; font-size: 12px; color: var(--danger); }
.field-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.input-group .btn { flex: 0 1 160px; height: auto; padding: 0 12px; } /* same box as the 160px zip field next to it */
.check { display: inline-flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; line-height: 1.5; }
.check input { -webkit-appearance: none; appearance: none; flex-shrink: 0; width: 20px; height: 20px; margin: 1px 0 0; border: 1px solid #c9c9c9; background: #fff; cursor: pointer; transition: background .15s, border-color .15s; }
.check input:checked { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4'%3E%3Cpath d='m5 12 4 4 10-10'/%3E%3C/svg%3E") no-repeat center / 14px; border-color: var(--ink); }
.check input[type="radio"] { border-radius: 50%; }
.check input[type="radio"]:checked { background: #fff; box-shadow: inset 0 0 0 5px var(--ink); }
.form-alert { padding: 14px 16px; margin-bottom: 20px; background: #fbf1f1; color: var(--danger); font-size: 13px; }
.form-note { padding: 14px 16px; background: var(--surface); color: var(--ink-2); font-size: 13px; line-height: 1.7; }

/* Quantity stepper */
.qty { display: inline-flex; align-items: center; height: 40px; border: 1px solid var(--line); }
.qty button { width: 38px; height: 100%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.qty button:disabled { color: var(--line); cursor: default; }
.qty button svg { width: 14px; height: 14px; }
.qty input { width: 40px; height: 100%; border: 0; text-align: center; font-family: var(--font-en); font-size: 14px; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-sm { height: 32px; }
.qty-sm button { width: 30px; }
.qty-sm input { width: 32px; font-size: 13px; }

/* Price & numbers */
.num { font-family: var(--font-en); letter-spacing: 0; }
.price { font-family: var(--font-en); font-weight: 500; letter-spacing: 0; }
.price small { font-family: var(--font); font-size: .82em; font-weight: 400; margin-left: 1px; }

/* Stars */
.stars { --rating: 0; position: relative; display: inline-block; width: 76px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23dcdcdc'%3E%3Cpath d='m12 2 2.9 6.6 7.1.6-5.4 4.7 1.6 7L12 17.3 5.8 21l1.6-7L2 9.2l7.1-.6z'/%3E%3C/svg%3E") repeat-x 0 0 / 15.2px 14px; vertical-align: -1px; }
.stars::after { content: ''; position: absolute; inset: 0; width: calc(var(--rating) / 5 * 100%); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23111'%3E%3Cpath d='m12 2 2.9 6.6 7.1.6-5.4 4.7 1.6 7L12 17.3 5.8 21l1.6-7L2 9.2l7.1-.6z'/%3E%3C/svg%3E") repeat-x 0 0 / 15.2px 14px; }

/* Badges & chips */
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px .15em; /* .15em: Noto Sans KR sits low at line-height 1 */ background: #fff; border: 1px solid var(--ink); font-size: 11px; font-weight: 500; line-height: 1; }
.badge-solid { background: var(--ink); color: #fff; }
.badge-brand { border-color: var(--brand); color: var(--brand); }
.chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; height: 38px; padding: 0 18px; border: 1px solid var(--line); border-radius: 19px; font-size: 14px; color: var(--ink-2); background: #fff; transition: border-color .2s, background .2s, color .2s; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Product card */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 56px 24px; }
.product-card { position: relative; display: flex; flex-direction: column; }
.product-card-media { position: relative; display: block; aspect-ratio: 1; background: var(--surface); overflow: hidden; }
.product-card-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .6s var(--ease); }
.product-card:hover .product-card-media img { transform: scale(1.04); }
/* Hover "담기": sits on the bottom of the square image (media height = card width = 100cqw). */
.product-card { container-type: inline-size; }
.product-card-cart { position: absolute; left: 12px; right: 12px; top: calc(100cqw - 56px); z-index: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 44px; border: 0; background: rgba(17,17,17,.88); color: #fff; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s var(--ease), background .2s; }
.product-card-cart svg { width: 16px; height: 16px; }
.product-card-cart:hover { background: #000; }
.product-card:hover .product-card-cart, .product-card-cart:focus-visible { opacity: 1; transform: none; }
/* Touch screens have no hover: show a small bag button instead. */
@media (hover: none) {
  .product-card-cart { left: auto; right: 8px; top: calc(100cqw - 48px); width: 40px; height: 40px; border-radius: 50%; opacity: 1; transform: none; }
  .product-card-cart span { display: none; }
}
.product-card-badges { position: absolute; top: 14px; left: 14px; display: flex; gap: 4px; z-index: 1; }
.product-card-badges .badge { height: 28px; padding: 0 12px .15em; font-size: 13px; }
.product-card-body { padding-top: 18px; display: flex; flex-direction: column; gap: 4px; }
.product-card-name { font-size: 15px; font-weight: 400; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.product-card-meta { font-size: 12px; color: var(--muted); }
.product-card-price { margin-top: 6px; font-size: 16px; }
@media (max-width: 1023px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 12px; }
  .product-card-body { padding-top: 14px; }
  .product-card-name { font-size: 14px; }
  .product-card-price { font-size: 15px; }
  .product-card-badges { top: 10px; left: 10px; }
}

/* Carousel arrows (press section) */
.rail-nav { display: flex; gap: 8px; }
.rail-nav button { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; transition: border-color .2s, opacity .2s; }
.rail-nav button:hover:not(:disabled) { border-color: var(--ink); }
.rail-nav button:disabled { opacity: .35; cursor: default; }
.rail-nav svg { width: 16px; height: 16px; }
@media (max-width: 1023px) {
  .rail-nav { display: none; }
}

/* Tabs (underline) */
.tabs { display: flex; gap: 32px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { position: relative; flex-shrink: 0; padding: 14px 0; font-size: 15px; color: var(--muted); transition: color .2s; }
.tabs button::after, .tabs a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); transform: scaleX(0); transition: transform .25s var(--ease); }
.tabs [aria-selected="true"], .tabs [aria-current="true"] { color: var(--ink); font-weight: 500; }
.tabs [aria-selected="true"]::after, .tabs [aria-current="true"]::after { transform: scaleX(1); }
.tabs .count { font-family: var(--font-en); font-size: 12px; margin-left: 4px; color: var(--subtle); }

/* Accordion */
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-size: 15px; font-weight: 500; cursor: pointer; list-style: none; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary svg { width: 16px; height: 16px; flex-shrink: 0; transition: transform .25s var(--ease); }
.accordion details[open] summary svg { transform: rotate(180deg); }
.accordion .accordion-body { padding: 0 0 24px; font-size: 14px; color: var(--ink-2); line-height: 1.8; }

/* Steps */
.steps { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--subtle); }
.steps li { display: flex; align-items: center; gap: 12px; }
.steps li + li::before { content: ''; width: 24px; height: 1px; background: var(--line); }
.steps b { font-family: var(--font-en); font-weight: 500; margin-right: 6px; }
.steps [aria-current="step"] { color: var(--ink); font-weight: 500; }
.steps .is-done { color: var(--muted); }

/* Free shipping meter */
.ship-meter p { font-size: 13px; color: var(--ink-2); }
.ship-meter p b { font-weight: 500; color: var(--ink); }
.ship-meter-bar { margin-top: 10px; height: 3px; background: var(--line-soft); overflow: hidden; }
.ship-meter-bar span { display: block; height: 100%; background: var(--ink); transition: width .5s var(--ease); }
.ship-meter.is-free .ship-meter-bar span { background: var(--ok); }

/* Summary rows */
.summary-rows { display: grid; gap: 12px; font-size: 14px; }
.summary-rows div { display: flex; justify-content: space-between; gap: 16px; }
.summary-rows dt { color: var(--muted); }
.summary-rows dd { font-family: var(--font-en); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--line); }
.summary-total span { font-size: 15px; font-weight: 500; }
.summary-total strong { font-family: var(--font-en); font-size: 24px; font-weight: 600; letter-spacing: 0; }

/* Mini cart line */
.line-item { display: grid; grid-template-columns: 80px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line-soft); }
.line-item img { width: 80px; height: 80px; object-fit: contain; background: var(--surface); }
.line-item-name { font-size: 14px; line-height: 1.5; }
.line-item-tag { display: inline-block; margin-left: 6px; font-size: 11px; color: var(--muted); }
.line-item-meta { margin-top: 4px; font-size: 12px; color: var(--muted); }
.line-item-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.line-item.is-new { animation: highlight 1.6s ease; }
@keyframes highlight { from { background: var(--surface); } to { background: transparent; } }

/* Empty & status */
.empty { padding: 96px 0; text-align: center; }
.empty svg { width: 40px; height: 40px; margin: 0 auto 20px; color: var(--subtle); stroke-width: 1.1; }
.empty h2 { font-size: 19px; font-weight: 500; }
.empty p { margin-top: 8px; font-size: 14px; color: var(--muted); }
.empty .btn { margin-top: 28px; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .25s; }
.modal-backdrop.is-open { opacity: 1; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow-y: auto; background: #fff; transform: translateY(12px); transition: transform .3s var(--ease); }
.modal-backdrop.is-open .modal { transform: none; }
.modal-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 16px 28px; background: #fff; border-bottom: 1px solid var(--line-soft); }
.modal-head h2 { font-size: 17px; font-weight: 500; }
.modal-body { padding: 24px 28px 28px; }
.modal-actions { display: flex; gap: 8px; margin-top: 24px; }
.modal-actions .btn { flex: 1; }
@media (max-width: 640px) {
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { max-height: 90vh; transform: translateY(100%); }
  .modal-body { padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); }
  .modal-head { padding-left: 20px; }
}

/* Toast */
#toast-root { position: fixed; left: 50%; bottom: 32px; z-index: 1300; transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: calc(100vw - 32px); padding: 13px 22px; background: rgba(17,17,17,.94); color: #fff; font-size: 14px; text-align: center; animation: toast-in .3s var(--ease); }
.toast.is-leaving { animation: toast-out .25s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
body.has-buybar #toast-root { bottom: calc(96px + env(safe-area-inset-bottom)); }

/* Breadcrumb */

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 40px; }
.pagination button { min-width: 36px; height: 36px; font-family: var(--font-en); font-size: 13px; color: var(--muted); }
.pagination button[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--ink); }
.pagination button:disabled { opacity: .3; cursor: default; }

/* Reveal on scroll (progressive: content is visible without JS) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
