/* WhaleMall storefront — modern minimal commerce
 * Design tokens, layout primitives, components.
 */

@font-face {
    font-family: "JF Open Huninn";
    src: url("/r2/assets/fonts/jf-openhuninn-2.1.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #0f172a;
    --ink-soft: #1f2937;
    --text: #334155;
    --text-soft: #64748b;
    --muted: #94a3b8;
    --line: #e5e7eb;
    --line-soft: #f1f5f9;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #f1f5f9;
    --bg: #ffffff;
    --accent: #0f172a;
    --accent-soft: #1e293b;
    --highlight: #e11d48;
    --highlight-soft: #fdf2f8;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, .06);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, .08);
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-pill: 999px;
    --container: 1280px;
    --container-wide: 1440px;
    --header-h: 72px;
    --font-sans: "JF Open Huninn", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
    --transition: 180ms cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
::selection { background: var(--ink); color: #fff; }

h1, h2, h3, h4, h5 { color: var(--ink); font-weight: 700; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3vw, 36px); line-height: 1.2; }
h3 { font-size: 22px; line-height: 1.3; }
h4 { font-size: 18px; line-height: 1.4; }
p { margin: 0 0 12px; }

/* Container */
.wm-container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.wm-container--wide { max-width: var(--container-wide); }
.wm-container--narrow { max-width: 960px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Top announcement bar */
.wm-topbar {
    background: var(--ink);
    color: #f8fafc;
    font-size: 13px;
    letter-spacing: 0.04em;
}
.wm-topbar__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    min-height: 38px;
}
.wm-topbar__left { text-align: left; opacity: .85; }
.wm-topbar__center { text-align: center; font-weight: 500; opacity: .9; }
.wm-topbar__right { text-align: right; }
.wm-topbar__right a { color: #f8fafc; opacity: .85; border-bottom: 1px solid rgba(248, 250, 252, .25); }
.wm-topbar__right a:hover { color: #fff; opacity: 1; }

/* Header */
.wm-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.wm-header__row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
    min-height: var(--header-h);
}
.wm-logo { display: inline-flex; flex-direction: column; line-height: 1; color: var(--ink); }
.wm-logo__title { font-weight: 800; font-size: 22px; letter-spacing: 0.02em; }
.wm-logo__sub { margin-top: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.wm-logo__image { display: block; max-height: 44px; max-width: 220px; object-fit: contain; }

.wm-search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 520px;
    margin: 0 auto;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    padding: 4px 6px 4px 18px;
    transition: border-color var(--transition), background var(--transition);
}
.wm-search:focus-within { background: #fff; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(15, 23, 42, .06); }
.wm-search__input {
    flex: 1;
    min-width: 0;
    height: 40px;
    border: 0;
    background: transparent;
    outline: 0;
    font-size: 14px;
    color: var(--ink);
}
.wm-search__input::placeholder { color: var(--muted); }
.wm-search__button {
    height: 36px;
    padding: 0 18px;
    border: 0;
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.wm-search__button:hover { background: var(--accent-soft); }

.wm-header__actions { display: flex; align-items: center; gap: 8px; }
.wm-header__link {
    display: inline-flex; align-items: center; gap: 6px;
    height: 40px; padding: 0 14px;
    border-radius: var(--radius-pill);
    font-size: 14px; font-weight: 500; color: var(--ink);
}
.wm-header__link:hover { background: var(--surface-2); }
/* JS toggles the [hidden] attribute on data-member-logout-wrap to mirror
   session state; force it to win against the base display:inline-flex
   so the 登出 link only appears once a member is logged in. */
.wm-header__link[hidden] { display: none !important; }
.wm-cart-button {
    position: relative;
    display: inline-flex; align-items: center; gap: 8px;
    height: 40px; padding: 0 16px 0 14px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius-pill);
    font-size: 14px; font-weight: 600;
}
.wm-cart-button:hover { background: var(--accent-soft); color: #fff; }
.wm-cart-button__count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 6px;
    border-radius: var(--radius-pill);
    background: #fff; color: var(--ink);
    font-size: 11px; font-weight: 700;
}
.wm-cart-button__total { font-variant-numeric: tabular-nums; }

.wm-menu-toggle {
    display: none;
    width: 40px; height: 40px;
    border: 1px solid var(--line); background: #fff;
    border-radius: var(--radius-sm);
    align-items: center; justify-content: center;
    flex-direction: column; gap: 4px;
}
.wm-menu-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }

/* Primary nav */
.wm-nav {
    border-top: 1px solid var(--line-soft);
    background: #fff;
}
.wm-nav__list {
    display: flex;
    align-items: center;
    gap: 32px;
    margin: 0; padding: 0;
    list-style: none;
    min-height: 52px;
    overflow-x: auto;
    scrollbar-width: none;
}
.wm-nav__list::-webkit-scrollbar { display: none; }
.wm-nav__item { position: relative; flex-shrink: 0; }
.wm-nav__link {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 14px 0; color: var(--text);
    font-size: 14px; font-weight: 500;
    border-bottom: 2px solid transparent;
}
.wm-nav__link:hover { color: var(--ink); border-bottom-color: var(--ink); }
.wm-nav__caret { font-size: 10px; opacity: .6; }
.wm-nav__submenu {
    position: absolute; top: 100%; left: 0;
    min-width: 220px; padding: 12px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    list-style: none; margin: 4px 0 0;
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.wm-nav__item:hover .wm-nav__submenu { opacity: 1; visibility: visible; transform: none; }
.wm-nav__submenu a {
    display: block; padding: 8px 10px; border-radius: var(--radius-sm);
    font-size: 14px; color: var(--text);
}
.wm-nav__submenu a:hover { background: var(--surface-2); color: var(--ink); }

/* Hero */
.wm-hero {
    position: relative;
    padding: clamp(72px, 12vw, 144px) 0;
    background: linear-gradient(180deg, var(--surface-2) 0%, #fff 100%);
    overflow: hidden;
}
.wm-hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.wm-hero__eyebrow {
    display: inline-block;
    font-size: 12px; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 20px;
}
.wm-hero__title { color: var(--ink); margin: 0 0 20px; }
.wm-hero__lead { font-size: 18px; line-height: 1.6; color: var(--text); max-width: 540px; margin: 0 0 32px; }
.wm-hero__cta { display: inline-flex; align-items: center; gap: 12px; }
.wm-hero__art {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg);
    background: var(--surface-3);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.wm-hero__art img { width: 100%; height: 100%; object-fit: cover; }
/* Classic hero (image-with-text-overlay) — preserved as opt-in layout
   for stores that want the original full-bleed look. */
.wm-hero-classic { padding: 24px 0 8px; }
.wm-hero-classic--full { padding: 0; }
.wm-hero-classic__banner {
    display: flex; align-items: center; justify-content: flex-start;
    min-height: var(--hero-min-height, 430px);
    padding: clamp(36px, 6vw, 88px);
    background-color: var(--surface-3);
    background-size: cover; background-position: center;
    border-radius: inherit;
    color: var(--ink); text-decoration: none;
    transition: filter var(--transition);
}
.wm-hero-classic__banner:hover { filter: brightness(.98); }
.wm-hero-classic--full .wm-hero-classic__banner { border-radius: 0; }
.wm-hero-classic__inner { max-width: 640px; }
.wm-hero-classic__eyebrow {
    display: inline-block; margin-bottom: 18px;
    font-size: 12px; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--ink);
}
.wm-hero-classic__title {
    color: var(--ink);
    font-size: clamp(28px, 4.5vw, 52px); line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
}
.wm-hero-classic__lead {
    color: var(--text);
    font-size: 16px; line-height: 1.65;
    max-width: 520px; margin: 0 0 22px;
}
.wm-hero-classic__cta {
    display: inline-block; margin-top: 4px;
    padding: 12px 26px;
    background: var(--ink); color: #fff;
    border-radius: var(--radius-pill);
    font-weight: 600; font-size: 14px; letter-spacing: 0.02em;
}
@media (max-width: 720px) {
    .wm-hero-classic__banner {
        min-height: var(--hero-mobile-min-height, 330px);
        padding: 28px 22px;
    }
    .wm-hero-classic__title { font-size: 26px; }
}

/* Buttons */
.wm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding: 0 24px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-size: 15px; font-weight: 600; letter-spacing: 0.02em;
    background: var(--ink); color: #fff;
    transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
    text-align: center;
    cursor: pointer;
}
.wm-btn:hover { background: var(--accent-soft); color: #fff; transform: translateY(-1px); }
.wm-btn:active { transform: translateY(0); }
.wm-btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.wm-btn--outline:hover { background: var(--ink); color: #fff; }
.wm-btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.wm-btn--ghost:hover { background: var(--surface-2); color: var(--ink); }
.wm-btn--accent { background: var(--highlight); color: #fff; }
.wm-btn--accent:hover { background: #be123c; color: #fff; }
.wm-btn--sm { height: 36px; padding: 0 16px; font-size: 13px; }
.wm-btn--lg { height: 56px; padding: 0 32px; font-size: 16px; }
.wm-btn--block { width: 100%; }

/* Section */
.wm-section { padding: clamp(60px, 9vw, 120px) 0; }
.wm-section--tight { padding: clamp(40px, 6vw, 80px) 0; }
.wm-section--surface { background: var(--surface-2); }
.wm-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 40px; flex-wrap: wrap; }
.wm-section__title { margin: 0; }
.wm-section__eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-soft); margin-bottom: 12px; }
.wm-section__lead { color: var(--text-soft); max-width: 560px; font-size: 15px; line-height: 1.6; }
.wm-section__more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; }

/* Category chips */
.wm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.wm-chip {
    display: inline-flex; align-items: center;
    height: 36px; padding: 0 16px;
    background: #fff; color: var(--text);
    border: 1px solid var(--line); border-radius: var(--radius-pill);
    font-size: 13px; font-weight: 500;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.wm-chip:hover { color: var(--ink); border-color: var(--ink); }
.wm-chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Product card */
.wm-grid { display: grid; gap: 28px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wm-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wm-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.wm-card {
    position: relative;
    display: flex; flex-direction: column;
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.wm-card:hover { transform: translateY(-3px); border-color: var(--line); box-shadow: var(--shadow-md); }
.wm-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--surface-3);
    overflow: hidden;
}
.wm-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.wm-card:hover .wm-card__media img { transform: scale(1.04); }
.wm-card__badge {
    position: absolute; top: 12px; left: 12px;
    display: inline-flex; align-items: center;
    height: 24px; padding: 0 10px;
    background: var(--ink); color: #fff;
    border-radius: var(--radius-pill);
    font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
}
.wm-card__badge--accent { background: var(--highlight); }
.wm-card__badge--soft { background: rgba(15, 23, 42, .08); color: var(--ink); }
.wm-card__body { padding: 18px 18px 22px; display: flex; flex-direction: column; gap: 6px; }
.wm-card__category { font-size: 11px; font-weight: 600; color: var(--text-soft); letter-spacing: 0.14em; text-transform: uppercase; }
.wm-card__title { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.4; min-height: calc(1.4em * 2);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wm-card__price-row { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.wm-card__price { font-size: 18px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.wm-card__price-orig { font-size: 13px; color: var(--muted); text-decoration: line-through; font-variant-numeric: tabular-nums; }
.wm-card__meta { font-size: 12px; color: var(--text-soft); margin-top: 4px; }
.wm-card__cta {
    margin-top: 14px;
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--ink);
    align-self: flex-start;
}
.wm-card__cta::after { content: "→"; transition: transform var(--transition); }
.wm-card:hover .wm-card__cta::after { transform: translateX(4px); }

/* Status overlay */
.wm-card__status {
    position: absolute; inset: 0;
    display: none; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .85);
    color: var(--ink); font-weight: 700; letter-spacing: 0.12em;
}
.wm-card--soldout .wm-card__status,
.wm-card--discontinued .wm-card__status { display: flex; }

/* Pagination */
.wm-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 56px; }
.wm-pagination a, .wm-pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 12px;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: #fff; color: var(--text);
    font-size: 14px; font-weight: 500;
}
.wm-pagination a:hover { border-color: var(--ink); color: var(--ink); }
.wm-pagination .is-current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Badges row (USPs) */
.wm-usps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.wm-usp { padding: 28px; background: var(--surface-2); border-radius: var(--radius-md); }
.wm-usp__icon { width: 36px; height: 36px; border-radius: 10px; background: #fff; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--ink); font-size: 18px; font-weight: 700; }
.wm-usp__title { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.wm-usp__text { font-size: 13px; color: var(--text-soft); line-height: 1.55; margin: 0; }

/* Promotion notice */
.wm-promo { background: var(--ink); color: #fff; padding: 24px 0; }
.wm-promo__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.wm-promo__title { font-size: 16px; font-weight: 700; color: #fff; margin: 0; }
.wm-promo__items { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; }
.wm-promo__items span { opacity: .9; }

/* Footer */
.wm-footer { background: #0b1220; color: #cbd5e1; padding: 72px 0 32px; }
.wm-footer a { color: #cbd5e1; }
.wm-footer a:hover { color: #fff; }
.wm-footer__cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 48px; margin-bottom: 56px; }
.wm-footer__brand { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: 0.02em; margin-bottom: 16px; }
.wm-footer__intro { font-size: 14px; line-height: 1.7; opacity: .85; max-width: 360px; }
.wm-footer__title { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 18px; }
.wm-footer__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.wm-footer__bottom { padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; opacity: .7; }

/* Cart drawer */
.wm-drawer {
    position: fixed; top: 0; right: 0;
    width: min(420px, 100%); height: 100%;
    background: #fff; box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 260ms cubic-bezier(.2, .8, .2, 1);
    display: flex; flex-direction: column;
    z-index: 100;
    pointer-events: none;
    visibility: hidden;
}
.wm-drawer.open {
    transform: none;
    pointer-events: auto;
    visibility: visible;
}
body:has(.wm-drawer.open)::before {
    content: "";
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 90;
    pointer-events: none;
}
.wm-drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 24px; border-bottom: 1px solid var(--line); }
.wm-drawer__title { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-soft); }
.wm-drawer__title strong { display: block; color: var(--ink); font-size: 18px; letter-spacing: 0; text-transform: none; margin-top: 2px; }
.wm-drawer__close { width: 36px; height: 36px; border: 0; background: transparent; font-size: 18px; color: var(--text-soft); }
.wm-drawer__close:hover { color: var(--ink); }
.wm-drawer__items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.wm-drawer__foot { border-top: 1px solid var(--line); padding: 20px 24px 24px; background: var(--surface-2); }
.wm-drawer__note { font-size: 13px; color: var(--text-soft); margin-bottom: 12px; min-height: 18px; }
.wm-drawer__row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; font-size: 14px; color: var(--text); }
.wm-drawer__row strong { color: var(--ink); font-size: 16px; font-variant-numeric: tabular-nums; }
.wm-drawer__row--total { padding-top: 12px; border-top: 1px dashed var(--line); margin-top: 4px; }
.wm-drawer__row--total strong { font-size: 22px; font-weight: 800; }

/* Cart drawer item — matches JS-generated class names (cart-item-...) */
.cart-item {
    position: relative;
    display: grid;
    grid-template-columns: 20px 64px 1fr;
    grid-template-areas:
        "check thumb body";
    column-gap: 10px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line-soft);
    align-items: start;
}
.cart-item:last-child { border-bottom: 0; }
.cart-item.is-disabled { opacity: .55; }

.cart-item-check {
    grid-area: check;
    margin: 0;
    align-self: center;
    accent-color: var(--ink);
}

.cart-item-thumb {
    grid-area: thumb;
    width: 64px; height: 64px;
    display: block;
    border-radius: var(--radius-sm);
    background: var(--surface-3);
    overflow: hidden;
    flex-shrink: 0;
}
.cart-item-thumb img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}

.cart-item-body {
    grid-area: body;
    min-width: 0;
    display: flex; flex-direction: column;
    gap: 4px;
    padding-right: 22px;
}
.cart-item-name {
    color: var(--ink);
    font-size: 14px; font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.cart-item-name:hover { color: var(--accent, var(--ink)); }
.cart-item-spec {
    font-size: 12px;
    color: var(--text-soft);
    line-height: 1.4;
}
.cart-item-stock {
    display: inline-block;
    margin-top: 2px;
    padding: 2px 8px;
    background: var(--danger);
    color: #fff;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    width: fit-content;
}

.cart-item-bottom {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin-top: 6px;
}
.cart-item-bottom > span {
    font-size: 14px; font-weight: 700;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.cart-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #fff;
}
.cart-qty button {
    width: 28px; height: 28px;
    border: 0;
    background: #fff;
    color: var(--ink);
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    line-height: 1;
}
.cart-qty button:hover:not(:disabled) { background: var(--surface-2); }
.cart-qty button:disabled { color: var(--muted); cursor: not-allowed; }
.cart-qty input {
    width: 36px; height: 28px;
    text-align: center;
    border: 0;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
    appearance: textfield;
    padding: 0;
}
.cart-qty input::-webkit-outer-spin-button,
.cart-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.cart-item-remove {
    position: absolute;
    top: 12px; right: 0;
    width: 22px; height: 22px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; background: transparent;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    border-radius: 50%;
    line-height: 1;
}
.cart-item-remove:hover { background: var(--danger); color: #fff; }

/* Dialogs */
.wm-dialog {
    border: 0; padding: 0; margin: auto;
    border-radius: var(--radius-lg);
    background: #fff;
    width: min(440px, 92vw);
    box-shadow: var(--shadow-lg);
    color: var(--text);
}
.wm-dialog::backdrop { background: rgba(15, 23, 42, .55); }
.wm-dialog__shell { padding: 32px; }
.wm-dialog h2 { font-size: 22px; margin: 0 0 8px; color: var(--ink); }
.wm-dialog__lead { color: var(--text-soft); font-size: 14px; margin-bottom: 24px; }
.wm-dialog__row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.wm-dialog__row label { font-size: 12px; font-weight: 600; color: var(--text-soft); letter-spacing: 0.06em; text-transform: uppercase; }
.wm-dialog__row input, .wm-dialog__row select, .wm-dialog__row textarea {
    width: 100%;
    height: 44px; padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 15px;
}
.wm-dialog__row textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.wm-dialog__row input:focus, .wm-dialog__row select:focus, .wm-dialog__row textarea:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(15, 23, 42, .08); }
.wm-dialog__actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
.wm-dialog__close { position: absolute; right: 16px; top: 16px; width: 32px; height: 32px; border: 0; background: transparent; font-size: 20px; color: var(--muted); cursor: pointer; }
.wm-dialog__close:hover { color: var(--ink); }

/* Auth dialog tabs + panels */
.auth-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 20px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
}
.auth-tab {
    flex: 1;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--text-soft);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.auth-tab:hover { color: var(--ink); }
.auth-tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.auth-panel { display: none; }
.auth-panel.active { display: block; }
.password-meter { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.password-meter span { display: block; height: 4px; flex: 1; background: var(--line); border-radius: 2px; overflow: hidden; position: relative; }
.password-meter span::after { content: ''; display: block; height: 100%; background: var(--ink); width: 0%; transition: width var(--transition); }
.password-meter strong { font-size: 12px; font-weight: 500; color: var(--text-soft); }

/* Account dialog */
.account-orders { display: flex; flex-direction: column; gap: 12px; max-height: 320px; overflow-y: auto; }
.account-order-card {
    padding: 14px 16px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 13px;
}
.account-order-card a { color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.account-order-card a:hover { text-decoration: underline; }
.account-order-card > div {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 6px; color: var(--text-soft);
}
.account-order-card > div strong { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.account-order-card ul { margin: 8px 0 0; padding: 0 0 0 16px; color: var(--text-soft); font-size: 12px; }
.account-empty { color: var(--text-soft); font-size: 13px; padding: 16px 0; text-align: center; }

/* Product page */
.wm-product { padding: clamp(40px, 6vw, 80px) 0; }
.wm-product__layout { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; }
.wm-product__gallery { display: flex; flex-direction: column; gap: 12px; }
.wm-product__main-image { aspect-ratio: 1 / 1; background: var(--surface-3); border-radius: var(--radius-md); overflow: hidden; }
.wm-product__main-image img { width: 100%; height: 100%; object-fit: cover; }
.wm-product__thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.wm-product__thumbs button { aspect-ratio: 1 / 1; padding: 0; background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; }
.wm-product__thumbs button.is-active { border-color: var(--ink); }
.wm-product__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.wm-product__category { font-size: 12px; font-weight: 600; color: var(--text-soft); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 14px; }
.wm-product__title { color: var(--ink); margin: 0 0 16px; line-height: 1.15; }
.wm-product__summary { color: var(--text); font-size: 15px; line-height: 1.65; margin-bottom: 28px; }
.wm-product__price-row { display: flex; align-items: baseline; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wm-product__price { font-size: 32px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.wm-product__price-orig { font-size: 16px; color: var(--muted); text-decoration: line-through; }
.wm-product__options { display: flex; flex-direction: column; gap: 18px; margin-top: 28px; }
.wm-product__option-label { font-size: 13px; font-weight: 600; color: var(--text-soft); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; display: block; }
.wm-product__option-row { display: flex; flex-wrap: wrap; gap: 8px; }
.wm-product__option-row button,
.swatchly-swatch {
    position: relative;
    min-height: 44px;
    padding: 6px 16px;
    border: 1px solid var(--line); background: #fff;
    border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; color: var(--text);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px;
    /* No bg/color transition — toggle state should be instant so the
       text isn't briefly invisible while bg has already turned black. */
}
.wm-product__option-row button:hover:not(:disabled):not(.is-active):not(.swatchly-selected),
.swatchly-swatch:hover:not(:disabled):not(.swatchly-selected) {
    border-color: var(--ink); color: var(--ink);
}
/* Selected state stays solid black with white text even on hover.
   !important to guard against any later .swatchly-swatch:hover override
   (the swatches sit inside .wm-product__option-row so both swatch
   selectors and that wrapper's button selectors can apply). */
.wm-product__option-row button.is-active,
.wm-product__option-row button.is-active:hover,
.wm-product__option-row button.swatchly-selected,
.wm-product__option-row button.swatchly-selected:hover,
.swatchly-swatch.swatchly-selected,
.swatchly-swatch.swatchly-selected:hover {
    background: var(--ink) !important;
    color: #fff !important;
    border-color: var(--ink) !important;
    font-weight: 600;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, .12);
}
/* Children inside selected swatch also force white (in case any other
   rule colors swatchly-text / swatchly-content). */
.swatchly-swatch.swatchly-selected .swatchly-text,
.swatchly-swatch.swatchly-selected .swatchly-content { color: #fff !important; }
.wm-product__option-row button:disabled,
.swatchly-swatch.swatchly-disabled,
.swatchly-swatch:disabled {
    opacity: .42;
    cursor: not-allowed;
    text-decoration: line-through;
}
.swatchly-content {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    line-height: 1.2;
}
.swatchly-text { line-height: 1.2; font-weight: 600; }
.swatchly-swatch .selected-badge {
    display: inline-flex; align-items: center;
    padding: 1px 6px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-left: 4px;
}
.swatchly-swatch .swatchly-stock {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.15;
    color: var(--text-soft);
    letter-spacing: 0;
}
.swatchly-swatch.swatchly-selected .swatchly-stock { color: rgba(255, 255, 255, .85); }
.swatchly-swatch.swatchly-disabled .swatchly-stock,
.swatchly-swatch:disabled .swatchly-stock { color: var(--danger); }
.wm-product__qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); height: 48px; overflow: hidden; }
.wm-product__qty button { width: 44px; height: 100%; border: 0; background: #fff; font-size: 18px; color: var(--ink); }
.wm-product__qty input { width: 56px; height: 100%; border: 0; text-align: center; font-size: 16px; font-weight: 600; background: #fff; }
.wm-product__cta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 28px; }
.wm-product__cta .wm-btn { flex: 1; min-width: 180px; }
.wm-product__description { margin-top: 64px; }
.wm-product__description-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.wm-product__description-tab { padding: 12px 20px; border: 0; background: transparent; border-bottom: 2px solid transparent; font-size: 14px; font-weight: 600; color: var(--text-soft); }
.wm-product__description-tab.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.wm-product__description-body { font-size: 15px; line-height: 1.75; color: var(--text); }
.wm-product__description-body img { border-radius: var(--radius-md); margin: 16px 0; }

/* Checkout */
.wm-checkout { padding: clamp(40px, 6vw, 80px) 0; background: var(--surface-2); min-height: 60vh; }
.wm-checkout__title { margin-bottom: 12px; }
.wm-checkout__hint {
    margin: 0 0 24px;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--ink);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
}
.wm-checkout__hint strong { color: var(--ink); margin-right: 4px; }
.wm-checkout__hint a { color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 1px; font-weight: 600; }
.wm-checkout__hint-sep { display: inline-block; margin: 0 8px; color: var(--muted); }
.wm-checkout__layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.wm-card-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 28px; margin-bottom: 16px; }
.wm-card-block__title { font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-soft); margin: 0 0 16px; font-weight: 700; }
.wm-checkout-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.wm-checkout-field label { font-size: 12px; font-weight: 600; color: var(--text-soft); letter-spacing: 0.06em; text-transform: uppercase; }
.wm-checkout-field input, .wm-checkout-field select, .wm-checkout-field textarea {
    width: 100%;
    height: 44px; padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 15px;
}
.wm-checkout-field textarea { height: auto; min-height: 88px; padding: 12px 14px; }
.wm-checkout-field input:focus, .wm-checkout-field select:focus, .wm-checkout-field textarea:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(15, 23, 42, .08); }
.wm-checkout-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wm-checkout-summary { position: sticky; top: 88px; }
.wm-checkout-summary__row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; color: var(--text); }
.wm-checkout-summary__row--total { padding-top: 12px; margin-top: 6px; border-top: 1px solid var(--line); font-size: 18px; font-weight: 700; color: var(--ink); }

/* CVS 取貨門市 picker — JS injects .checkout-cvs-option (region chips)
   and .checkout-cvs-store (store buttons) into the [data-cvs711-*]
   containers. */
.checkout-cvs-picker { display: flex; flex-direction: column; gap: 8px; }
.checkout-cvs-breadcrumb { font-size: 13px; color: var(--text-soft); }
[data-cvs711-status] { font-size: 13px; color: var(--text-soft); margin: 0; }
.checkout-cvs-options { display: flex; flex-wrap: wrap; gap: 6px; }
.checkout-cvs-stores { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-height: 320px; overflow-y: auto; }
.checkout-cvs-option {
    display: inline-flex; align-items: center;
    height: 32px; padding: 0 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    color: var(--text);
    font-size: 13px; font-weight: 500;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.checkout-cvs-option:hover { border-color: var(--ink); color: var(--ink); }
.checkout-cvs-option.selected,
.checkout-cvs-option.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.checkout-cvs-store {
    text-align: left;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 13px; color: var(--text);
    cursor: pointer;
    line-height: 1.45;
}
.checkout-cvs-store strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 2px; }
.checkout-cvs-store:hover { border-color: var(--ink); }
.checkout-cvs-store.selected { background: var(--ink); color: #fff; border-color: var(--ink); }
.checkout-cvs-store.selected strong { color: #fff; }
.checkout-cvs-store.disabled,
.checkout-cvs-store:disabled { opacity: .5; cursor: not-allowed; }
.checkout-cvs-note { font-size: 12px; color: var(--text-soft); margin: 0; }

/* Plugin fields (聯絡資料 LINE / Telegram / BeeIn, 收件地址) come from
   server-rendered checkout-plugin-fields blocks. They use plain
   <label>text <input></label>, so style them up to match the rest of
   the form. */
.checkout-plugin-fields {
    display: flex; flex-direction: column;
    gap: 12px;
    margin: 0 0 12px;
}
.checkout-plugin-fields h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
}
.checkout-plugin-fields > label,
.checkout-plugin-fields .checkout-plugin-check {
    display: flex; flex-direction: column;
    gap: 6px;
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--text-soft);
}
.checkout-plugin-fields > label > input[type="text"],
.checkout-plugin-fields > label > input[type="email"],
.checkout-plugin-fields > label > input[type="tel"],
.checkout-plugin-fields > label > input[type="url"],
.checkout-plugin-fields > label > input[type="search"],
.checkout-plugin-fields > label > input:not([type]),
.checkout-plugin-fields > label > textarea,
.checkout-plugin-fields > label > select {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font-size: 14px; font-weight: 400;
    letter-spacing: 0; text-transform: none;
}
.checkout-plugin-fields > label > textarea { min-height: 84px; resize: vertical; }
.checkout-plugin-fields > label > input:focus,
.checkout-plugin-fields > label > textarea:focus,
.checkout-plugin-fields > label > select:focus {
    outline: 0;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, .08);
}
/* Confirm-style checkbox rows (e.g. 我確認已經加入官方 LINE) — checkbox
   stays a single 16x16 box on the left, label text wraps next to it. */
.checkout-plugin-fields .checkout-plugin-check {
    display: flex;
    flex-direction: row; align-items: flex-start; gap: 10px;
    padding: 10px 14px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500;
    letter-spacing: 0; text-transform: none;
    color: var(--text);
    line-height: 1.5;
    cursor: pointer;
}
.checkout-plugin-fields .checkout-plugin-check input[type="checkbox"] {
    flex: 0 0 16px;
    width: 16px; height: 16px;
    min-height: 0;
    padding: 0;
    margin: 2px 0 0;
    accent-color: var(--ink);
}

/* Checkout summary line items — JS renders .checkout-item rows into
   [data-checkout-items]. Small 56x56 thumb, name + spec stacked, qty
   stepper + 移除 link aligned right. */
.checkout-item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line-soft);
    align-items: center;
}
.checkout-item:last-child { border-bottom: 0; }
.checkout-item-thumb {
    width: 56px; height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-3);
    display: block;
    flex-shrink: 0;
}
.checkout-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.checkout-item-body { min-width: 0; }
.checkout-item-name {
    color: var(--ink);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    line-height: 1.4;
    display: block;
}
.checkout-item-name:hover { color: var(--accent, var(--ink)); }
.checkout-item-spec { font-size: 12px; color: var(--text-soft); display: block; margin-top: 2px; }
.checkout-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.checkout-item-qty {
    display: inline-flex; align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #fff;
    height: 28px;
}
.checkout-item-qty button {
    width: 24px; height: 100%;
    border: 0;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: var(--ink);
    padding: 0;
    line-height: 1;
}
.checkout-item-qty button:hover { background: var(--surface-2); }
.checkout-item-qty span {
    min-width: 28px; height: 100%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; color: var(--ink);
    font-variant-numeric: tabular-nums;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
}
.checkout-item-remove {
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 4px;
}
.checkout-item-remove:hover { color: var(--danger); background: var(--danger-soft, #fef2f2); }
.checkout-item-price { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; font-size: 14px; }
.checkout-empty { padding: 18px 0; color: var(--text-soft); font-size: 13px; }

.checkout-total-row {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 6px 0; font-size: 13px; color: var(--text);
}
.checkout-total-row strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.checkout-total-row.checkout-grand-total { padding-top: 12px; border-top: 1px solid var(--line); margin-top: 6px; font-size: 16px; font-weight: 700; }

/* Footer legal links */
.wm-footer__legal {
    display: flex; flex-wrap: wrap;
    gap: 12px 24px;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
    margin-top: 8px;
    font-size: 13px;
}
.wm-footer__legal a { opacity: .85; }

/* Static pages */
.wm-static-page {
    font-size: 15px;
    color: var(--text);
    line-height: 1.8;
}
.wm-static-page h2 { margin: 32px 0 12px; color: var(--ink); font-size: 22px; }
.wm-static-page h3 { margin: 24px 0 10px; color: var(--ink); font-size: 18px; }
.wm-static-page p { margin: 0 0 14px; }
.wm-static-page ul, .wm-static-page ol { padding-left: 22px; margin: 0 0 16px; }
.wm-static-page li { margin-bottom: 6px; }
.wm-static-page a { color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 1px; }

/* Contact form */
.wm-contact-form { display: flex; flex-direction: column; gap: 0; }
.wm-contact-form__status {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--text-soft);
    min-height: 18px;
}
.wm-contact-form__status.is-success { color: var(--success); }
.wm-contact-form__status.is-error { color: var(--danger); }

.wm-payment-options { display: flex; flex-direction: column; gap: 12px; }
.wm-payment-option {
    display: flex; gap: 12px; padding: 14px 16px;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: #fff; cursor: pointer;
    transition: border-color var(--transition);
}
.wm-payment-option:hover { border-color: var(--ink); }
.wm-payment-option input { margin-top: 4px; }
.wm-payment-option strong { color: var(--ink); display: block; font-size: 14px; }
.wm-payment-option small { color: var(--text-soft); font-size: 12px; }

/* Order complete */
.wm-order-success { padding: clamp(56px, 9vw, 96px) 0; text-align: center; }
.wm-order-success__icon { width: 72px; height: 72px; border-radius: 50%; background: var(--success); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 32px; margin-bottom: 24px; }
.wm-order-success__title { margin: 0 0 12px; }
.wm-order-success__lead { color: var(--text-soft); margin-bottom: 28px; }
.wm-order-summary { max-width: 640px; margin: 0 auto; text-align: left; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; padding: 28px; }

/* Platform marketing home */
.wm-platform { background: linear-gradient(180deg, #fdfdff 0%, #fff 100%); }
.wm-platform-hero { padding: clamp(80px, 12vw, 160px) 0 80px; text-align: center; }
.wm-platform-hero__eyebrow { display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-soft); margin-bottom: 24px; }
.wm-platform-hero__title { color: var(--ink); font-size: clamp(40px, 6vw, 72px); line-height: 1.05; max-width: 940px; margin: 0 auto 24px; letter-spacing: -0.03em; }
.wm-platform-hero__lead { font-size: 18px; color: var(--text); max-width: 600px; margin: 0 auto 32px; line-height: 1.6; }
.wm-platform-hero__cta { display: inline-flex; gap: 12px; }

.wm-features { padding: 80px 0; }
.wm-features__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.wm-feature { padding: 32px; background: var(--surface-2); border-radius: var(--radius-md); }
.wm-feature__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 20px; font-weight: 700; }
.wm-feature__title { font-size: 18px; margin: 0 0 8px; color: var(--ink); }
.wm-feature__text { font-size: 14px; color: var(--text-soft); line-height: 1.6; margin: 0; }

/* Platform create-store form — sits on the right, hero copy on the left. */
.wm-platform-hero { padding: clamp(64px, 9vw, 120px) 0 80px; }
.wm-platform-hero__grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 56px;
    align-items: start;
}
.wm-platform-hero__copy { text-align: left; }
.wm-platform-hero__eyebrow { display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-soft); margin-bottom: 22px; }
.wm-platform-hero__title { color: var(--ink); font-size: clamp(32px, 4.5vw, 56px); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 22px; }
.wm-platform-hero__lead { font-size: 17px; color: var(--text); line-height: 1.65; max-width: 560px; margin: 0 0 24px; }
.wm-platform-hero__bullets {
    list-style: none; margin: 0 0 28px; padding: 0;
    display: flex; flex-direction: column; gap: 10px;
}
.wm-platform-hero__bullets li {
    position: relative; padding-left: 26px;
    font-size: 14px; color: var(--text);
}
.wm-platform-hero__bullets li::before {
    content: "✓";
    position: absolute; left: 0; top: 0;
    width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--ink); color: #fff;
    font-size: 10px; font-weight: 700;
    border-radius: 50%;
}

.wm-platform-form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 96px;
    text-align: left;
    color: var(--text);
}
.wm-platform-form__head { margin-bottom: 18px; }
.wm-platform-form__eyebrow { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-soft); margin-bottom: 6px; }
.wm-platform-form__title { color: var(--ink); margin: 0 0 6px; font-size: 22px; }
.wm-platform-form__head p { color: var(--text-soft); font-size: 13px; margin: 0; line-height: 1.55; }

.wm-platform-form__field {
    display: flex; flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.wm-platform-form__field > span {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-soft);
    text-transform: uppercase;
}
.wm-platform-form__field input {
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--radius-sm);
    font-size: 14px;
}
.wm-platform-form__field input:focus {
    outline: 0;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, .08);
}
.wm-platform-form__subdomain {
    display: flex; align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface);
}
.wm-platform-form__subdomain input {
    flex: 1; min-width: 0;
    border: 0; height: 44px; padding: 0 14px;
    font-size: 14px;
    background: transparent;
    outline: 0;
}
.wm-platform-form__subdomain em {
    padding: 0 14px;
    height: 100%;
    display: inline-flex; align-items: center;
    background: var(--surface-2);
    color: var(--text-soft);
    font-style: normal;
    font-size: 13px;
    font-weight: 500;
    border-left: 1px solid var(--line);
}

.wm-platform-form .wm-btn { margin-top: 6px; }
.wm-platform-form__status {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--text-soft);
    min-height: 18px;
    line-height: 1.55;
}
.wm-platform-form__status a { color: var(--ink); border-bottom: 1px solid var(--ink); }
.wm-platform-form__status.is-success { color: var(--success); }
.wm-platform-form__status.is-error { color: var(--danger); }

@media (max-width: 960px) {
    .wm-platform-hero__grid { grid-template-columns: 1fr; gap: 36px; }
    .wm-platform-form { position: static; }
}

/* Floating contact */
.wm-fab { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; flex-direction: column; gap: 12px; }
.wm-fab__item {
    width: 52px; height: 52px;
    background: var(--ink); color: #fff;
    border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-lg); font-weight: 700;
    transition: transform var(--transition);
}
.wm-fab__item:hover { transform: translateY(-3px); color: #fff; }

/* Misc */
.wm-empty { padding: 80px 20px; text-align: center; color: var(--text-soft); }
.wm-empty h3 { color: var(--ink); margin-bottom: 8px; }
.wm-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; font-size: 11px; font-weight: 600; border-radius: var(--radius-pill); background: var(--surface-3); color: var(--text); }
.wm-tag--accent { background: var(--highlight-soft); color: var(--highlight); }
.wm-tag--success { background: #ecfdf5; color: var(--success); }

/* Member area */
.wm-member { padding: clamp(40px, 6vw, 80px) 0; }
.wm-member__layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; }
.wm-member__sidebar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; height: fit-content; }
.wm-member__sidebar a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; color: var(--text); }
.wm-member__sidebar a:hover, .wm-member__sidebar a.is-active { background: var(--surface-2); color: var(--ink); }

/* Responsive */
@media (max-width: 1024px) {
    .wm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .wm-usps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wm-hero__inner { grid-template-columns: 1fr; gap: 32px; }
    .wm-product__layout { grid-template-columns: 1fr; gap: 32px; }
    .wm-checkout__layout { grid-template-columns: 1fr; }
    .wm-footer__cols { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}
@media (max-width: 720px) {
    .wm-container { padding: 0 16px; }

    /* Topbar: hide the middle blurb on phones, keep welcome (truncated)
       + right-side support link only. */
    .wm-topbar { font-size: 11px; letter-spacing: 0.02em; }
    .wm-topbar__inner {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        min-height: 34px;
    }
    .wm-topbar__center { display: none; }
    .wm-topbar__left {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Header: [hamburger]  [logo]  [auth · cart]
       Search drops to a second row spanning full width. */
    .wm-header__row {
        grid-template-columns: auto 1fr auto;
        gap: 8px;
        min-height: 60px;
        padding: 8px 0;
    }
    .wm-logo { justify-self: start; }
    .wm-logo__title { font-size: 18px; }
    .wm-logo__sub { display: none; }
    .wm-logo__image { max-height: 36px; }

    .wm-search {
        grid-column: 1 / -1;
        order: 5;
        max-width: 100%;
        padding: 3px 5px 3px 14px;
        margin-top: 2px;
    }
    .wm-search__input { height: 36px; font-size: 13px; }
    .wm-search__button { height: 30px; padding: 0 14px; font-size: 12px; }

    .wm-header__actions { gap: 2px; justify-self: end; }
    .wm-menu-toggle { display: inline-flex; order: -1; }

    /* Hide most chrome links on mobile — they live in the dropdown nav
       below. Auth link stays so users can sign in / see member name. */
    .wm-header__link { display: none; padding: 0 8px; height: 36px; font-size: 13px; }
    .wm-header__link[data-auth-open]:not([hidden]),
    .wm-header__link[data-member-logout]:not([hidden]) { display: inline-flex; }

    .wm-cart-button { padding: 0 12px 0 10px; height: 36px; font-size: 12px; }
    .wm-cart-button__total { display: none; }
    .wm-cart-button__count { min-width: 20px; height: 20px; font-size: 10px; }

    /* Primary nav collapses; opens when body.mobile-menu-open. */
    .wm-nav { display: none; border-top: 1px solid var(--line); background: #fff; }
    body.mobile-menu-open .wm-nav { display: block; }
    .wm-nav .wm-container { padding: 0; }
    .wm-nav__list {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        min-height: 0;
        padding: 4px 0;
        overflow: visible;
    }
    .wm-nav__item { width: 100%; flex-shrink: 1; }
    .wm-nav__link {
        width: 100%;
        padding: 12px 16px;
        border-bottom: 1px solid var(--line-soft);
        justify-content: space-between;
    }
    .wm-nav__submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        border-radius: 0;
        padding: 0;
        margin: 0;
        background: var(--surface-2);
    }
    .wm-nav__submenu a { padding-left: 32px; border-bottom: 1px solid var(--line-soft); border-radius: 0; }

    .wm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .wm-grid--three, .wm-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wm-card__body { padding: 14px 14px 18px; }
    .wm-section__head { flex-direction: column; align-items: flex-start; }
    .wm-features__grid { grid-template-columns: 1fr; }
    .wm-footer__cols { grid-template-columns: 1fr; }
    .wm-hero { padding: 56px 0; }
}

