/* /wholesale: uses the site's colours and buttons (site.css) */
.ws-who { font-size: 14px; color: var(--muted); max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-hero { padding-block: 40px 28px; background:
  radial-gradient(1000px 360px at 85% -10%, #FDE3EB 0, transparent 60%),
  radial-gradient(800px 320px at 0% 0%, var(--mint) 0, transparent 60%); }
.ws-hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.1; margin: 10px 0 12px; }
.ws-hero h1 em { font-style: normal; color: var(--cherry); }
.ws-lede { max-width: 62ch; color: var(--muted); margin: 0 0 22px; font-size: 17px; }
.ws-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; counter-reset: s; }
.ws-steps li { background: var(--surface); border-radius: 16px; padding: 14px 16px 14px 54px; position: relative; box-shadow: 0 2px 10px rgba(80,30,40,.06); counter-increment: s; }
.ws-steps li::before { content: counter(s); position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--cherry); color: #fff; font: 700 15px/28px var(--display); text-align: center; }
.ws-steps b { display: block; font-family: var(--display); }
.ws-steps span { color: var(--muted); font-size: 14px; }

.ws-status { display: grid; gap: 16px; padding-block: 24px; }
.ws-card { background: var(--surface); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
.ws-card.ok { box-shadow: var(--shadow), inset 4px 0 0 var(--matcha); }
.ws-card.warn { box-shadow: var(--shadow), inset 4px 0 0 var(--gold); }
.ws-card h2 { font-size: clamp(20px, 3vw, 26px); margin-bottom: 8px; }
.ws-card p { margin: 0 0 12px; }
.ws-card p:last-child { margin-bottom: 0; }
.linkish { border: 0; background: none; padding: 0; color: var(--cherry); text-decoration: underline; font-weight: 700; }

.ws-form { display: grid; gap: 14px; }
.ws-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 16px; }
.ws-grid .wide { grid-column: 1 / -1; }
.ws-form label { display: grid; gap: 4px; font-size: 14px; font-weight: 700; color: var(--muted); }
.ws-form input, .ws-form select, .ws-form textarea, .ws-filters input, .ws-filters select {
  font: 500 16px/1.4 var(--body); color: var(--ink); background: #fff; border: 2px solid var(--rule); border-radius: 12px; padding: 10px 12px; width: 100%; }
.ws-form input:focus, .ws-form select:focus, .ws-form textarea:focus, .ws-filters input:focus { outline: none; border-color: var(--sakura-deep); }
.ws-form .btn { justify-self: start; }
.ws-error { color: var(--cherry-deep); margin: 0; min-height: 1.2em; }

.ws-catalog { padding-block: 16px 64px; }
.ws-cat-head { display: flex; gap: 16px; align-items: end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.ws-filters { display: flex; gap: 8px; flex: 1 1 320px; justify-content: flex-end; }
.ws-filters input { max-width: 280px; }
.ws-filters select { width: auto; }
.ws-grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
@media (max-width: 420px) { .ws-grid-products { grid-template-columns: 1fr 1fr; gap: 10px; } }
.ws-item { background: var(--surface); border-radius: 16px; overflow: hidden; box-shadow: 0 2px 12px rgba(80,30,40,.07); border: 0; padding: 0; text-align: left; display: flex; flex-direction: column; }
.ws-item:hover { box-shadow: var(--shadow); }
.ws-item img, .ws-item .noimg { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--paper-2); }
.ws-item .meta { padding: 10px 12px 12px; display: grid; gap: 2px; }
.ws-item .name { font-weight: 700; line-height: 1.35; font-size: 15px; }
.ws-item .sku { color: var(--muted); font-size: 12px; }
.ws-item .unit { color: var(--muted); font-size: 13px; }
.ws-item .price { font: 700 18px/1.2 var(--display); color: var(--cherry); margin-top: 4px; }
.ws-item .locked { font-size: 13px; color: var(--matcha); font-weight: 700; margin-top: 4px; }
.ws-item .stock { font-size: 12px; color: var(--muted); }
.ws-empty { text-align: center; color: var(--muted); padding: 40px 0; }

.ws-dialog { border: 0; border-radius: 22px; padding: 0; width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: var(--shadow); }
.ws-dialog::backdrop { background: rgba(47, 42, 40, .5); }
.ws-dialog-body { padding: 20px; display: grid; gap: 14px; }
.ws-dialog form { padding: 0 20px 20px; }
.ws-gallery { display: grid; gap: 8px; }
.ws-gallery .big { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 14px; background: var(--paper-2); }
.ws-gallery .strip { display: flex; gap: 6px; overflow-x: auto; }
.ws-gallery .strip button { border: 0; padding: 0; background: none; border-radius: 8px; overflow: hidden; flex: none; }
.ws-gallery .strip img { width: 64px; height: 64px; object-fit: cover; }
.ws-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; }
.ws-facts dt { color: var(--muted); }
.ws-facts dd { margin: 0; }
.ws-desc { white-space: pre-line; margin: 0; }

.ws-foot { padding: 24px 0 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--rule); }
.ws-foot .wrap { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }

/* orders and cart */
.ws-orders { padding-block: 8px 24px; }
.ws-orders h2 { font-size: clamp(22px, 3vw, 30px); margin-bottom: 12px; }
.table-scroll { overflow-x: auto; background: var(--surface); border-radius: 16px; box-shadow: 0 2px 12px rgba(80,30,40,.07); }
.ws-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ws-table th, .ws-table td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: middle; }
.ws-table tr:last-child td { border-bottom: 0; }
.ws-table th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ws-table .n { text-align: right; white-space: nowrap; }
.ws-table small { display: block; color: var(--muted); font-size: 12px; }
.ws-table input { width: 5.5em; padding: 6px 8px; border: 2px solid var(--rule); border-radius: 10px; font: inherit; text-align: right; }
.ws-status-pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; background: var(--paper-2); color: var(--cherry-deep); white-space: nowrap; }
.ws-status-pill.paid, .ws-status-pill.shipped { background: var(--mint); color: var(--matcha); }
.ws-status-pill.cancelled { background: #eee; color: var(--muted); }
.ws-link { border: 0; background: none; padding: 0; color: var(--cherry); font-weight: 700; text-decoration: underline; }
.ws-cartbar { position: sticky; bottom: 0; z-index: 40; background: rgba(255, 251, 247, .96); backdrop-filter: blur(6px); box-shadow: 0 -6px 20px rgba(80,30,40,.12); padding: 10px 0; }
.ws-cartbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ws-cartbar span { font-weight: 700; }
.ws-total { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin: 0; }
.ws-total b { font: 700 22px/1 var(--display); color: var(--cherry); }
.ws-total small { color: var(--muted); }
.ws-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.ws-add { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.ws-add label { display: grid; gap: 4px; font-size: 14px; font-weight: 700; color: var(--muted); }
.ws-add input { width: 7em; font: 500 16px/1.4 var(--body); border: 2px solid var(--rule); border-radius: 12px; padding: 10px 12px; }
.ws-item .incart { font-size: 12px; font-weight: 700; color: var(--matcha); }
@media (max-width: 520px) {
  .ws-table { font-size: 14px; }
  .ws-table th, .ws-table td { padding: 8px; }
  #cart .ws-table th:nth-child(3), #cart .ws-table td:nth-child(3) { display: none; }
  #my-orders .ws-table th:nth-child(2), #my-orders .ws-table td:nth-child(2) { display: none; }
  .ws-table td:first-child b { white-space: nowrap; }
  .ws-dialog-body { padding: 16px; }
}

/* sections */
.ws-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.ws-tabs button { border: 2px solid var(--rule); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; color: var(--ink); }
.ws-tabs button span { color: var(--muted); font-weight: 500; }
.ws-tabs button[aria-selected="true"] { background: var(--cherry); border-color: var(--cherry); color: #fff; }
.ws-tabs button[aria-selected="true"] span { color: #fde3eb; }
.ws-tabs button.secret { border-color: var(--gold); }
.ws-tabs button.secret[aria-selected="true"] { background: #b9770e; border-color: #b9770e; }
.ws-item { position: relative; }
.ws-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.ws-badges .b { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: rgba(255,255,255,.92); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.ws-badges .b.pre { color: var(--cherry-deep); }
.ws-badges .b.stock { color: var(--matcha); }
.ws-badges .b.secret { color: #8a5a00; }
