/* MiMi Pic — layout.css: page skeleton, header/footer, grid.
 *
 * The design language is Glass Liquid, ported from the brand's OWN store look demo
 * (shared/workspace-apps/design/design-systems/mimipic/store-demo.html — Brand &
 * Positioning, CC #9047, iterated with Ivan through round 3). It is not invented here
 * and it is not a theme clone: it is the house language, applied to the real storefront.
 *
 * Structure is brand-agnostic; every colour comes from tokens.css.
 *
 * THE ONE HARD PERFORMANCE RULE (frontend design-system §"never backdrop-filter on
 * container-level cards"): backdrop-filter is used ONLY on floating chrome — the top
 * bar. Product cards are SOLID white with a glass LOOK, so a grid of tens of thousands
 * of products still scrolls smoothly. Do not "improve" a card by making it real glass.
 */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--mp-font-body);
  color: var(--mp-ink);
  /* The sage bloom sits UNDER the floating glass so the glass has something to refract. */
  background: var(--mp-page-bloom), var(--mp-surface);
  background-attachment: fixed, scroll;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--mp-font-display);
  color: var(--mp-sage-deep);
  font-weight: 600;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--mp-font-body); cursor: pointer; }

.wrap {
  max-width: var(--mp-maxw);
  margin: 0 auto;
  padding: 0 1rem;
}

/* ── Floating glass top bar ───────────────────────────────────────────────────
 * REAL Glass Liquid: this is the one surface that gets backdrop-filter. It floats
 * clear of the page edge (top: 10px) rather than sitting flush — that gap is what
 * makes it read as glass rather than as a header. */
.site-header {
  position: sticky;
  top: 10px;
  z-index: 40;
  max-width: var(--mp-maxw);
  margin: 10px auto 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--mp-glass-bg);
  backdrop-filter: var(--mp-glass-blur);
  -webkit-backdrop-filter: var(--mp-glass-blur);
  border-radius: var(--mp-glass-radius);
  border: none;
  box-shadow: var(--mp-glass-shadow);
}

.site-header .brand {
  font-family: var(--mp-font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--mp-sage-deep);
  letter-spacing: .2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.site-header .brand img { height: 26px; width: auto; display: block; }
.site-header .brand .dot { color: var(--mp-wood); }

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}
.site-nav a {
  padding: 7px 13px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--mp-sage-deep);
  background: rgba(255, 255, 255, .35);
  white-space: nowrap;
}
.site-nav a:hover { background: rgba(255, 255, 255, .6); }

main { padding-bottom: 3rem; }
section { margin: 2rem 0; }

/* ── Product grid ─────────────────────────────────────────────────────────────*/
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ── Footer ───────────────────────────────────────────────────────────────────*/
.site-footer {
  margin-top: 3rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid rgba(91, 111, 98, .12);
  color: var(--mp-muted);
  font-size: .84rem;
}
.site-footer .legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.1rem;
  margin-bottom: .6rem;
}
.site-footer .legal-links a {
  color: var(--mp-sage-deep);
  font-weight: 600;
}
.site-footer .legal-links a:hover { text-decoration: underline; }

/* ── Legal pages ──────────────────────────────────────────────────────────────
 * Long-form legal prose. Constrained measure, because a Widerrufsbelehrung set at
 * full page width is technically published and practically unreadable. */
.legal-page { padding-top: 1.5rem; }
.legal-page h1 { font-size: 1.9rem; margin-bottom: 1rem; }
.legal-body { max-width: 68ch; color: #3a403a; }
.legal-body h2, .legal-body h3 {
  font-size: 1.05rem;
  margin: 1.6rem 0 .5rem;
  color: var(--mp-sage-deep);
}
.legal-body p, .legal-body li { font-size: .95rem; line-height: 1.65; }
.legal-body a { color: var(--mp-sage); text-decoration: underline; }
.legal-body table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.legal-body td, .legal-body th {
  border: 1px solid rgba(91, 111, 98, .18);
  padding: .5rem .6rem;
  text-align: left;
  font-size: .9rem;
}
.legal-note { color: var(--mp-muted); font-size: .85rem; }
.legal-source { color: var(--mp-muted); font-size: .78rem; margin-top: 2rem; }
