/* T224-T228 shopper pages. Builds on styles.css tokens (--ink, --line, --accent, ...). */
body.shop-page { background: var(--paper); color: var(--ink); }
.shop-page .shell { padding-left: 16px; padding-right: 16px; }
.shop-topbar { justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.shop-topbar .brand { margin: 0; }
.shop-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.shop-nav a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 9px; color: var(--ink); font-weight: 700; text-decoration: none; }
.shop-nav a.active { background: var(--dark); color: #fff; }
.shop-badge { min-width: 20px; padding: 1px 6px; border-radius: 10px; background: var(--accent); color: var(--accent-dark); font-size: 12px; text-align: center; }

.shop-section { max-width: 920px; margin: 24px auto; }
.shop-section h1 { font-size: clamp(26px, 5vw, 40px); margin: 0 0 12px; }
.shop-section h2 { font-size: 20px; margin: 24px 0 10px; }
.shop-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.shop-search input, .shop-form input, .shop-form textarea, .shop-form select, .shop-chat-form textarea {
  width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; background: #fff; box-sizing: border-box;
}
.shop-tabs { display: flex; gap: 6px; margin: 12px 0; flex-wrap: wrap; }
.shop-tabs button { min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 20px; background: #fff; font-weight: 700; cursor: pointer; }
.shop-tabs button[aria-pressed="true"] { background: var(--dark); color: #fff; border-color: var(--dark); }
.shop-location { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.shop-card { display: grid; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.shop-card h3 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.shop-card a { color: var(--ink); }
.shop-meta { color: var(--muted); font-size: 13px; }
.shop-price { font-size: 18px; font-weight: 800; }
.shop-stock-in { color: var(--accent-dark); font-weight: 700; font-size: 13px; }
.shop-stock-out { color: var(--warning); font-weight: 700; font-size: 13px; }
.shop-card .shop-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.shop-empty { padding: 24px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }

.shop-cart-store { margin-bottom: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.shop-cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.shop-cart-line:first-of-type { border-top: 0; }
.shop-qty { display: inline-flex; align-items: center; gap: 4px; }
.shop-qty button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 800; cursor: pointer; }
.shop-total { display: flex; justify-content: space-between; font-weight: 800; padding-top: 10px; }

.shop-thread { display: grid; gap: 8px; margin: 12px 0; }
.shop-bubble { max-width: 80%; padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); overflow-wrap: anywhere; white-space: pre-wrap; }
.shop-bubble.mine { justify-self: end; background: var(--dark); color: #fff; border-color: var(--dark); }
.shop-bubble small { display: block; margin-top: 4px; opacity: .7; font-size: 11px; }
.shop-chat-form, .shop-form { display: grid; gap: 10px; }
.shop-form label { display: grid; gap: 6px; font-weight: 700; }
.shop-panel { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; margin-top: 16px; }
.shop-suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
.shop-suggestions button { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 18px; background: #fff; cursor: pointer; }

@media (max-width: 560px) {
  .shop-nav { width: 100%; justify-content: space-between; }
  .shop-nav a { padding: 0 8px; }
  .shop-search { grid-template-columns: 1fr; }
  .shop-cart-line { grid-template-columns: minmax(0, 1fr) auto; }
  .shop-bubble { max-width: 92%; }
}

/* T232: the front page's two demos, and the badges that label each demo. */
.entry-home.entry-home-wide { max-width: 920px; }
.entry-lead { color: var(--muted); font-size: 17px; margin: 8px auto 0; max-width: 560px; }
.demo-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 28px 0 8px; text-align: left; }
.demo-choice-card { display: grid; align-content: start; gap: 10px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.demo-choice-card h2 { margin: 4px 0 0; font-size: 24px; }
.demo-choice-card p { margin: 0; color: var(--muted); }
.demo-choice-card .button { display: flex; align-items: center; justify-content: center; min-height: 50px; margin-top: 6px; }
.demo-choice-merchant { border-top: 5px solid var(--dark); }
.demo-choice-shopper { border-top: 5px solid var(--accent); }
.demo-badge { justify-self: start; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.demo-badge-merchant { background: var(--dark); color: #fff; }
.demo-badge-shopper { background: var(--accent); color: var(--accent-dark); }
.demo-choice-tip { font-size: 14px; }
.shop-demo-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--accent); color: var(--accent-dark); font-weight: 700; }
.shop-demo-bar a { color: var(--accent-dark); }
@media (max-width: 640px) {
  .demo-choice { grid-template-columns: 1fr; }
}

/* T236: Shop | Sell switch under the header on both pages. The front page has its own two cards. */
.mode-switch { display: flex; justify-content: center; gap: 0; margin: 10px auto 0; padding: 3px; width: max-content;
  border: 1px solid var(--line); border-radius: 22px; background: var(--card); }
.mode-switch button { min-width: 96px; min-height: 36px; padding: 0 18px; border: 0; border-radius: 18px;
  background: transparent; color: var(--ink); font-weight: 800; cursor: pointer; }
.mode-switch button[aria-pressed="true"][data-mode-switch="sell"] { background: var(--dark); color: #fff; }
.mode-switch button[aria-pressed="true"][data-mode-switch="shop"] { background: var(--accent); color: var(--accent-dark); }
body.entry-route .mode-switch { display: none; }
