/* Online store (online-store.md), laid out like the Square Online store it replaces. Colours from tokens.css only. */

/* ---- Frame: StoreLayout -------------------------------------------------- */

.store-page { background: var(--store-bg); color: var(--text); font-family: var(--store-font); min-height: 100vh; display: flex; flex-direction: column; }
.smain { flex: 1; }
.store-page h1, .store-page h2, .store-page h3 { font-family: var(--store-font); }

.shead { background: var(--paper); border-bottom: 1px solid var(--ink-100); }
.shead__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.shead__brand img { display: block; width: min(300px, 62vw); height: auto; }
.shead__actions { display: flex; align-items: center; gap: 18px; }
.shead__phone { color: var(--store-heading); font-weight: 600; text-decoration: none; white-space: nowrap; }
.shead__phone:hover { text-decoration: underline; }
.shead__cart { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; color: var(--ink-900); border-radius: 50%; }
.shead__cart:hover { background: var(--store-bg); }
.shead__count {
  position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--store-green); color: #fff; font-size: .75rem; font-weight: 700; line-height: 20px; text-align: center;
}
@media (max-width: 640px) {
  .shead__phone { display: none; }
  /* The logo gets a row of its own: squeezed beside the buttons it shrank to 10px tall (QA 2026-10-31 #11). */
  .shead__inner { gap: 6px 10px; justify-content: center; }
  .shead__brand { flex: 1 0 100%; display: flex; justify-content: center; }
  .shead__brand img { width: min(260px, 72vw); }
  .shead__actions { gap: 4px; }
  .shead .spill { padding: 6px 12px; font-size: .8rem; min-height: 36px; }
  .spill__extra { display: none; }
}

/* The pill button: "Back to Main Website", "Shop All", "Add to Cart". */
.spill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 18px;
  border: 0; border-radius: 100px; background: var(--store-green); color: #fff; font: 600 .9rem/1.2 var(--store-font);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.spill:hover, .spill:focus-visible { background: var(--store-green-hover); color: #fff; }
.spill--lg { min-height: 52px; padding: 12px 30px; font-size: 1rem; }

.sfoot { background: var(--paper); border-top: 1px solid var(--ink-100); padding: 36px 0 28px; margin-top: 56px; font-size: .9rem; }
.sfoot img { width: min(300px, 70vw); height: auto; }
.sfoot__links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 18px 0 22px; }
.sfoot__links a { color: var(--ink-700); text-decoration: none; }
.sfoot__links a:hover { color: var(--store-heading); text-decoration: underline; }
.sfoot__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid var(--ink-100); padding-top: 18px; color: var(--text-muted); }
.sfoot__base p { margin: 0; }
.sfoot__base a { color: inherit; }

/* ---- Page body: StoreShell ------------------------------------------------- */

.sbody { padding-top: 32px; }
.stitle { color: var(--store-heading); font-weight: 600; font-size: clamp(1.5rem, 3vw, 1.75rem); margin: 0 0 24px; }
.stitle--sub { margin-top: 56px; }

.scrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 24px; font-size: .9rem; }
.scrumbs li + li::before { content: ">"; margin-right: 6px; color: var(--text-muted); }
.scrumbs a { color: var(--ink-900); text-decoration: none; }
.scrumbs a:hover { text-decoration: underline; }
.scrumbs [aria-current] { color: var(--text-muted); }

/* Sidebar ("Browse by category") beside the product grid; chips above it on phones. */
.scols { display: grid; gap: 24px; }
@media (min-width: 860px) { .scols { grid-template-columns: 200px minmax(0, 1fr); gap: 48px; } }
.sside__title { font-size: .9rem; color: var(--ink-700); margin: 0 0 6px; }
.sside ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.sside a { color: var(--ink-700); text-decoration: none; font-size: .95rem; }
.sside a:hover { color: var(--store-heading); text-decoration: underline; }
.sside a[aria-current="page"] { color: var(--store-heading); font-weight: 700; }
@media (max-width: 859px) {
  .sside ul { display: flex; flex-wrap: wrap; gap: 8px; }
  .sside a { display: inline-block; padding: 6px 14px; border: 1px solid var(--ink-200); border-radius: 100px; background: var(--paper); }
  .sside a[aria-current="page"] { border-color: var(--store-green); }
}

/* ---- Home ------------------------------------------------------------------ */

.shero {
  background: linear-gradient(rgba(0, 0, 0, .35), rgba(0, 0, 0, .35)), url("/media/store/store-hero.jpg") center / cover no-repeat, var(--green-800);
  color: #fff;
}
.shero__inner { min-height: clamp(300px, 42vw, 480px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px; }
.shero__kicker { margin: 0; font-weight: 600; font-size: .95rem; }
.shero__title { color: #fff; font-weight: 600; font-size: clamp(1.8rem, 4.5vw, 2.6rem); line-height: 1.15; margin: 0 0 10px; max-width: 16ch; }

.stiles { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); padding-top: 24px; }
.stile { display: grid; gap: 14px; text-decoration: none; text-align: center; }
.stile__img { display: block; background: var(--paper); border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 2; }
.stile__img img { width: 100%; height: 100%; object-fit: contain; transition: transform .2s ease; }
.stile:hover .stile__img img { transform: scale(1.03); }
.stile__name { color: var(--store-heading); font-weight: 600; }
.stile:hover .stile__name { text-decoration: underline; }

/* ---- Product grid ---------------------------------------------------------- */

.sgrid { display: grid; gap: 28px 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
@media (max-width: 480px) { .sgrid { grid-template-columns: 1fr 1fr; gap: 20px 14px; } }
.sitem { display: grid; align-content: start; gap: 6px; text-decoration: none; color: var(--ink-900); }
.sitem__img { display: block; aspect-ratio: 1; background: var(--paper); border-radius: 10px; overflow: hidden; margin-bottom: 6px; }
.sitem__img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; transition: transform .2s ease; }
.sitem:hover .sitem__img img { transform: scale(1.04); }
.sitem__name { font-size: .95rem; line-height: 1.35; }
.sitem:hover .sitem__name { text-decoration: underline; }
.sitem__price { font-size: .9rem; color: var(--ink-700); }
.sitem__none { display: grid; place-items: center; width: 100%; height: 100%; color: var(--store-green); font-weight: 700; letter-spacing: .04em; }

/* ---- Product page ---------------------------------------------------------- */

.product { display: grid; gap: 32px; align-items: start; }
@media (min-width: 860px) { .product { grid-template-columns: 1.1fr 1fr; gap: 48px; } }
.product__media { background: var(--paper); border-radius: 12px; padding: 24px; display: grid; place-items: center; }
.product__media img { width: 100%; height: auto; object-fit: contain; max-height: 520px; }
.product__media .card__img--none { display: grid; place-items: center; aspect-ratio: 1; width: 100%; color: var(--store-green); font-weight: 700; }
.product__name { color: var(--store-heading); font-weight: 600; font-size: clamp(1.5rem, 3vw, 1.75rem); line-height: 1.2; margin: 0 0 8px; }
.product__price { font-size: 1.1rem; color: var(--ink-900); margin: 0 0 8px; }
.product__form { display: grid; gap: 18px; margin-top: 16px; justify-items: start; }
.product__add { min-width: 220px; }
.product__label { font-size: .9rem; font-weight: 700; margin: 28px 0 6px; }
.product__desc { color: var(--ink-700); font-size: .95rem; margin: 0; }
.product__ship { color: var(--text-muted); font-size: .9rem; margin-top: 18px; }

.options { border: 0; padding: 0; margin: 0; }
.options legend { font-weight: 700; margin-bottom: 10px; }
.options { display: flex; flex-wrap: wrap; gap: 10px; }
.options legend { flex-basis: 100%; }
.options__choice {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 16px;
  border: 2px solid var(--border); border-radius: 999px; cursor: pointer; font-weight: 700;
}
.options__choice:has(input:checked) { border-color: var(--store-green); background: var(--paper); color: var(--store-heading); }
.options__choice input { accent-color: var(--store-green); width: 18px; height: 18px; }
.options__price { color: var(--text-muted); font-weight: 400; }

.qty { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; }
.qty input, .cart__qty input {
  width: 84px; min-height: 48px; padding: 8px 10px; font: inherit; font-weight: 700;
  border: 2px solid var(--border); border-radius: var(--radius);
}
.form-error { color: var(--overdue, #b3261e); font-weight: 700; margin: 0; }

/* Cart */
.cart__alert { border: 2px solid var(--orange-600); background: var(--orange-100); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; }
.cart__alert p { margin: 0; }
.cart__added { background: var(--paper); color: var(--store-heading); border-radius: var(--radius); padding: 12px 16px; font-weight: 700; }
.cart__table { width: 100%; border-collapse: collapse; margin-bottom: 28px; }
.cart__table th, .cart__table td { padding: 14px 10px; border-bottom: 1px solid var(--ink-100); text-align: left; vertical-align: middle; }
.cart__table thead th { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.cart__table tbody th { font-weight: 700; }
.cart__option { display: block; font-weight: 400; color: var(--text-muted); }
.cart__qty { display: flex; gap: 8px; align-items: center; }
.btn--sm { min-height: 40px; padding: 8px 14px; font-size: .9rem; }
.cart__remove { background: none; border: 0; color: var(--text-muted); text-decoration: underline; cursor: pointer; font: inherit; padding: 8px; }
.cart__remove:hover { color: var(--text); }
.cart__summary { display: grid; justify-items: end; gap: 10px; text-align: right; }
.cart__subtotal { font-size: 1.3rem; margin: 0; }
.cart__shipping, .cart__secure { color: var(--text-muted); margin: 0; }

@media (max-width: 700px) {
  .cart__table thead { display: none; }
  .cart__table, .cart__table tbody, .cart__table tr, .cart__table th, .cart__table td { display: block; }
  .cart__table tr { border-bottom: 1px solid var(--border); padding: 10px 0; }
  .cart__table th, .cart__table td { border: 0; padding: 6px 0; }
  .cart__table td[data-label]::before { content: attr(data-label) ": "; font-weight: 700; color: var(--text-muted); }
  .cart__summary { justify-items: stretch; text-align: left; }
}

/* ST-3c: a question the product asks ("Size"), as a dropdown like the Square store's. */
.choice { display: grid; gap: 6px; width: 100%; max-width: 420px; }
.choice label { font-weight: 700; font-size: .95rem; }
.choice select {
  min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink-900);
  border: 2px solid var(--border); border-radius: var(--radius); background: var(--paper);
}
.choice select:focus-visible { outline: 3px solid var(--store-green); outline-offset: 2px; }

/* ---- Checkout: CheckoutPage (ST-5b), laid out like the Square Online checkout ---- */

.ck { padding-bottom: 24px; }
.ck__back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-900); font-weight: 600; text-decoration: none; margin-bottom: 8px; }
.ck__back:hover { text-decoration: underline; }
.ck__title { font-size: 2rem; margin: 0 0 24px; color: var(--ink-900); }
.ck__cols { display: grid; gap: 32px; }
@media (min-width: 900px) { .ck__cols { grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: start; } }

.ck__form { display: grid; gap: 20px; min-width: 0; }
.ck__section, .ck__express, .ck__summary { background: var(--paper); border: 1px solid var(--ink-100); border-radius: 8px; padding: 20px; }
.ck__section h2, .ck__summary h2 { font-size: 1.2rem; margin: 0 0 14px; color: var(--ink-900); }
.ck__express-title { font-weight: 600; margin: 0 0 12px; }
#google-pay-button { min-height: 48px; }
.ck__or { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; color: var(--text-muted); font-size: .9rem; }
.ck__or::before, .ck__or::after { content: ""; flex: 1; border-top: 1px solid var(--ink-100); }

.ck__row { display: grid; gap: 0 14px; }
@media (min-width: 560px) { .ck__row { grid-template-columns: 1fr 1fr; } .ck__row--3 { grid-template-columns: 1.4fr 1fr .8fr; } }
.ck__field { display: grid; gap: 6px; margin-bottom: 14px; }
.ck__field label { font-weight: 600; font-size: .9rem; }
.ck__opt { font-weight: 400; color: var(--text-muted); }
.ck__field input, .ck__field select {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink-900);
  border: 1px solid var(--border); border-radius: 6px; background: var(--paper); box-sizing: border-box;
}
.ck__field select:disabled { background: var(--store-bg); color: var(--ink-900); opacity: 1; }
.ck__field input:focus-visible, .ck__field select:focus-visible { outline: 2px solid var(--store-green); outline-offset: 1px; border-color: var(--store-green); }
.ck__field input:user-invalid, .ck__field select:user-invalid { border-color: var(--orange-700); }
.ck__phone { display: flex; }
.ck__prefix { display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--border); border-right: 0; border-radius: 6px 0 0 6px; background: var(--store-bg); white-space: nowrap; font-size: .95rem; }
.ck__phone input { border-radius: 0 6px 6px 0; }
.ck__fine { font-size: .85rem; color: var(--text-muted); margin: 0; }
.ck__secure { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }

.ck__method { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 2px solid var(--store-green); border-radius: 6px; background: var(--store-bg); }
.ck__card { border: 2px solid var(--store-green); border-radius: 6px; padding: 14px 16px; }
.ck__card-title { font-weight: 600; margin: 0 0 10px; }
.ck__card-frame { min-height: 89px; margin-bottom: 8px; }

.ck__status { border: 2px solid var(--orange-600); background: var(--orange-100); border-radius: 6px; padding: 14px 18px; font-weight: 600; }
.ck__place {
  display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 56px; padding: 0 22px;
  border: 0; border-radius: 6px; background: var(--accent); color: #fff; font: 700 1.1rem/1 var(--store-font); cursor: pointer;
}
.ck__place:hover:not(:disabled) { background: var(--accent-hover); }
.ck__place:disabled { opacity: .6; cursor: default; }
.ck__place.is-busy { opacity: .8; cursor: progress; }
.ck__terms { text-align: center; }

.ck__summary { order: -1; }
@media (min-width: 900px) { .ck__summary { order: 0; position: sticky; top: 20px; } }
.ck__summary details > summary { list-style: none; cursor: pointer; }
.ck__summary details > summary::-webkit-details-marker { display: none; }
.ck__summary details > summary h2 { display: flex; justify-content: space-between; align-items: center; }
.ck__summary details > summary h2::after { content: "▾"; font-size: .9rem; color: var(--text-muted); }
.ck__summary details:not([open]) > summary h2::after { content: "▸"; }
.ck__lines { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.ck__lines li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; }
.ck__qty { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; background: var(--store-bg); font-weight: 700; font-size: .85rem; }
.ck__line-name { font-weight: 600; }
.ck__line-total { white-space: nowrap; }
.ck__totals { margin: 0; padding-top: 14px; border-top: 1px solid var(--ink-100); display: grid; gap: 8px; }
.ck__totals div { display: flex; justify-content: space-between; gap: 12px; }
.ck__totals dt, .ck__totals dd { margin: 0; }
.ck__grand { border-top: 1px dashed var(--border); padding-top: 12px; margin-top: 4px; font-weight: 700; font-size: 1.15rem; }
.ck__powered { text-align: center; margin-top: 16px; }

.ck-done { max-width: 640px; }
.ck-done__number { font-size: 1.3rem; margin: 0 0 8px; }
.ck__error { margin: 0; font-size: .85rem; font-weight: 600; color: var(--orange-700); }

/* ---- Customer accounts (ST-5c) ------------------------------------------- */

.shead__account { color: var(--ink-900); font-weight: 600; text-decoration: none; white-space: nowrap; }
.shead__account:hover { text-decoration: underline; }
@media (max-width: 560px) { .shead__phone { display: none; } }
.ck__account { margin: -6px 0 14px; font-size: .95rem; }
.ck__check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-weight: 600; cursor: pointer; }
.ck__check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--store-green); }
.ck__check-note { margin: 4px 0 0 30px; }
.ck__dialog { border: 0; border-radius: 10px; padding: 24px; width: min(420px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgb(0 0 0 / .25); }
.ck__dialog::backdrop { background: rgb(0 0 0 / .45); }
.ck__dialog h2 { margin: 0 0 8px; font-size: 1.3rem; }
.ck__dialog input { font-size: 1.4rem; letter-spacing: .3em; text-align: center; }
.ck__dialog-actions { display: grid; gap: 10px; margin-top: 12px; }

.acct { display: grid; gap: 18px; }
.acct--narrow { max-width: 480px; }
.acct__lead { font-size: 1.05rem; }
.acct__form { display: grid; gap: 8px; margin-bottom: 12px; }
.acct__who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0; }
.acct__signout { display: inline; }
.acct__shop { margin-left: auto; }
.acct__cols { display: grid; gap: 24px; }
@media (min-width: 900px) { .acct__cols { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.acct__orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.acct__orders > li { border-top: 1px solid var(--ink-100); padding-top: 12px; }
.acct__order-head { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.acct__order-head strong:last-child { margin-left: auto; }
.acct__order-lines { margin: 6px 0 0; padding-left: 18px; color: var(--text-muted); font-size: .92rem; }
.badge-status { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 10px; background: var(--store-bg); color: var(--store-heading); }
.badge-status--shipped { background: var(--store-green); color: #fff; }

/* ---- Product photos in the cart and the checkout summary ---- */

.cart__item { display: flex; gap: 14px; align-items: center; }
.cart__thumb { flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 6px; background: var(--paper); border: 1px solid var(--ink-100); overflow: hidden; }
.cart__thumb img { width: 100%; height: 100%; object-fit: contain; }
.cart__item-text { min-width: 0; }
.ck__thumb { position: relative; flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 6px; background: var(--paper); border: 1px solid var(--ink-100); }
.ck__thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.ck__thumb .ck__qty { position: absolute; top: -8px; right: -8px; background: var(--ink-700); color: #fff; }
.ck__lines li { align-items: center; }

/* ---- Product descriptions laid out from their lines (DescriptionFormat) ---- */
.product__desc p { margin: 0 0 10px; }
.product__desc-head { font-size: .95rem; font-weight: 700; color: var(--ink-900); margin: 16px 0 6px; }
.product__desc ul { margin: 0 0 10px; padding-left: 20px; }
.product__desc li { margin-bottom: 8px; }
