/* Crsp static shop: cart drawer, floating cart button, checkout and thank-you pages (tools/static/shop.css). Colours come from
   --shop-ink / --shop-accent / --shop-pale, set per site at the top of the copy shop_pages.py writes. Controls are 16px+ (no iPhone zoom). */
:root { --shop-radius: 999px; --shop-box-radius: 14px; --shop-ink: #1f1f1f; --shop-accent: #b3262d; --shop-pale: #f6f5f2; --shop-line: #e3e1dc; --shop-muted: #66645f; --shop-err: #b42318; }
.crsp-cart, .crsp-cart *, .crsp-cart-fab, .shop-page, .shop-page * { box-sizing: border-box; }

/* floating cart button */
.crsp-cart-fab { position: fixed; z-index: 99990; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px; border: 0; border-radius: var(--shop-radius); background: var(--shop-accent); color: #fff; font: 700 16px/1 inherit; font-family: inherit; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); cursor: pointer; }
.crsp-cart-fab[hidden] { display: none; }
.crsp-cart-fab span { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--shop-accent); font-size: 14px; }

/* drawer */
.crsp-cart-backdrop { position: fixed; z-index: 99991; inset: 0; background: rgba(0, 0, 0, .4); opacity: 0; transition: opacity .2s; }
.crsp-cart { position: fixed; z-index: 99992; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(420px, 100vw); background: #fff; color: var(--shop-ink); font-family: inherit; font-size: 16px; line-height: 1.5; box-shadow: -10px 0 30px rgba(0, 0, 0, .15); transform: translateX(100%); transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.crsp-cart-open .crsp-cart { transform: none; }
.crsp-cart-open .crsp-cart-backdrop { opacity: 1; }
.crsp-cart[hidden], .crsp-cart-backdrop[hidden] { display: none; }
.crsp-cart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--shop-line); }
.crsp-cart-head h2 { margin: 0; padding: 0; color: var(--shop-ink); font-size: 22px; line-height: 1.2; }
.crsp-cart-x { width: 44px; height: 44px; border: 0; background: none; color: var(--shop-ink); font-size: 30px; line-height: 1; cursor: pointer; }
.crsp-cart-added { margin: 0; padding: 0 20px; color: #1f7a4d; font-weight: 700; }
.crsp-cart-added:not(:empty) { padding-top: 10px; }
.crsp-cart-lines { flex: 1; margin: 0; padding: 8px 20px; overflow-y: auto; list-style: none; }
.crsp-cart .crsp-cart-line { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--shop-line); }
.crsp-cart-line img, .crsp-cart-noimg { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--shop-pale); }
.crsp-cart-name { display: block; color: var(--shop-ink); font-weight: 700; line-height: 1.3; text-decoration: none; }
.crsp-cart-each { display: block; color: var(--shop-muted); font-size: 14px; }
.is-out .crsp-cart-each { color: var(--shop-err); font-weight: 700; }
.crsp-cart-qty, .shop-qty { display: inline-flex; align-items: center; margin-top: 6px; border: 1px solid #c9c6bf; border-radius: var(--shop-radius); }
.crsp-cart-qty button, .shop-qty button { width: 40px; height: 40px; margin: 0; padding: 0; border: 0; background: none; color: var(--shop-ink); font-size: 20px; line-height: 1; cursor: pointer; }
.crsp-cart-qty span, .shop-qty span { min-width: 58px; padding: 0 2px; white-space: nowrap; font-weight: 700; text-align: center; }
.crsp-cart-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.crsp-cart-rm, .shop-rm { padding: 0; border: 0; background: none; color: var(--shop-muted); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.crsp-cart .crsp-cart-empty { display: block; padding: 30px 0; color: var(--shop-muted); text-align: center; }
.crsp-cart-foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--shop-line); background: var(--shop-pale); }
.crsp-cart-free { margin: 0 0 8px; color: var(--shop-muted); font-size: 14px; }
.crsp-cart-free:empty { display: none; }
.crsp-cart-total { display: flex; justify-content: space-between; margin: 0 0 12px; font-size: 18px; }
.crsp-cart-go, .shop-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; margin: 0; padding: 0 20px; border: 2px solid var(--shop-accent); border-radius: var(--shop-radius); background: var(--shop-accent); color: #fff !important; font: inherit; font-size: 17px; font-weight: 700; text-decoration: none !important; white-space: nowrap; cursor: pointer; }
.crsp-cart-go:hover, .shop-btn:hover { filter: brightness(.92); }
.crsp-cart-go.is-off { opacity: .5; pointer-events: none; }
.crsp-cart-more { display: block; width: 100%; margin-top: 8px; padding: 10px; border: 0; background: none; color: var(--shop-ink); font: inherit; font-weight: 700; cursor: pointer; }

/* checkout */
.shop-page { width: 100%; align-self: stretch; color: var(--shop-ink); font-size: 17px; line-height: 1.6; }
.shop-page p { margin: 0; padding: 0; }
.shop-page h1, .shop-page h2 { margin: 0; padding: 0; color: var(--shop-ink); line-height: 1.15; }
.shop-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.shop-head { padding: 40px 0 24px; background: var(--shop-pale); }
.shop-head h1 { font-size: clamp(30px, 4vw, 42px); }
.shop-head p { margin-top: 8px; color: var(--shop-muted); }
.shop-body { padding: 24px 0 80px; background: var(--shop-pale); }
.shop-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.shop-step { min-width: 0; margin: 0 0 20px; padding: 24px; border: 1px solid var(--shop-line); border-radius: var(--shop-box-radius); background: #fff; }
.shop-step legend { display: flex; align-items: center; gap: 12px; float: left; width: 100%; margin: 0 0 16px; padding: 0; color: var(--shop-ink); font-size: 21px; font-weight: 800; }
.shop-step legend + * { clear: both; }
.shop-n { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--shop-radius); background: var(--shop-ink); color: #fff; font-size: 15px; }
.shop-lines { margin: 0; padding: 0; list-style: none; }
.shop-page .shop-line { display: grid; grid-template-columns: 64px 1fr auto auto 32px; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--shop-line); }
.shop-line:last-child { border-bottom: 0; }
.shop-line img, .shop-noimg { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--shop-pale); }
.shop-line-name { display: block; font-weight: 700; line-height: 1.3; }
.shop-line-each { display: block; color: var(--shop-muted); font-size: 14px; }
.shop-line.is-out .shop-line-each { color: var(--shop-err); font-weight: 700; }
.shop-qty { margin: 0; }
.shop-rm { font-size: 24px; text-decoration: none; }
.shop-empty { padding: 20px 0; color: var(--shop-muted); }
.shop-choices { display: grid; gap: 10px; }
.shop-choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--shop-line); border-radius: var(--shop-box-radius); cursor: pointer; }
.shop-choice:has(input:checked) { border-color: var(--shop-ink); box-shadow: 0 0 0 1px var(--shop-ink); }
.shop-choice input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--shop-accent); }
.shop-choice strong { display: block; }
.shop-choice small { display: block; color: var(--shop-muted); font-size: 15px; }
.shop-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin-top: 16px; }
.shop-fields[hidden] { display: none; }
.shop-fields .wide, .shop-hp { grid-column: 1 / -1; }
.shop-page .form-row { margin: 0 0 14px; }
.shop-page .form-row label { display: block; margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.shop-page .input-text { display: block; width: 100% !important; min-height: 48px; margin: 0 !important; padding: 10px 12px !important; border: 1px solid #aca9a2 !important; border-radius: 8px !important; background: #fff !important; color: var(--shop-ink) !important; font: inherit !important; font-size: 17px !important; }
.shop-page textarea.input-text { min-height: 90px; resize: vertical; }
.shop-page .input-text:focus { border-color: var(--shop-ink) !important; outline: 3px solid rgba(0, 0, 0, .12); }
.shop-page .input-text[aria-invalid="true"] { border-color: var(--shop-err) !important; box-shadow: 0 0 0 1px var(--shop-err); }
.shop-page abbr.required { border: 0; color: var(--shop-err); text-decoration: none; }
.shop-field-error { display: block; margin-top: 6px; color: var(--shop-err); font-size: 15px; font-weight: 700; }
.shop-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.shop-side { position: sticky; top: 24px; }
.shop-summary { padding: 24px; border: 1px solid var(--shop-line); border-radius: var(--shop-box-radius); background: #fff; box-shadow: 0 10px 28px rgba(0, 0, 0, .06); }
.shop-summary h2 { margin-bottom: 12px; font-size: 21px; }
.shop-row { display: flex; justify-content: space-between; padding: 4px 0 !important; color: var(--shop-muted); }
.shop-total { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 0 16px !important; padding-top: 12px !important; border-top: 1px solid var(--shop-line); font-size: 18px; }
.shop-total strong { font-size: 28px; }
.shop-error { margin: 0 0 12px !important; color: var(--shop-err); font-weight: 700; }
.shop-btn[disabled] { opacity: .7; cursor: progress; }
.shop-btn-ghost { background: #fff; color: var(--shop-accent) !important; }
.shop-secure { margin-top: 12px !important; color: var(--shop-muted); font-size: 14px; text-align: center; }
.shop-thanks { padding-top: 48px; }
.shop-confirm { max-width: 620px; margin: 0 auto; }
.shop-confirm h1 { font-size: clamp(28px, 4vw, 36px); }
.shop-confirm > p { margin-top: 10px !important; }
.shop-confirm-lines { margin: 16px 0 0; padding: 10px 0 0; border-top: 1px solid var(--shop-line); list-style: none; }
.shop-page .shop-confirm-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.shop-help { color: var(--shop-muted); }
/* the theme's own cart button (WooCommerce Side Cart basket) steps aside while the drawer is open and on the checkout page */
.crsp-cart-open .xoo-wsc-basket, .crsp-on-checkout .xoo-wsc-basket { display: none !important; }
.crsp-cart-open { overflow: hidden; }
@media (max-width: 960px) {
  .shop-grid { grid-template-columns: 1fr; }
  .shop-side { position: static; }
}
@media (max-width: 600px) {
  .shop-wrap { padding: 0 16px; }
  .shop-step { padding: 18px 14px; }
  .shop-fields { grid-template-columns: 1fr; }
  .shop-page .shop-line { grid-template-columns: 56px 1fr auto; }
  .shop-line img, .shop-noimg { width: 56px; height: 56px; }
  .shop-line .shop-qty { grid-column: 2; }
  .shop-line .shop-line-amt { grid-column: 3; grid-row: 1; }
  .shop-rm { grid-column: 3; grid-row: 2; justify-self: end; }
  .crsp-cart-fab { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
}

/* quantity steppers on product forms (shop.js swaps them in for the theme's small number box): big enough for a thumb */
.crsp-qty { display: block; }
.crsp-step { display: inline-flex; align-items: stretch; justify-content: space-between; min-height: 44px; border: 1px solid #c9c6bf; border-radius: var(--shop-radius); background: #fff; box-sizing: border-box; }
.crsp-step button { flex: 0 0 44px; width: 44px; min-height: 44px; margin: 0; padding: 0; border: 0; background: none; color: var(--shop-ink); font-size: 22px; line-height: 1; cursor: pointer; }
.crsp-step button:hover { background: var(--shop-pale); }
.crsp-step output { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-width: 64px; padding: 0 4px; color: var(--shop-ink); font-size: 16px; font-weight: 700; white-space: nowrap; }
.crsp-unit { font-size: inherit; }

/* "Added" toast */
.crsp-toast { position: fixed; z-index: 99995; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 14px; max-width: min(520px, calc(100vw - 24px)); padding: 12px 12px 12px 18px; border-radius: var(--shop-box-radius); background: var(--shop-ink); color: #fff; font-size: 15px; line-height: 1.35; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); transform: translate(-50%, 160%); opacity: 0; transition: transform .22s ease, opacity .22s ease; box-sizing: border-box; }
.crsp-toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.crsp-toast span { flex: 1 1 auto; }
.crsp-toast button { flex: 0 0 auto; min-height: 40px; margin: 0; padding: 0 14px; border: 0; border-radius: var(--shop-radius); background: #fff; color: var(--shop-ink); font: 700 15px/1 inherit; font-family: inherit; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .crsp-toast { transition: none; } }
@media (max-width: 600px) { .crsp-toast { left: 12px; right: 12px; max-width: none; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateY(160%); } .crsp-toast.is-on { transform: none; } }
