/* Lerhjem Keramik - demo site styles
   Layout paradigm: editorial catalogue, full-bleed panel with caption below. */

/* Self-hosted fonts (SIL Open Font License 1.1, see CREDITS.md) */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/dm-serif-display-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
  --off-white: #FBF8F4;
  --clay: #2B2522;
  --terracotta: #9E4A2A;
  --terracotta-deep: #7A3A20;
  --sage: #E4E8DF;
  --fjord: #3F5560;
  --muted: #665D54;
  --focus: #7A3A20;
  --shadow: 0 18px 40px rgba(43, 37, 34, .12);
  --container: 1180px;
  --section-padding: clamp(64px, 9vw, 112px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--clay);
  background: var(--off-white);
  line-height: 1.65;
}
h1, h2, h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  margin: 0;
  color: var(--clay);
}
p { margin: 0; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.demo-banner, .announce, .fjord, .site-footer { --focus: #FBF8F4; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--clay);
  color: var(--off-white);
  padding: 12px 20px;
  z-index: 1000;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- Demo banner ---------- */
.demo-banner {
  background: var(--clay);
  color: var(--off-white);
  padding: 10px 16px;
  text-align: center;
  font-size: .9rem;
}
.demo-banner a { color: #D7A27E; font-weight: 700; text-decoration: underline; }

/* ---------- Announcement ---------- */
.announce {
  background: var(--clay);
  color: var(--off-white);
  text-align: center;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 9px 16px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--off-white);
  padding-block: 16px;
  border-bottom: 1px solid rgba(43, 37, 34, .12);
  overflow: hidden;
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.logo { order: 1; }
.logo__word {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--terracotta-deep);
}
.cart-button {
  order: 2;
  background: transparent;
  border: 1px solid var(--clay);
  border-radius: 6px;
  padding: 8px 16px;
  font-weight: 700;
  color: var(--clay);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cart-button__count {
  background: var(--terracotta-deep);
  color: var(--off-white);
  border-radius: 999px;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  padding-inline: 4px;
}
.site-nav { order: 3; flex-basis: 100%; }
.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
}
.site-nav__link {
  font-weight: 600;
  color: var(--clay);
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}
.site-nav__link:hover { border-bottom-color: var(--terracotta); }

@media (min-width: 860px) {
  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .logo { order: 0; grid-column: 2; text-align: center; }
  .site-nav { order: 0; flex-basis: auto; grid-column: 1; }
  .site-nav__list { justify-content: flex-start; }
  .cart-button { order: 0; grid-column: 3; justify-self: end; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 6px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  font-family: 'DM Sans', sans-serif;
}
.btn--primary { background: var(--terracotta-deep); color: var(--off-white); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--outline { background: transparent; color: var(--off-white); border: 2px solid rgba(251, 248, 244, .6); }
.btn--outline:hover { border-color: var(--off-white); }

/* ---------- Hero ---------- */
.hero__panel {
  background: var(--sage);
  overflow: hidden;
}
.hero__art { width: 100%; height: clamp(220px, 32vw, 320px); }
.hero__caption { padding-block: clamp(32px, 6vw, 56px); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  font-size: .8rem;
  color: var(--terracotta-deep);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2.2rem, 1.7rem + 2.4vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 18px;
  max-width: 18ch;
}
.hero__text { color: var(--muted); max-width: 60ch; margin-bottom: 24px; }

/* ---------- Sections ---------- */
.section-title {
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.5rem);
  margin-bottom: clamp(28px, 4vw, 44px);
}
.products, .about, .delivery { padding-block: var(--section-padding); }

/* ---------- Produkter ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.filters button {
  background: transparent;
  border: 1px solid var(--clay);
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 600;
  color: var(--clay);
}
.filters button[aria-pressed="true"] { background: var(--clay); color: var(--off-white); }
.shop-status { min-height: 1.4em; color: var(--terracotta-deep); font-weight: 600; margin-bottom: 20px; }
.products__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px 24px;
}
@media (min-width: 500px) {
  .products__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 860px) {
  .products__grid { grid-template-columns: repeat(4, 1fr); }
}
.product__art {
  background: #EFEAE1;
  aspect-ratio: 1 / 1;
  margin-bottom: 14px;
}
.product__art svg { width: 100%; height: 100%; }
.product__row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.product__row h3 { font-size: 1.1rem; }
.product__price { color: var(--terracotta-deep); font-weight: 700; font-family: 'DM Sans', sans-serif; }
.product__add {
  width: 100%;
  background: transparent;
  border: 1px solid var(--clay);
  border-radius: 6px;
  padding: 10px 14px;
  font-weight: 700;
  color: var(--clay);
}
.product__add:hover { background: var(--clay); color: var(--off-white); }

/* ---------- Fjord ---------- */
.fjord { background: var(--fjord); color: var(--off-white); padding-block: var(--section-padding); }
.fjord .section-title { color: var(--off-white); }
.fjord__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
@media (min-width: 860px) {
  .fjord__inner { grid-template-columns: 1fr 1fr; }
}
.fjord__text p { color: rgba(251, 248, 244, .85); max-width: 52ch; margin-bottom: 26px; }

/* ---------- Om ---------- */
.about__cols { columns: 1; }
@media (min-width: 860px) {
  .about__cols { columns: 2; column-gap: 48px; }
}
.about__cols p { color: var(--muted); margin-bottom: 16px; break-inside: avoid; }

/* ---------- Levering ---------- */
.delivery__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  border-top: 1px solid rgba(43, 37, 34, .15);
  padding-top: 32px;
}
@media (min-width: 860px) {
  .delivery__list { grid-template-columns: repeat(3, 1fr); }
}
.delivery__list dt { font-weight: 700; margin-bottom: 8px; color: var(--terracotta-deep); }
.delivery__list dd { margin: 0; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--clay);
  color: rgba(251, 248, 244, .8);
  padding-block: 44px 28px;
  border-top: 3px solid var(--terracotta);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 860px) {
  .site-footer__inner { grid-template-columns: repeat(3, 1fr); }
}
.site-footer .logo__word { color: var(--off-white); font-size: 1.5rem; }
.site-footer__col h3 { font-family: 'DM Sans', sans-serif; color: var(--off-white); font-size: 1rem; margin-bottom: 10px; }
.site-footer__col p { margin-top: 8px; }
.site-footer a { color: #D7A27E; font-weight: 700; }

/* ======================================================================
   Multi-page additions
   ====================================================================== */
[hidden] { display: none !important; }
img { height: auto; }
a.cart-button { text-decoration: none; }
.cart-button:hover { background: var(--clay); color: var(--off-white); }
.cart-button:hover .cart-button__count { background: var(--off-white); color: var(--clay); }

/* Photo treatment: 0 radius, on a #EFEAE1 mat with 16px padding */
.mat { background: #EFEAE1; padding: 16px; }
.mat img { display: block; width: 100%; border-radius: 0; }
.product__art.mat { aspect-ratio: 1 / 1; margin-bottom: 14px; }
.product__art.mat img { height: 100%; object-fit: cover; }
.hero__panel { background: #EFEAE1; padding: 16px; }
.hero__photo { width: 100%; height: clamp(220px, 32vw, 420px); object-fit: cover; }
.product__row h3 a { border-bottom: 2px solid transparent; }
.product__row h3 a:hover { border-bottom-color: var(--terracotta); }
.fjord__visual .mat { background: #E9E4DA; }
.fjord__visual img { aspect-ratio: 4 / 3; object-fit: cover; }
.about__mat { margin-bottom: 32px; }
.about__photo { aspect-ratio: 16 / 7; object-fit: cover; }

/* Shared form bits */
.form-note { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.req { color: #8A3A1E; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(43, 37, 34, .4);
  border-radius: 6px;
  background: #fff;
  color: var(--clay);
}
.field-row { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 500px) { .field-row { grid-template-columns: 1fr 2fr; } }
.demo-form__status { margin-top: 14px; font-weight: 700; color: var(--terracotta-deep); min-height: 1.4em; }
.btn--ghost-dark { background: transparent; color: var(--clay); border: 2px solid var(--clay); }
.btn--ghost-dark:hover { background: var(--clay); color: var(--off-white); }
.page-title { font-size: clamp(2.2rem, 1.6rem + 3vw, 3.6rem); margin-bottom: 20px; }

/* Product page */
.product-page, .cart-page, .checkout-page { padding-block: clamp(28px, 5vw, 56px) var(--section-padding); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 0; font-size: .9rem; color: var(--muted); margin-bottom: 26px; }
.crumbs li + li::before { content: '›'; margin-inline: 10px; }
.crumbs a { text-decoration: underline; text-underline-offset: 3px; }
.product-detail { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
@media (min-width: 860px) { .product-detail { grid-template-columns: 1.1fr 1fr; gap: 56px; } }
.product-detail__main img { max-height: 620px; object-fit: cover; }
.thumbs { display: flex; gap: 12px; margin-top: 14px; }
.thumb { padding: 6px; background: #EFEAE1; border: 2px solid transparent; width: 84px; }
.thumb img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.thumb[aria-pressed="true"] { border-color: var(--clay); }
.product-detail__info h1 { font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.4rem); line-height: 1.05; margin-bottom: 10px; }
.product-detail__price { font-size: 1.5rem; font-weight: 700; color: var(--terracotta-deep); margin-bottom: 16px; }
.product-detail__desc { color: var(--muted); max-width: 52ch; margin-bottom: 26px; }
.glaze { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.glaze legend { font-weight: 700; padding: 0; margin-bottom: 8px; }
.glaze__options { display: flex; flex-wrap: wrap; gap: 10px; }
.glaze input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); }
.glaze label { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--clay); border-radius: 999px; padding: 8px 16px 8px 10px; font-weight: 600; cursor: pointer; }
.glaze label::before { content: ''; width: 20px; height: 20px; border-radius: 50%; background: var(--swatch, #D8C7A8); border: 1px solid rgba(43, 37, 34, .35); flex-shrink: 0; }
.glaze input:checked + label { background: var(--clay); color: var(--off-white); }
.glaze input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 3px; }
.qty { display: flex; align-items: stretch; width: fit-content; }
.qty button { width: 44px; background: #fff; border: 1px solid rgba(43, 37, 34, .4); font-size: 1.3rem; font-weight: 700; color: var(--clay); }
.qty button:hover { background: var(--clay); color: var(--off-white); }
.field .qty input { width: 68px; text-align: center; border-radius: 0; border-inline: 0; }
.product-detail__form .btn { margin-top: 6px; }
.product-detail__form .shop-status { margin: 14px 0 0; }
.product-missing { padding: 40px 0; }
.product-missing p { margin-bottom: 20px; font-size: 1.1rem; }
.related { margin-top: clamp(56px, 8vw, 96px); }
.related__grid { display: grid; grid-template-columns: 1fr; gap: 28px 24px; }
@media (min-width: 500px) { .related__grid { grid-template-columns: repeat(3, 1fr); } }
.related-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.related-card h3 a { border-bottom: 2px solid transparent; }
.related-card h3 a:hover { border-bottom-color: var(--terracotta); }

/* Cart */
.cart-layout { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
@media (min-width: 860px) { .cart-layout { grid-template-columns: 1.7fr 1fr; } }
.cart-lines { display: flex; flex-direction: column; border-top: 1px solid rgba(43, 37, 34, .2); }
.cart-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding-block: 18px; border-bottom: 1px solid rgba(43, 37, 34, .2); }
.cart-line__thumb { width: 88px; padding: 6px; flex-shrink: 0; }
.cart-line__thumb img { aspect-ratio: 1 / 1; object-fit: cover; }
.cart-line__info { flex: 1 1 150px; min-width: 0; }
.cart-line__info a { font-family: 'DM Serif Display', serif; font-size: 1.2rem; border-bottom: 2px solid transparent; }
.cart-line__info a:hover { border-bottom-color: var(--terracotta); }
.cart-line__info p { color: var(--muted); font-size: .92rem; }
.cart-line__qty { display: flex; align-items: center; gap: 4px; }
.cart-line__qty button { width: 36px; height: 36px; background: #fff; border: 1px solid rgba(43, 37, 34, .4); font-weight: 700; color: var(--clay); }
.cart-line__qty button:hover { background: var(--clay); color: var(--off-white); }
.cart-line__qty span { min-width: 34px; text-align: center; font-weight: 700; }
.cart-line__total { font-weight: 700; min-width: 80px; text-align: right; }
.cart-line__remove { background: none; border: 0; padding: 6px 2px; text-decoration: underline; text-underline-offset: 3px; color: var(--terracotta-deep); font-weight: 700; }
.cart-empty { background: var(--sage); padding: clamp(28px, 5vw, 48px); grid-column: 1 / -1; }
.cart-empty p { font-size: 1.2rem; margin-bottom: 18px; }
.cart-summary { background: var(--sage); padding: 26px; position: sticky; top: 16px; }
.cart-summary h2 { font-size: 1.5rem; margin-bottom: 14px; }
.cart-summary__row { display: flex; justify-content: space-between; gap: 12px; font-size: 1.15rem; margin-bottom: 8px; }
.cart-summary__note { color: var(--muted); margin-bottom: 18px; }
.cart-summary .btn { width: 100%; }

/* Checkout */
.checkout-layout { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: start; }
@media (min-width: 860px) { .checkout-layout { grid-template-columns: 1.5fr 1fr; gap: 56px; } }
.steps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.steps li { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid rgba(43, 37, 34, .35); font-weight: 600; color: var(--muted); }
.steps__n { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid currentColor; font-size: .8rem; }
.steps li[aria-current="step"] { background: var(--clay); color: var(--off-white); border-color: var(--clay); }
fieldset[data-step] { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset[data-step] legend { font-family: 'DM Serif Display', serif; font-size: 1.7rem; padding: 0; margin-bottom: 16px; }
.choice-card { display: flex; align-items: center; gap: 12px; border: 1px solid rgba(43, 37, 34, .45); padding: 14px 16px; margin-bottom: 10px; background: #fff; }
.choice-card input { width: 20px; height: 20px; accent-color: var(--terracotta-deep); flex-shrink: 0; }
.choice-card label { flex: 1; cursor: pointer; font-weight: 600; }
.choice-card:has(input:checked) { border-color: var(--clay); box-shadow: inset 0 0 0 1px var(--clay); background: #EFEAE1; }
.choice { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; }
.choice input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--terracotta-deep); flex-shrink: 0; }
.pay-note { background: #EFEAE1; padding: 14px 16px; color: var(--muted); margin-top: 6px; }
.step-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.checkout-empty { background: var(--sage); padding: clamp(28px, 5vw, 48px); margin-bottom: 24px; }
.checkout-empty p { font-size: 1.2rem; margin-bottom: 18px; }
.order-summary { background: var(--sage); padding: 26px; }
.order-summary h2 { font-size: 1.5rem; margin-bottom: 14px; }
.order-summary__lines li { display: flex; justify-content: space-between; gap: 12px; padding-block: 8px; border-bottom: 1px solid rgba(43, 37, 34, .15); font-size: .95rem; }
.order-summary__totals { margin: 14px 0 0; }
.order-summary__totals div { display: flex; justify-content: space-between; gap: 12px; padding-block: 5px; }
.order-summary__totals dt { color: var(--muted); }
.order-summary__totals dd { margin: 0; font-weight: 700; text-align: right; }
.order-summary__total { border-top: 1px solid var(--clay); margin-top: 8px; padding-top: 10px !important; font-size: 1.15rem; }
.order-summary__total dt { color: var(--clay); font-weight: 700; }

/* Glaze swatches (moved out of inline styles for the CSP) */
label[for="glasur-0"] { --swatch: #D9D6D1; }
label[for="glasur-1"] { --swatch: #7F97A0; }
label[for="glasur-2"] { --swatch: #D8C7A8; }

/* Checkout: state after an order */
.order-done { margin-top: 14px; font-weight: 600; }
.order-done a { color: var(--terracotta-deep); text-decoration: underline; text-underline-offset: 3px; }
