/*
 * The one stylesheet of BetaStore: plain type, one narrow column, the footer.
 *
 * Project: beta-store — partner storefront for New York Groupon experience deals (Partner Storefront API)
 * Module:  public/style.css
 * Deps:    none (served from public/ by [assets] in wrangler.toml)
 * Tested:  n/a (tests/integration/pages/public-pages.test.ts checks that every page links it)
 *
 * Key responsibilities:
 * - Type, spacing and colours of every page
 * - The listing cards, the deal page options and gallery, the cart lines, notices, total and Buy now
 *
 * Design constraints:
 * - Plain CSS: no framework, no web font, no remote url(); the CSP allows style-src 'self' only
 * - Our own colours; no Groupon colours or marks (spec §3.4)
 */

:root {
  --ink: #1d3557;
  --accent: #e76f51;
  --muted: #5c677d;
  --line: #d9dee7;
  --paper: #fbfaf7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}

main,
footer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

h1 {
  margin: 0 0 1rem;
  font-size: 1.6rem;
}

a {
  color: var(--accent);
}

.deals,
.options,
.cart-lines {
  list-style: none;
  padding-left: 0;
}

.card,
.option,
.cart-line {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
}

.card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.price,
.total {
  font-weight: 600;
}

.promo,
.option-title,
.fine-print {
  color: var(--muted);
}

.notice,
.unavailable {
  padding: 0.5rem 0.75rem;
  border-left: 4px solid var(--accent);
  background: #fff4ef;
}

form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0.5rem 0 0;
}

input[type="number"] {
  width: 4.5rem;
}

button,
.buy-now {
  padding: 0.4rem 0.9rem;
  border: 0;
  border-radius: 0.25rem;
  font: inherit;
  color: #fff;
  background: var(--ink);
  cursor: pointer;
}

.buy-now {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  background: var(--accent);
}

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}
