/* Someway shop — uses the site tokens (site.css / theme.css): --ink, --signal, --paper, --line, --muted, --radius */
.sp-h2 { font-size: clamp(1.35rem, 2.2vw, 1.8rem); font-stretch: 110%; margin: 0 0 22px; color: var(--ink); }
.sp-search { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 0 0 34px; padding: 14px; background: var(--paper); border-radius: var(--radius-lg); }
.sp-search input[type=search] { flex: 1 1 320px; min-height: 48px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: var(--radius); font: inherit; background: var(--white); }
.sp-search label { display: inline-flex; gap: 7px; align-items: center; font-weight: 600; font-size: .95rem; cursor: pointer; }
.sp-search-sm { margin-bottom: 18px; padding: 10px 14px; }
.sp-search select { min-height: 40px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: var(--radius); font: inherit; background: var(--white); }
.sp-count { color: var(--muted); margin: 0 0 16px; }
.sp-catnav { margin-bottom: 18px; }

.sp-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 56px; }
.sp-cat { position: relative; display: flex; align-items: flex-end; min-height: 170px; padding: 14px; border-radius: var(--radius-lg); background: var(--paper); text-decoration: none; color: var(--ink); overflow: hidden; isolation: isolate; }
.sp-cat img { position: absolute; inset: 10px 10px 54px; width: calc(100% - 20px); height: calc(100% - 64px); object-fit: contain; z-index: -1; transition: transform .4s var(--ease); }
.sp-cat:hover img { transform: scale(1.06); }
.sp-cat span { display: grid; gap: 2px; }
.sp-cat b { font-size: 1.02rem; line-height: 1.25; }
.sp-cat small { color: var(--muted); }

.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px 18px; }
.sp-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--white); transition: box-shadow .25s, transform .25s; }
.sp-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.sp-card-img { position: relative; display: block; aspect-ratio: 1; background: #F7F8FA; }
.sp-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: opacity .3s; }
.sp-card-img .sp-alt { opacity: 0; }
.sp-card-img .sp-alt[data-src] { display: none; }
.sp-card:hover .sp-alt { opacity: 1; }
.sp-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.sp-b { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.sp-b.new { background: var(--signal); color: var(--on-signal); }
.sp-b.eco { background: #1E7A4F; color: #fff; }
.sp-card-body { padding: 12px 14px 16px; display: grid; gap: 4px; }
.sp-ref { margin: 0; font-size: .8rem; color: var(--muted); font-weight: 600; letter-spacing: .03em; }
.sp-name { margin: 0; font-size: 1rem; line-height: 1.3; }
.sp-name a { color: var(--ink); text-decoration: none; }
.sp-name a:hover { text-decoration: underline; }
.sp-stock { margin: 2px 0 0; font-size: .85rem; font-weight: 700; }
.sp-stock.ok { color: #1E7A4F; }
.sp-stock.order { color: var(--muted); }

.sp-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.sp-steps li { counter-increment: s; display: grid; gap: 4px; padding: 20px; background: var(--white); border-radius: var(--radius-lg); }
.sp-steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--signal); color: var(--on-signal); font-weight: 800; margin-bottom: 6px; }
.sp-steps span { color: var(--muted); }
.sp-faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.sp-faq summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.sp-faq p { margin: 10px 0 0; color: var(--muted); max-width: 820px; }

/* product page */
.sp-crumbs { padding-top: 24px; }
.crumbs-dark a, .crumbs-dark span { color: var(--muted); }
.sp-product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.sp-gallery { position: sticky; top: calc(var(--header-h) + 12px); }
.sp-stage { position: relative; aspect-ratio: 1; background: #F7F8FA; border-radius: var(--radius-lg); overflow: hidden; touch-action: none; }
.sp-main { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.sp-logo-box { position: absolute; border: 1.5px dashed rgba(var(--ink-rgb), .55); cursor: move; touch-action: none; }
.sp-logo-box canvas { width: 100%; height: 100%; display: block; }
.sp-handle { position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--signal); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: nwse-resize; }
.sp-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.sp-thumbs button { flex: 0 0 74px; height: 74px; padding: 4px; border: 2px solid var(--line); border-radius: var(--radius); background: #F7F8FA; cursor: pointer; }
.sp-thumbs button.on { border-color: var(--signal); }
.sp-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.sp-title { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; font-stretch: 110%; margin: 6px 0 8px; color: var(--ink); }
.sp-desc { color: var(--text); margin: 14px 0; }
.sp-specs { margin: 0 0 22px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.sp-specs li { padding: 5px 11px; border-radius: 999px; background: var(--paper); font-size: .9rem; font-weight: 600; }
.sp-form { display: grid; gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); }
.sp-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sp-f { display: grid; gap: 5px; font-weight: 600; font-size: .92rem; color: var(--ink); }
.sp-f input, .sp-f select, .sp-f textarea { width: 100%; min-height: 46px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--radius); font: inherit; font-weight: 400; background: var(--white); color: var(--text); }
.sp-f textarea { padding: 10px 12px; min-height: 70px; }
.sp-f small { font-weight: 400; color: var(--muted); }
.sp-logo { border: 1.5px dashed var(--line); border-radius: var(--radius-lg); padding: 12px 14px; margin: 0; }
.sp-logo legend { font-weight: 800; color: var(--ink); padding: 0 6px; }
.sp-drop { position: relative; display: grid; gap: 4px; justify-items: center; text-align: center; padding: 16px; border-radius: var(--radius); background: var(--paper); cursor: pointer; }
.sp-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sp-drop small { color: var(--muted); }
.sp-logo-state { margin: 8px 0 0; font-weight: 600; }
.sp-logo-state.ok { color: #1E7A4F; }
.sp-logo-help { margin: 6px 0 0; color: var(--muted); font-size: .9rem; }
.sp-link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
.sp-msg { margin: 0; font-weight: 700; min-height: 1.4em; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sp-msg.ok { color: #1E7A4F; }
.sp-msg.err, .sp-alert.err { color: var(--err); }
.sp-note { margin: 0; font-size: .88rem; color: var(--muted); }

/* cart */
.sp-alert { padding: 12px 16px; border-radius: var(--radius); background: var(--paper); font-weight: 700; }
.sp-alert.ok { color: #1E7A4F; }
.sp-checkout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.sp-line { display: grid; grid-template-columns: 96px minmax(0, 1fr) 96px auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sp-line-img { position: relative; width: 96px; height: 96px; background: #F7F8FA; border-radius: var(--radius); }
.sp-line-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.sp-tag { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 4px; background: var(--signal); color: var(--on-signal); font-size: .66rem; font-weight: 800; z-index: 1; }
.sp-line h3 { margin: 2px 0; font-size: 1.02rem; }
.sp-line h3 a { color: var(--ink); }
.sp-meta { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.sp-warn { margin: 4px 0 0; color: #9A6700; font-weight: 600; font-size: .88rem; }
.sp-qty input { width: 96px; }
.sp-lines-foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 14px; }
.sp-send { display: grid; gap: 12px; padding: 22px; border-radius: var(--radius-lg); background: var(--paper); position: sticky; top: calc(var(--header-h) + 12px); }

/* header */
.header-shop { position: relative; gap: 6px; }
.shop-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 2px; border-radius: 999px; background: var(--signal); color: var(--on-signal); font-size: .72rem; font-weight: 800; }
.shop-count[hidden] { display: none; }

@media (max-width: 1000px) {
  .sp-product, .sp-checkout { grid-template-columns: 1fr; }
  .sp-gallery, .sp-send { position: static; }
  .sp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sp-row { grid-template-columns: 1fr; }
  .sp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .sp-line { grid-template-columns: 72px minmax(0, 1fr); }
  .sp-line-img { width: 72px; height: 72px; }
  .sp-steps { grid-template-columns: 1fr; }
  .header-shop { display: none; }
}

/* ---- e-commerce layout (listing, cart, checkout) ---- */
.sp-shop { padding-bottom: 64px; }
.sp-shop .sp-crumbs { margin: 0 0 18px; font-size: .88rem; color: var(--muted); }
.sp-shop .sp-crumbs a { color: var(--muted); }
.sp-shop .sp-crumbs span { color: var(--ink); font-weight: 600; }
.sp-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start; }
.sp-side { position: sticky; top: calc(var(--header-h) + 12px); max-height: calc(100vh - var(--header-h) - 24px); overflow-y: auto; }
.sp-side-box > summary { display: none; }
.sp-side-search { display: flex; border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.sp-side-search input { flex: 1; min-width: 0; min-height: 42px; padding: 0 12px; border: 0; font: inherit; background: transparent; }
.sp-side-search button { width: 44px; border: 0; background: var(--ink); color: var(--white); font-size: 1.2rem; cursor: pointer; }
.sp-side-h { margin: 22px 0 8px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sp-side-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.sp-side-cats a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: var(--radius); color: var(--ink); text-decoration: none; font-size: .93rem; line-height: 1.3; }
.sp-side-cats a:hover { background: var(--paper); }
.sp-side-cats a[aria-current] { background: var(--ink); color: var(--white); font-weight: 700; }
.sp-side-cats small { color: inherit; opacity: .6; font-variant-numeric: tabular-nums; }
.sp-side-filters { display: grid; gap: 8px; }
.sp-side-filters label { display: flex; gap: 8px; align-items: center; font-size: .93rem; cursor: pointer; }
.sp-side-filters input { width: 17px; height: 17px; accent-color: var(--signal); }
.sp-side-help { display: grid; gap: 4px; margin-top: 24px; padding: 14px; border-radius: var(--radius); background: var(--paper); font-size: .88rem; }
.sp-side-help span { color: var(--muted); }
.sp-side-help a { font-weight: 700; color: var(--ink); }
.sp-head h1 { margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.2; color: var(--ink); }
.sp-intro { margin: 6px 0 0; color: var(--muted); max-width: 760px; font-size: .95rem; }
.sp-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 16px 0 18px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sp-toolbar p { margin: 0; color: var(--muted); font-size: .93rem; }
.sp-toolbar p b { color: var(--ink); }
.sp-sort label { display: flex; gap: 8px; align-items: center; font-size: .9rem; color: var(--muted); }
.sp-sort select { min-height: 38px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: var(--radius); font: inherit; color: var(--ink); background: var(--white); }
.sp-list .sp-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.sp-card-body { flex: 1; align-content: start; }
.sp-price { margin: 0; font-size: .85rem; color: var(--ink); font-weight: 600; }
.sp-card-act { display: grid; gap: 6px; padding: 0 12px 12px; }
.sp-add { width: 100%; min-height: 38px; border: 0; border-radius: var(--radius); background: var(--signal); color: var(--on-signal); font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
.sp-add:hover { filter: brightness(.95); }
.sp-add:disabled { opacity: .7; cursor: default; }
.sp-custom { display: grid; place-items: center; padding: 0 10px; min-height: 34px; border: 1.5px solid var(--line); border-radius: var(--radius); color: var(--ink); font-size: .85rem; font-weight: 600; text-decoration: none; }
.sp-custom:hover { border-color: var(--ink); }
.sp-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 32px 0 0; }
.sp-pages a, .sp-pages span { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 600; }
.sp-pages a:hover { border-color: var(--ink); }
.sp-pages span[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.sp-trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 48px 0 0; padding: 0; list-style: none; }
.sp-trust li { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius); background: var(--paper); font-size: .9rem; }
.sp-trust span { color: var(--muted); }
.sp-shop .sp-faq { margin-top: 40px; max-width: 900px; }
.sp-shop .sp-faq h2 { font-size: 1.3rem; margin: 0 0 6px; color: var(--ink); }
.sp-toast { position: fixed; right: 18px; bottom: 100px; z-index: 90; display: grid; gap: 4px; max-width: 320px; padding: 14px 18px; border-radius: var(--radius-lg); background: var(--ink); color: var(--white); box-shadow: var(--shadow); font-size: .92rem; }
.sp-toast[hidden] { display: none; }
.sp-toast a { color: var(--white); font-weight: 700; }
.sp-toast.err { background: var(--err); }

/* cart / checkout / confirmation */
.sp-co h1 { margin: 0 0 18px; font-size: clamp(1.4rem, 2.4vw, 1.9rem); color: var(--ink); }
.sp-steps-bar { display: flex; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.sp-steps-bar li { flex: 1; display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 3px solid var(--line); color: var(--muted); font-weight: 600; font-size: .92rem; }
.sp-steps-bar li span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--line); color: var(--ink); font-size: .8rem; font-weight: 800; flex: 0 0 auto; }
.sp-steps-bar li.now { border-color: var(--signal); color: var(--ink); }
.sp-steps-bar li.now span { background: var(--signal); color: var(--on-signal); }
.sp-steps-bar li.done { border-color: #1E7A4F; color: var(--ink); }
.sp-steps-bar li.done span { background: #1E7A4F; color: #fff; }
.sp-co-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.sp-co .sp-line { grid-template-columns: 88px minmax(0, 1fr) auto; }
.sp-co .sp-line-img { width: 88px; height: 88px; display: block; }
.sp-line-act { display: grid; gap: 6px; justify-items: end; }
.sp-qty { display: grid; gap: 3px; font-size: .8rem; color: var(--muted); }
.sp-qty input { min-height: 40px; padding: 0 8px; border: 1.5px solid var(--line); border-radius: var(--radius); font: inherit; }
.sp-co .sp-lines-foot { justify-content: space-between; }
.sp-sum { position: sticky; top: calc(var(--header-h) + 12px); display: grid; gap: 14px; padding: 20px; border-radius: var(--radius-lg); background: var(--paper); }
.sp-sum h2 { margin: 0; font-size: 1.15rem; color: var(--ink); }
.sp-sum dl { margin: 0; display: grid; gap: 6px; }
.sp-sum dl div { display: flex; justify-content: space-between; gap: 10px; }
.sp-sum dt { color: var(--muted); }
.sp-sum dd { margin: 0; font-weight: 700; color: var(--ink); }
.sp-sum-go { width: 100%; justify-content: center; text-align: center; }
.sp-sum-info { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: .88rem; color: var(--muted); }
.sp-sum-info li::before { content: "\2713  "; color: #1E7A4F; font-weight: 800; }
.sp-back { font-size: .9rem; color: var(--ink); }
.sp-mini { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; max-height: 340px; overflow-y: auto; }
.sp-mini li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: .88rem; }
.sp-mini img { width: 48px; height: 48px; object-fit: contain; background: var(--white); border-radius: 6px; padding: 3px; }
.sp-mini span { display: grid; }
.sp-mini small { color: var(--muted); }
.sp-mini em { font-style: normal; font-weight: 700; color: var(--ink); }
.sp-co .sp-form { gap: 6px; }
.sp-co fieldset { border: 0; margin: 0; padding: 0 0 14px; display: grid; gap: 12px; }
.sp-co legend { font-weight: 800; color: var(--ink); font-size: 1.02rem; margin-bottom: 10px; }
.sp-co .sp-row { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.sp-empty { display: grid; gap: 14px; justify-items: start; padding: 32px; border-radius: var(--radius-lg); background: var(--paper); }
.sp-empty p { margin: 0; font-size: 1.05rem; }
.sp-done { text-align: center; padding: 18px 0 30px; }
.sp-done-ok { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; background: #1E7A4F; color: #fff; font-size: 2rem; font-weight: 800; }
.sp-done h1 { margin-bottom: 8px; }
.sp-done-num { font-size: 1.1rem; }
.sp-done-num b { padding: 3px 10px; border-radius: var(--radius); background: var(--paper); color: var(--ink); letter-spacing: .03em; }
.sp-next h2 { font-size: 1.15rem; color: var(--ink); margin: 0 0 12px; }
.sp-next ol { margin: 0 0 22px; padding: 0; list-style: none; display: grid; }
.sp-next li { position: relative; display: grid; gap: 2px; padding: 0 0 18px 34px; }
.sp-next li::before { content: ""; position: absolute; left: 6px; top: 4px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--line); background: var(--white); }
.sp-next li::after { content: ""; position: absolute; left: 13px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.sp-next li:last-child::after { display: none; }
.sp-next li.done::before { border-color: #1E7A4F; background: #1E7A4F; }
.sp-next span { color: var(--muted); font-size: .92rem; }

@media (max-width: 1000px) {
  .sp-layout, .sp-co-grid { grid-template-columns: 1fr; }
  .sp-side, .sp-sum { position: static; max-height: none; overflow: visible; }
  .sp-side-box > summary { display: block; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); font-weight: 700; color: var(--ink); cursor: pointer; }
  .sp-side-box[open] > summary { margin-bottom: 14px; }
  .sp-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sp-list .sp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sp-trust, .sp-co .sp-row { grid-template-columns: 1fr; }
  .sp-co .sp-line { grid-template-columns: 64px minmax(0, 1fr); }
  .sp-co .sp-line-img { width: 64px; height: 64px; }
  .sp-line-act { grid-column: 2; justify-items: start; grid-auto-flow: column; align-items: end; gap: 14px; }
  .sp-steps-bar li { font-size: 0; gap: 0; justify-content: center; }
  .sp-steps-bar li span { font-size: .8rem; }
  .sp-steps-bar li.now { font-size: .85rem; gap: 6px; }
}
