/* ==================================================================
   Dalrose - main stylesheet
   Written "mobile first": the basic rules are for phones, and the
   @media sections further down adjust things for bigger screens.
   ================================================================== */

/* ---- Colours and fonts, in one place so they are easy to change ---- */
:root {
  --cream: #faf6f1;        /* page background */
  --paper: #ffffff;        /* cards */
  --ink: #2f2a26;          /* main text - warm near-black */
  --ink-soft: #5e554e;     /* secondary text (still passes contrast checks) */
  --rose: #9c4a57;         /* accent: links, buttons */
  --rose-dark: #7d3844;    /* accent when hovered */
  --blush: #f1e4e0;        /* soft highlight backgrounds */
  --line: #e6ddd4;         /* borders */

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --radius: 6px;
  --gap: 1rem;
}

/* ---- Basic page ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.6em;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }

a { color: var(--rose); }
a:hover { color: var(--rose-dark); }

img { max-width: 100%; height: auto; display: block; }

/* A clear outline for keyboard users, so they can always see where they are. */
:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--gap);
}
.section { padding-block: 2.5rem; }
.narrow { max-width: 40rem; }

/* Hidden until a keyboard user presses Tab, then jumps past the menu. */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0; }

.button {
  display: inline-block;
  background: var(--rose);
  color: var(--paper);
  padding: 0.75rem 1.4rem;
  border: 0;
  border-radius: var(--radius);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}
.button:hover { background: var(--rose-dark); color: var(--paper); }

/* ---- Header ---- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
/* The header is a grid with named areas, so it stays tidy whatever the
   logo's size. Phones: logo, "Menu" button and basket on top; the menu and
   search fold out underneath when the button is pressed.
   Bigger screens (further down): logo, search and basket on top, menu below. */
.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "logo menu basket"
    "panel panel panel";
  align-items: center;
  gap: 0.75rem var(--gap);
  padding-block: 0.75rem;
}
.header-inner .logo { grid-area: logo; justify-self: start; }
.header-inner .menu-button { grid-area: menu; }
.header-inner .site-menu { grid-area: panel; }
.header-inner .basket-link { grid-area: basket; }
/* Let the logo give way first if the top row gets crowded. */
.header-inner .logo { min-width: 0; }

/* Small phones: a tighter top row so the logo, "Menu" and "Basket" all fit.
   When the header shows both the logo picture and the name, only the name
   is shown here, as the picture is too small to read at this size. */
@media (max-width: 29.99rem) {
  .header-inner { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 0.6rem; }
  .logo.has-logo.has-name picture { display: none; }
  .logo-name { font-size: 1.5rem; }
  .logo-sub { font-size: 0.65rem; letter-spacing: 0.14em; }
  .menu-button:not([hidden]) { padding-inline: 0.6rem; }
}

/* ---- Phones: the "Menu" button and the menu it opens ---- */
.menu-button:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.menu-button:hover,
.menu-button[aria-expanded="true"] { color: var(--rose); border-color: var(--rose); }
/* Folded away until the button is pressed (only once menu.js is running). */
.menu-ready .site-menu:not(.is-open) { display: none; }
.site-menu {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}
/* The search box starts at no width and stretches to fill the line, so it
   can never make the menu wider than a small phone's screen. */
.site-menu .site-search { width: 100%; }
.site-menu .site-search input { width: 0; }
/* One link per line, with room for a fingertip. */
.menu-ready .main-nav ul { flex-direction: column; gap: 0; }
.menu-ready .main-nav li { border-top: 1px solid var(--line); }
.menu-ready .main-nav a { display: block; padding-block: 0.7rem; }
.menu-ready .main-nav a:hover,
.menu-ready .main-nav a[aria-current="page"] { box-shadow: none; font-weight: 600; }
.logo {
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-name {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  letter-spacing: 0.04em;
}
.logo-sub {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.2rem;
}
.main-nav a {
  color: var(--ink);
  text-decoration: none;
  padding-block: 0.4rem;
  display: inline-block;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--rose);
  box-shadow: inset 0 -2px 0 var(--rose);
}

/* ---- Home page hero ---- */
.hero {
  background: var(--blush);
  padding-block: 3rem;
  text-align: center;
}
.hero-text {
  max-width: 34rem;
  margin: 0 auto 1.5rem;
  color: var(--ink-soft);
}

/* ---- Product grid ---- */
.product-grid,
.category-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}
.product-card a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-decoration: none;
  color: var(--ink);
}
.product-card img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  border-radius: var(--radius);
  background: var(--paper);
  margin-bottom: 0.4rem;
}
.product-card a:hover .product-name { color: var(--rose); }
.product-price { color: var(--ink-soft); }
.product-soldout {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rose-dark);
}

/* ---- Category tiles ---- */
/* Every tile in a row is the same height, even when one name (like
   "Necklaces & Pendants") needs two lines. */
.category-grid li { display: flex; }
.category-grid .category-card { flex: 1; }
.category-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 7rem;
  padding: var(--gap);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  text-align: center;
}
.category-card:hover { border-color: var(--rose); }
.category-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  line-height: 1.25;
  text-wrap: balance;
  overflow-wrap: anywhere;
  padding-inline: 0.5rem;
}
.category-count { font-size: 0.9rem; color: var(--ink-soft); }

.category-card.has-image {
  padding: 0 0 0.75rem;
  overflow: hidden;
  justify-content: flex-start;
}
.category-card.has-image img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  margin-bottom: 0.6rem;
}
.see-all { text-align: center; margin-top: 2rem; }

/* Hidden on screen but still read out by screen readers. */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- Search box in the header ---- */
.site-search {
  display: flex;
  width: 100%;
  gap: 0.4rem;
}
.site-search input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--ink);
}
.site-search .button { padding: 0.5rem 1rem; }

/* ---- Breadcrumbs: Home > Rings > Silver Ring ---- */
.breadcrumbs { padding-top: 1rem; font-size: 0.9rem; }
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.breadcrumbs li + li::before {
  content: "›";
  margin: 0 0.5rem;
  color: var(--ink-soft);
}
.breadcrumbs [aria-current] { color: var(--ink-soft); }
.breadcrumbs + .section { padding-top: 1.25rem; }

/* ---- Category and "all jewellery" lists ---- */
.intro { color: var(--ink-soft); max-width: 40rem; }
.list-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  margin: 1.5rem 0 1rem;
  font-size: 0.95rem;
}
.result-count { margin: 0; color: var(--ink-soft); }
.sort-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sort-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}
.sort-links a { color: var(--ink); }
.sort-links a[aria-current] {
  color: var(--rose);
  font-weight: 600;
  text-decoration: none;
}

/* ---- Product page ---- */
.draft-banner {
  background: #fff3cd;
  border-bottom: 1px solid #e0c56e;
  padding-block: 0.75rem;
}
.product-page {
  display: grid;
  gap: 2rem;
}
.gallery-main {
  display: block;
  position: relative;
  cursor: zoom-in;
}
.gallery-main img,
.gallery-placeholder {
  width: 100%;
  border-radius: var(--radius);
  background: var(--paper);
}
.gallery-hint {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius);
}
.gallery-thumbs {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.gallery-thumb {
  display: block;
  border: 2px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery-thumb img {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
}
.gallery-thumb[aria-current] { border-color: var(--rose); }

.product-page-price {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}
.stock { margin: 0 0 1.5rem; color: var(--ink-soft); }
.stock-low { color: var(--rose-dark); }
.stock-out { color: var(--rose-dark); }

.add-to-basket {
  padding: 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field select,
.field input {
  font: inherit;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--ink-soft);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  min-width: 10rem;
}
.field-quantity input { width: 6rem; min-width: 0; }
.help { font-size: 0.9rem; color: var(--ink-soft); margin: 0.3rem 0 0; }
.button-big { width: 100%; font-size: 1.1rem; padding-block: 0.9rem; }
.button:disabled { opacity: 0.55; cursor: not-allowed; }

.product-facts,
.contact-details {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.4rem 1.25rem;
  margin: 1.5rem 0;
}
.product-facts dt,
.contact-details dt { font-weight: 600; }
.product-facts dd,
.contact-details dd { margin: 0; overflow-wrap: anywhere; }

/* ---- Full-screen photo viewer ---- */
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 16, 14, 0.95);
  color: #fff;
}
.lightbox::backdrop { background: rgba(20, 16, 14, 0.8); }
.lightbox-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1rem 4rem;
  overflow: auto;
}
.lightbox-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}
/* Zoomed in: the photo shows at full size and can be scrolled around. */
.lightbox-stage.is-zoomed { display: block; padding: 0; }
.lightbox-stage.is-zoomed img {
  max-width: none;
  max-height: none;
  margin: 0 auto;
  cursor: zoom-out;
}
.lightbox button {
  position: absolute;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox button:hover { background: rgba(0, 0, 0, 0.8); }
.lightbox :focus-visible { outline-color: #fff; }
.lightbox-close { top: 0.5rem; right: 0.5rem; }
.lightbox-prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 0.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.95rem;
}

/* ---- Messages ("Added to your basket") ---- */
.flash {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border-left: 4px solid;
}
.flash-success { background: #e8f3ea; border-color: #2e7d45; color: #1e5530; }
.flash-error { background: #fbeaea; border-color: #a8322f; color: #7a1f1d; }
.muted { color: var(--ink-soft); }

/* ---- Basket link in the header ---- */
.basket-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  padding: 0.4rem 0;
}
.basket-link:hover,
.basket-link[aria-current] { color: var(--rose); }

/* ---- Basket page ---- */
.basket-layout { display: grid; gap: 2rem; }
.basket-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.basket-line {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.5rem 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}
.basket-photo img {
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--paper);
}
.basket-info { display: flex; flex-direction: column; gap: 0.15rem; }
.basket-name { color: var(--ink); font-weight: 600; text-decoration: none; }
.basket-name:hover { color: var(--rose); }
.basket-line-price { grid-column: 2; margin: 0; font-weight: 600; }
.basket-update {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.basket-update label { font-size: 0.9rem; }
.basket-update input {
  width: 4.5rem;
  font: inherit;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--ink-soft);
  border-radius: var(--radius);
}
.basket-update .button { padding: 0.35rem 0.9rem; }
.button-secondary {
  background: var(--paper);
  color: var(--rose);
  border: 1px solid var(--rose);
}
.button-secondary:hover { background: var(--blush); color: var(--rose-dark); }
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--rose);
  text-decoration: underline;
  cursor: pointer;
}

.basket-summary {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  align-self: start;
}
.basket-summary h2 { font-size: 1.25rem; }
.delivery-choices { border: 0; margin: 0 0 1rem; padding: 0; }
.radio {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.4rem 0;
  cursor: pointer;
}
.radio input { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; flex-shrink: 0; accent-color: var(--rose); }
.free-delivery-hint {
  background: var(--blush);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
}
.totals {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 1rem;
  margin: 1rem 0 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.totals dd { margin: 0; text-align: right; }
.totals .total { font-weight: 700; font-size: 1.15rem; padding-top: 0.4rem; }

/* ---- Craft fairs ---- */
.fair-list {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.fair {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--rose);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.fair p { margin: 0; }
.fair-date {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rose-dark);
  font-weight: 600;
}
.fair-name { font-size: 1.3rem; margin: 0.2rem 0 0.3rem; }
.fair-name a { color: var(--ink); }
.fair-details { color: var(--ink-soft); }
.fair-notes { margin-top: 0.5rem !important; }

/* ---- Information pages ---- */
.page-body p { margin: 0 0 1em; }

/* ---- Footer ---- */
.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding-top: 2rem;
  font-size: 0.95rem;
}
.footer-inner {
  display: grid;
  gap: 1.5rem;
}
.footer-name { font-family: var(--font-heading); font-size: 1.2rem; margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.3rem; }
.site-footer p { margin: 0 0 0.3rem; }
.copyright {
  color: var(--ink-soft);
  font-size: 0.85rem;
  padding-block: 1.5rem;
}

/* ==================================================================
   Bigger screens
   ================================================================== */
@media (min-width: 40rem) {
  h1 { font-size: 2.6rem; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .category-name { font-size: 1.25rem; }
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; }
  .hero { padding-block: 5rem; }
  .site-search { width: auto; }
  .site-search input { width: 10rem; }
  .button-big { width: auto; padding-inline: 2.5rem; }
}

@media (min-width: 48rem) {
  /* Header: logo, search and basket on top; the menu on its own row below,
     with a fine line between them. */
  .header-inner {
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "logo search basket"
      "nav  nav    nav";
    column-gap: 1.5rem;
    padding-bottom: 0;
  }
  .header-inner .main-nav {
    grid-area: nav;
    border-top: 1px solid var(--line);
    padding-block: 0.4rem;
  }
  .header-inner .site-search { grid-area: search; width: auto; }
  .header-inner .site-search input { width: 14rem; }
  /* No "Menu" button here: the menu is always shown, in a row. The wrapper
     steps aside so the menu and search take their own places in the grid. */
  .header-inner .menu-button { display: none; }
  .site-menu,
  .menu-ready .site-menu:not(.is-open) { display: contents; }
  .menu-ready .main-nav ul { flex-direction: row; gap: 0.25rem 1.2rem; }
  .menu-ready .main-nav li { border-top: 0; }
  .menu-ready .main-nav a { display: inline-block; padding-block: 0.4rem; }
  .menu-ready .main-nav a:hover,
  .menu-ready .main-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--rose); font-weight: inherit; }

  /* Photos on the left, details on the right. */
  .product-page { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .basket-layout { grid-template-columns: 1fr 22rem; }
  .basket-line { grid-template-columns: 6rem 1fr auto; }
  .basket-photo img { width: 6rem; height: 6rem; }
  .basket-line-price { grid-column: auto; }
  .fair-list-home { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 64rem) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Respect visitors who have asked their device for less motion. */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Shown while a Stripe TEST key is in use (never on the real shop). */
.test-mode-banner {
  margin: 0;
  padding: 0.4rem 1rem;
  background: #fff3cd;
  color: #5c4400;
  border-bottom: 1px solid #e0c56e;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---- Contact form ---- */
.contact-form {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact-form input,
.contact-form textarea { width: 100%; }
.contact-form textarea {
  font: inherit;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--ink-soft);
  border-radius: var(--radius);
  resize: vertical;
}
.has-error input,
.has-error textarea { border: 2px solid #a8322f; }
.error-text { color: #7a1f1d; font-weight: 600; margin: 0.3rem 0 0; }
/* The spam trap is moved off screen rather than hidden, because some
   robots skip boxes that are obviously hidden. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Subheadings typed as "## Heading" in page text. */
.page-subheading { font-size: 1.35rem; margin: 1.8em 0 0.5em; }

/* ---- Logo (Admin > Look & feel) ---- */
.logo.has-logo { flex-direction: row; align-items: center; gap: 0.75rem; }
.logo-text { display: flex; flex-direction: column; }
/* Logos come in all shapes, so limit the height and let the width follow. */
.logo-image { height: 3.5rem; width: auto; max-width: 14rem; object-fit: contain; }
@media (min-width: 40rem) {
  .logo-image { height: 4.5rem; max-width: 18rem; }
}

/* ---- Home page banner with a photo ---- */
.hero.has-image { text-align: left; padding-block: 2rem; }
.hero.has-image .hero-inner { display: grid; gap: 1.5rem; align-items: center; }
.hero.has-image .hero-text { margin-left: 0; }
.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}
@media (min-width: 48rem) {
  .hero.has-image { padding-block: 3.5rem; }
  .hero.has-image .hero-inner { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

/* ---- Photos in page text (About, craft fair stories) ----
   Spread through the words by partials/paragraphs.ejs, alternating right
   and left. The style is chosen in Admin > Look & feel. */
.page-photo {
  width: 8.5rem;
  margin: 0.35rem 0 1rem;
}
.page-photo-right { float: right; margin-left: 1.25rem; }
.page-photo-left { float: left; margin-right: 1.25rem; }
.page-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--paper);
}
/* Circles: a white gap, then a thin ring in the shop's main colour, and
   the words follow the curve of the circle instead of a square box. */
.page-photo-circle { shape-outside: circle(50%); shape-margin: 0.9rem; }
.page-photo-circle img {
  border-radius: 50%;
  border: 4px solid var(--paper);
  box-shadow: 0 0 0 2px var(--rose);
}
.page-photo-rounded img {
  border-radius: calc(var(--radius) + 12px);
  border: 4px solid var(--paper);
  box-shadow: 0 0 0 2px var(--rose);
}
/* Plain: the photo's own shape, slightly larger. */
.page-photo-plain { width: 11rem; }
.page-photo-plain img { aspect-ratio: auto; border-radius: var(--radius); }
.clear-photos { clear: both; }

@media (min-width: 40rem) {
  .page-photo { width: 13rem; }
  .page-photo-plain { width: 16rem; }
  .page-photo-right { margin-left: 2rem; }
  .page-photo-left { margin-right: 2rem; }
}

/* The footer's "p" spacing rule was stopping the copyright line centring. */
.site-footer .copyright { margin: 0 auto; }

/* ---- Fair stories ---- */
.story-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rose-dark);
  font-weight: 600;
}
.story-date { color: var(--ink-soft); margin: -0.3rem 0 1.5rem; }
.story-list { list-style: none; margin: 1rem 0 1.5rem; padding: 0; display: grid; gap: 0.75rem; }
.story-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
}
.story-card:hover { border-color: var(--rose); }
.story-card:hover .story-card-title { color: var(--rose); }
/* The same circle-with-a-ring look as the photos in the stories. */
.story-photo img {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 2px var(--rose);
  flex-shrink: 0;
}
.story-card-text { display: flex; flex-direction: column; }
.story-card-title { font-family: var(--font-heading); font-size: 1.15rem; line-height: 1.3; }
.story-card-date { font-size: 0.9rem; color: var(--ink-soft); }
