/* Demo store pages (signin / catalogue / checkout). Builds on styles.css tokens. */

.cart-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  margin-left: 0.3rem;
  border-radius: 999px;
  background: var(--sand);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
}

.store-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 7rem clamp(1rem, 4vw, 2.5rem) 4rem;
}

.store-page.narrow {
  max-width: 28rem;
}

.store-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-top: 0.35rem;
}

.store-hero p.lede-sm {
  margin-top: 0.75rem;
  color: var(--sand-dim);
  max-width: 60ch;
}

.notice {
  margin: 1.5rem 0 2rem;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--line-strong);
  color: var(--sand-dim);
  font-size: 0.88rem;
}

.mcp-banner {
  margin: 0 0 2rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-strong);
  background: var(--ink-2);
  font-size: 0.92rem;
  color: var(--sand-dim);
}

.mcp-banner code {
  color: var(--sand);
  word-break: break-all;
}

/* Forms */
.form {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--sand-dim);
}

.field input,
.qty,
.device {
  font: inherit;
  color: var(--sand);
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 0.7rem 0.8rem;
}

.field input:focus,
.qty:focus,
.device:focus,
.btn:focus-visible,
.chip:focus-visible,
.link-btn:focus-visible {
  outline: 2px solid var(--sand);
  outline-offset: 2px;
}

.form .btn {
  justify-content: center;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.form-error {
  color: #f0a58f;
  font-size: 0.9rem;
}

.hint {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--sand-dim);
}

.hint code {
  color: var(--sand);
}

/* Catalogue */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.chip {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--sand-dim);
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  background: var(--sand);
  color: var(--ink);
  border-color: var(--sand);
}

.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1rem;
}

.product {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  background: var(--ink-2);
}

.product h2 {
  font-size: 1.4rem;
}

.product-cat {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sand-dim);
}

.product-summary {
  color: var(--sand);
}

.product-details {
  color: var(--sand-dim);
  font-size: 0.9rem;
  flex: 1;
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.product-price span {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--sand-dim);
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.product-actions .btn {
  border: 0;
  cursor: pointer;
  font-family: inherit;
  padding: 0.65rem 1rem;
}

.btn-outline {
  background: transparent;
  color: var(--sand);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.btn-outline:hover {
  box-shadow: inset 0 0 0 1px var(--sand);
}

.qty-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--sand-dim);
}

.qty {
  width: 4.2rem;
  padding: 0.5rem;
}

.added {
  min-height: 1.2em;
  font-size: 0.85rem;
  color: var(--sand-dim);
}

/* Checkout */
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

@media (max-width: 820px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }
  .nav-actions {
    gap: 0.9rem;
  }
  .nav-actions .hide-sm {
    display: none;
  }
}

.table-wrap {
  overflow-x: auto;
}

.lines {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.lines th,
.lines td {
  text-align: left;
  padding: 0.8rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.lines th {
  font-weight: 500;
  color: var(--sand-dim);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lines .num {
  text-align: right;
  white-space: nowrap;
}

.muted {
  color: var(--sand-dim);
  font-size: 0.85rem;
}

.totals {
  display: grid;
  gap: 0.4rem;
  margin-top: 1rem;
}

.totals div {
  display: flex;
  justify-content: space-between;
  color: var(--sand-dim);
}

.totals .grand {
  color: var(--sand);
  font-size: 1.15rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line-strong);
}

.link-btn {
  font: inherit;
  font-size: 0.85rem;
  background: none;
  border: 0;
  color: var(--sand-dim);
  text-decoration: underline;
  cursor: pointer;
}

.box {
  padding: 1.4rem;
  border: 1px solid var(--line);
  background: var(--ink-2);
}

.box h2 {
  font-size: 1.4rem;
}

.box .form {
  margin-top: 1rem;
}

.done h2 {
  font-size: 1.8rem;
}

.done p {
  margin-top: 0.75rem;
  color: var(--sand-dim);
}

.done strong {
  color: var(--sand);
}

.done .cta-row {
  margin-top: 1.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand-dim);
}

[hidden] {
  display: none !important;
}

/* Product swatch + device picker */
.product-swatch {
  display: grid;
  place-items: center;
  height: 150px;
  margin: -1.4rem -1.4rem 0.4rem;
  background: radial-gradient(circle at 50% 40%, var(--ink-3), var(--ink-2));
  border-bottom: 1px solid var(--line);
}

.product-phone {
  width: 62px;
  height: 120px;
  border-radius: 14px;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 10px 24px rgba(0, 0, 0, 0.45);
  position: relative;
}

.product-phone::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 9px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
}

.device-label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--sand-dim);
}

.device {
  padding: 0.55rem 0.6rem;
}

.device-fixed {
  font-size: 0.85rem;
  color: var(--sand-dim);
}
