/* Moore Music store. Design: REWRITE_PLAN.md §4.8 — the old site's feel
   (Renoir banner, script title, cream), in colours taken from the banner, calmer and easier to read. */
@font-face {
  font-family: "Dancing Script";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/static/fonts/dancing-script-latin.woff2) format("woff2");
}

:root {
  /* From the Renoir banner: its olive greens, the rust and amber of the hair,
     and the cream it sits on. */
  --ink: #2b2118;
  --heading: #33240f;
  --paper: #fbf6ec;
  --banner: #ead6b1;          /* the banner images' background: keep exact */
  --olive: #5c6838;           /* nav and footer */
  --olive-dark: #4b5530;
  --accent: #8a3a16;          /* rust: links and buttons */
  --accent-dark: #6b2c0f;
  --amber: #b07a2a;
  --rule: #ddcfb4;
  --muted: #6b5a44;
  --card: #fffdf8;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: Georgia, "Times New Roman", serif; font-size: 1.125rem; line-height: 1.6;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
.banner:hover { color: var(--heading); }
img { max-width: 100%; height: auto; }

/* --- header ------------------------------------------------------------------ */
.site-header { background: var(--banner); }
.banner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 64rem; margin: 0 auto; text-decoration: none; color: var(--heading);
}
.banner-art { width: 9rem; display: block; }
.banner-title {
  font-family: "Dancing Script", cursive; font-weight: 600; font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1.1; text-align: center; padding: .5rem;
}
.site-nav {
  background: var(--olive); display: flex; flex-wrap: wrap; justify-content: space-between;
  padding: 0 max(1rem, calc((100% - 64rem) / 2));
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 1rem;
}
.site-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.site-links a {
  display: block; padding: .7rem .9rem; color: #fff; text-decoration: none;
}
.site-links a:hover, .site-links a[aria-current] { background: var(--olive-dark); color: #fff; }
.site-links a[aria-current] { box-shadow: inset 0 -3px 0 var(--banner); }

@media (max-width: 40rem) {
  .banner-art.right { display: none; }
  .banner { justify-content: center; gap: .5rem; padding: 0 .5rem; }
  .banner-art { width: 5.5rem; }
  .site-nav { padding: .2rem .3rem; font-size: .95rem; }
  .site-links a { padding: .45rem .5rem; }
}

/* --- page ---------------------------------------------------------------------- */
main { padding: 1.5rem 1rem 2.5rem; }
main.page { max-width: 44rem; margin: 0 auto; }
main.wide { max-width: 64rem; margin: 0 auto; }
h1, h2, h3 { font-weight: normal; line-height: 1.25; color: var(--heading); }
h2 { font-size: 1.8rem; margin: .2rem 0 1rem; }
h3 { font-size: 1.35rem; margin: 1.6rem 0 .6rem; }
.site-footer {
  background: var(--olive-dark); color: #f4efe3; text-align: center; font-size: .85rem; padding: .8rem 1rem;
}
.site-footer p { margin: 0; }

/* --- content pages --------------------------------------------------------------- */
.home { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 2.5rem; }
.home-aside { font-size: 1rem; }
@media (max-width: 52rem) { .home { grid-template-columns: minmax(0, 1fr); } }
.lead { font-size: 1.5rem; color: var(--heading); margin-top: 0; }
.em { color: var(--heading); font-size: 1.12em; }
strong { color: var(--heading); }
.infobox { background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--accent);
           padding: .6rem .8rem; border-radius: 4px; }
.guarantee { border: 2px solid var(--amber); border-radius: 6px; padding: .7rem 1rem; background: var(--card); }
.motto { margin: 1.2rem 0; padding: .2rem 0 .2rem 1rem; border-left: 3px solid var(--amber); }
.motto .who { color: var(--muted); font-size: .95rem; }
.quotes { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.quotes li { border-left: 3px solid var(--olive); padding: .1rem 0 .1rem .8rem; margin-bottom: 1rem; }
.quotes .who { display: block; color: var(--muted); font-size: .92rem; }
.aside-title { color: var(--olive-dark); font-size: 1.15rem; margin: 1.4rem 0 .6rem; }
.contact { background: var(--card); border: 1px solid var(--rule); border-radius: 4px; padding: .8rem 1rem; }
.contact p { margin: .4rem 0; }
.samples { padding-left: 1.2rem; }
audio { width: 100%; margin: .3rem 0; }
.sample-page img { border: 1px solid var(--rule); background: #fff; }
.signoff { margin-top: 1.5rem; }

/* --- catalog --------------------------------------------------------------------- */
.section-nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: 1rem; margin-bottom: 1rem; }
.catalog-section h3 { border-bottom: 2px solid var(--olive); padding-bottom: .2rem; }
.item { display: flex; gap: 1rem; border-bottom: 1px solid var(--rule); padding: .9rem 0 1.1rem; }
.item:last-child { border-bottom: 0; }
.item-body { flex: 1; min-width: 0; }
.item h4 { font-size: 1.2rem; font-weight: bold; margin: .1rem 0 .3rem; color: var(--heading); }
.item p { margin: .3rem 0 .6rem; }
.item .sample-thumb { width: 6.5rem; flex: none; }
.item .sample-thumb img { border: 1px solid var(--rule); display: block; }
.item .sample-thumb span { display: block; font-size: .85rem; text-align: center; }
@media (max-width: 30rem) { .item .sample-thumb { width: 4.5rem; } }
.buy { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.price { font-weight: bold; }

/* --- forms, tables, buttons (cart, checkout, account) ------------------------------ */
table { width: 100%; border-collapse: collapse; }
td, th { padding: .4rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
td.num, th.num { text-align: right; white-space: nowrap; }
button, .button {
  background: var(--accent); color: #fff; border: 0; padding: .55rem 1.1rem; font: inherit; font-size: 1rem;
  border-radius: 4px; cursor: pointer; text-decoration: none; display: inline-block;
}
button:hover, .button:hover { background: var(--accent-dark); color: #fff; }
button.secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
button:disabled { opacity: .6; cursor: default; }
label { display: block; margin: .5rem 0 .1rem; }
input, select { font: inherit; padding: .4rem; width: 100%; border: 1px solid #bfae8e; border-radius: 3px; background: #fff; }
input[type=number] { width: 5rem; }
input[type=checkbox], input[type=radio] { width: auto; }
.errors, .error { color: #a00; }
.field-error { color: #a00; font-size: .95rem; }
.rate { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 0 .8rem; align-items: baseline;
        padding: .55rem .7rem; border: 1px solid var(--rule); border-radius: 4px; margin: .35rem 0; background: var(--card);
        cursor: pointer; }
.rate:hover { border-color: var(--amber); }
.rate:has(input:checked) { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.rate input { width: auto; margin: 0; align-self: center; }
.rate-days { color: var(--muted); font-size: .95rem; }
.rate-price { min-width: 4.5rem; text-align: right; }
h4.carrier { margin: 1rem 0 .2rem; font-variant: small-caps; }
details.more summary { cursor: pointer; color: var(--accent); margin: .3rem 0; }
.note { font-size: .95rem; color: var(--muted); }
.added { color: var(--accent); font-size: .95rem; }
address { font-style: normal; }
@media (max-width: 30rem) {
  .rate { grid-template-columns: auto minmax(0, 1fr) auto; }
  .rate-days { grid-column: 2 / 4; grid-row: 2; }
}
fieldset.save-details { border: 1px solid var(--rule); border-radius: 4px; margin: 1.2rem 0; padding: .5rem 1rem; background: var(--card); }
form.narrow { max-width: 26rem; }
.qty { display: inline-flex; align-items: center; gap: .3rem; }
button.remove { display: inline-flex; padding: .25rem; background: none; border: 0; border-radius: 3px;
                color: var(--muted); line-height: 0; }
button.remove:hover, button.remove:focus-visible { background: var(--banner); color: var(--accent-dark); }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: .2rem; padding: 0; margin: 0 0 1rem;
         font-size: .95rem; color: var(--muted); }
.steps li + li::before { content: "\203A"; margin: 0 .5rem 0 .3rem; color: var(--rule); }
.steps [aria-current] { color: var(--heading); font-weight: bold; }
form.address-form h3 { font-size: 1.2rem; margin: 1.6rem 0 .3rem; border-bottom: 1px solid var(--rule); padding-bottom: .15rem; }
form.address-form h3:first-of-type { margin-top: .8rem; }
form.address-form, form.pay-form { max-width: 34rem; }
.email-check { border: 1px solid var(--amber); border-left: 4px solid var(--amber); border-radius: 4px;
               background: var(--card); padding: .3rem 1rem; margin: .8rem 0; }
.email-check button { margin: 0 .4rem .4rem 0; }
p.error, ul.errors { border-left: 4px solid #a00; padding: .3rem 0 .3rem .8rem; }
ul.errors { list-style: none; }
#payment-element { margin: 1rem 0; }
