/* Shop pages (newellabs/shop/build_shop.py), loaded after site.css: only what the shop adds. Mobile first; nothing here
   may make a page wider than a 320 px phone (tests/livecheck.sh checks 320 and 390). */
.shop-head { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .shop-head { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: 44px; } }
.shop-head h1 { overflow-wrap: anywhere; }

/* The "Made by AI" note: on every product page before the price, and on the shop's index. */
.ai-note { margin: 18px 0 0; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brass-bright); border-radius: 10px; max-width: 680px; }
.page-head .ai-note p, .ai-note p { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--ink-2); max-width: none; }
.page-head .ai-note .ai-h, .ai-note .ai-h { font: 700 0.75rem/1.2 var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass); margin: 0 0 6px; }

/* Price and the Buy button */
.buy { margin-top: 18px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; max-width: 680px; }
.page-head .buy .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 14px; }
.buy .price b { font: 700 2.1rem/1 var(--font-serif); color: var(--ink); }
.buy .price span { font-size: 0.9rem; color: var(--muted); }
.buy .btn { width: 100%; font-size: 1rem; }
@media (min-width: 520px) { .buy .btn { width: auto; min-width: 230px; } }
.btn.is-off, .btn.is-off:hover { background: var(--well); border-color: var(--line); color: var(--muted); cursor: default; }
.page-head .buy-note { margin: 12px 0 0; font-size: 0.85rem; line-height: 1.5; color: var(--muted); }

/* Pictures of real pages */
.shop-cover { margin: 0; }
.shop-cover img, .gallery img { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(22, 34, 59, 0.08); }
.shop-cover figcaption, .gallery figcaption { margin-top: 8px; font-size: 0.85rem; line-height: 1.4; color: var(--muted); }
.shop-cover a, .gallery a { display: block; border-radius: 8px; }
.gallery { display: grid; gap: 24px 18px; align-items: start; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.gallery.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.gallery figure { margin: 0; }

/* What you get: one row per file. Long file names wrap anywhere so a 320 px phone never scrolls sideways. */
.prose ul.files { list-style: none; padding: 0; margin: 0 0 1.4em; border-top: 1px solid var(--line); }
.prose ul.files li { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); }
.files .f-title { display: block; font-weight: 600; color: var(--ink); }
.files .f-note { display: block; color: var(--ink-2); }
.files .f-name { display: block; margin-top: 2px; font: 400 0.82rem/1.45 var(--font-mono); color: var(--muted); overflow-wrap: anywhere; }
.shop-body h2:first-child { margin-top: 0; }
.prose li a { overflow-wrap: anywhere; }

/* Licences on a single copy's page (build_shop.licences_section): one block per licence, its own price and Buy button. */
.licence { margin-top: 1.6em; padding-top: 1.2em; border-top: 1px solid var(--line); }
.prose .licence h3 { margin-top: 0; }
.licence .buy .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 14px; }
.licence .buy .btn { text-decoration: none; }
.licence-page { margin: 0 0 4px; max-width: 240px; }
.licence-page img { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.licence-page a { display: block; border-radius: 8px; }
.licence-page figcaption { margin-top: 8px; font-size: 0.85rem; line-height: 1.4; color: var(--muted); }
.shop-more { margin-top: 18px; }
