:root {
  --paper: #f4ece0;
  --paper-2: #ece0cd;
  --ink: #2f271d;
  --ink-soft: #6b5f50;
  --jute: #b99b74;
  --moss: #68705a;
  --line: rgba(47, 39, 29, 0.14);
  --shell: min(1180px, 100% - 3rem);
  --danger: #8b3a2f;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}
body {
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  opacity: 0.5;
  background-image:
    radial-gradient(rgba(120, 96, 64, 0.1) 0.5px, transparent 0.5px),
    radial-gradient(rgba(120, 96, 64, 0.07) 0.5px, transparent 0.5px);
  background-size: 7px 7px, 11px 11px;
  background-position: 0 0, 4px 6px;
}
.shell { width: var(--shell); margin-inline: auto; }
main { flex: 1; }

h1, h2, h3, .display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.label {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--moss);
  font-weight: 500;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 236, 224, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 74px;
  position: relative;
}
.wordmark {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  color: inherit;
  text-decoration: none;
  position: relative;
  z-index: 2;
}
.wordmark small {
  font-family: 'Jost', sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nav-toggle {
  display: none;
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.nav-toggle-lines {
  display: block;
  width: 22px;
  height: 12px;
  position: relative;
}
.nav-toggle-lines span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.2s ease, top 0.3s ease;
}
.nav-toggle-lines span:first-child { top: 2px; }
.nav-toggle-lines span:last-child { top: 9px; width: 14px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-lines span:first-child {
  top: 5.5px;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-lines span:last-child {
  top: 5.5px;
  width: 100%;
  transform: rotate(-45deg);
}

.site-nav {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.site-nav a {
  position: relative;
  background: none;
  border: 0;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink-soft);
  padding: 0.5rem 0.9rem;
  text-decoration: none;
  transition: color 0.25s;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.28rem;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.active { color: var(--ink); }
.site-nav a.active::after { transform: scaleX(1); }

.page { animation: rise 0.5s cubic-bezier(.2,.7,.3,1); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hero {
  display: grid;
  grid-template-columns: 1fr 0.82fr;
  align-items: end;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 4vw, 3.5rem);
}
.hero h1 {
  font-size: clamp(3rem, 8.5vw, 6.4rem);
  margin: 1.2rem 0 1.6rem;
}
.hero h1 i {
  font-style: italic;
  font-weight: 300;
  color: var(--jute);
  display: block;
}
.hero p {
  max-width: 42ch;
  color: var(--ink-soft);
  font-size: 1.04rem;
}
.hero-media {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 300px 300px 8px 8px;
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.88) contrast(1.02);
  transition: transform 1.2s cubic-bezier(.2,.7,.3,1);
}
.hero-media:hover img { transform: scale(1.04); }
.vertical-note {
  position: absolute;
  left: -2.6rem;
  bottom: 3rem;
  transform: rotate(-90deg);
  transform-origin: left bottom;
  font-size: 0.66rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.marquee {
  border-block: 1px solid var(--line);
  padding: 1.1rem 0;
  overflow: hidden;
  white-space: nowrap;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.marquee div {
  display: inline-flex;
  gap: 3rem;
  animation: slide 34s linear infinite;
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  color: var(--ink-soft);
}
.marquee span { display: inline-flex; gap: 3rem; align-items: center; }
.marquee em { font-style: normal; color: var(--jute); }
@keyframes slide { to { transform: translateX(-50%); } }

.ledger { display: grid; grid-template-columns: repeat(3, 1fr); }
.ledger article {
  padding: 2rem 2rem 2.4rem 0;
  border-right: 1px solid var(--line);
}
.ledger article:last-child { border-right: 0; }
.ledger article:not(:first-child) { padding-left: 2rem; }
.ledger .num {
  font-family: 'Fraunces', serif;
  font-size: 0.85rem;
  color: var(--jute);
  display: block;
  margin-bottom: 1.6rem;
}
.ledger h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.ledger p { font-size: 0.93rem; color: var(--ink-soft); }

.head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  padding: clamp(3rem, 6vw, 5rem) 0 2.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 3rem;
}
.head h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-top: 0.7rem; }
.head p { max-width: 36ch; color: var(--ink-soft); font-size: 0.95rem; }

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1.35rem;
  margin-bottom: 2.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.filters a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0;
  border: 0;
  position: relative;
  transition: color 0.2s;
}
.filters a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.filters a:hover { color: var(--ink); }
.filters a.active { color: var(--ink); }
.filters a.active::after { transform: scaleX(1); }

/* Jämnt galleri – samma storlek på alla alster */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 2.5vw, 2rem);
  max-width: 920px;
}

.piece {
  margin: 0;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}
a.piece:hover h3 { color: var(--jute); }

.shot {
  overflow: hidden;
  background: var(--paper-2);
  aspect-ratio: 4 / 5;
}

.shot img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.92) contrast(1.02);
  transition: transform 1.1s cubic-bezier(.2,.7,.3,1);
}
.piece:hover .shot img { transform: scale(1.035); }

.piece .figcaption,
.piece figcaption {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding-top: 0.8rem;
}
.piece .material {
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--moss);
}
.piece h3 {
  font-size: 1.2rem;
  margin: 0.1rem 0 0;
  transition: color 0.2s;
}
.piece p {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin: 0.15rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.piece .price {
  margin-top: 0.4rem;
  font-size: 0.88rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}

/* Produktsida */
.product-page { padding-bottom: 2rem; }
.product-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  padding: 2rem 0 1.2rem;
  font-size: 0.84rem;
  color: var(--ink-soft);
}
.product-crumb a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.product-crumb a:hover {
  color: var(--ink);
  border-bottom-color: var(--jute);
}
.product-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding-bottom: 3rem;
}
.product-main-shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--paper-2);
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.product-main-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.65rem;
  margin-top: 0.85rem;
}
.product-thumb {
  border: 1px solid transparent;
  padding: 0;
  background: var(--paper-2);
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-thumb.is-active,
.product-thumb:hover {
  border-color: var(--jute);
}
.product-info h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0.55rem 0 0.8rem;
}
.product-price {
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
  color: var(--ink);
}
.product-body {
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 38ch;
}
.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Lightbox */
body.lightbox-open { overflow: hidden; }
.lightbox[hidden] { display: none !important; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 24, 18, 0.72);
}
.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  display: grid;
  place-items: center;
}
.lightbox-image {
  max-width: 100%;
  max-height: calc(100vh - 5rem);
  object-fit: contain;
  background: var(--paper);
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 0;
  background: rgba(244, 236, 224, 0.92);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  width: 42px;
  height: 42px;
  border-radius: 999px;
}
.lightbox-close { top: -0.2rem; right: -0.2rem; }
.lightbox-prev { left: 0.4rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 0.4rem; top: 50%; transform: translateY(-50%); }
.lightbox-counter {
  position: absolute;
  bottom: -1.8rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--paper);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.soon {
  margin-top: 2.5rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-align: center;
  font-style: italic;
}

.bio { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.bio-media { position: relative; }
.bio-media img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
  filter: saturate(0.9);
}
.bio-media::after {
  content: "";
  position: absolute;
  inset: 1.2rem -1.2rem -1.2rem 1.2rem;
  border: 1px solid var(--jute);
  z-index: -1;
}
.bio-text > p { color: var(--ink-soft); margin-bottom: 1.1rem; }
.bio-text > p:first-of-type::first-letter {
  font-family: 'Fraunces', serif;
  font-size: 3.4rem;
  float: left;
  line-height: 0.82;
  padding: 0.18rem 0.6rem 0 0;
  color: var(--ink);
}
.bio h2 { font-size: clamp(2rem, 4vw, 3rem); margin: 0.6rem 0 1.4rem; }
.pull {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.45;
  color: var(--ink);
  border-left: 2px solid var(--jute);
  padding-left: 1.3rem;
  margin: 1.8rem 0 1.4rem;
}
.sign { font-family: 'Fraunces', serif; font-style: italic; font-size: 1.5rem; color: var(--moss); }

.contact { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); }
.big-link {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--jute);
  padding-bottom: 0.2rem;
  transition: color 0.25s;
  word-break: break-word;
}
.big-link:hover { color: var(--jute); }
.rows { margin-top: 2.5rem; }
.rows div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}
.rows span:first-child { color: var(--ink-soft); }
form { display: grid; gap: 1.4rem; }
.field { position: relative; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font: inherit;
  color: var(--ink);
  padding: 0.6rem 0;
  outline: none;
  transition: border-color 0.25s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--jute); }
.field label {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 0.2rem;
}
.send, .btn {
  justify-self: start;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 99px;
  padding: 0.8rem 2rem;
  font: inherit;
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.25s, color 0.25s;
}
.send:hover, .btn:hover { background: transparent; color: var(--ink); }
.btn-outline {
  background: transparent;
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.75rem; }

footer {
  margin-top: clamp(4rem, 8vw, 7rem);
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
}
footer .shell {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.hen { width: 26px; color: var(--jute); }

.flash {
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--jute);
  background: rgba(185, 155, 116, 0.15);
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
}
.flash.error {
  border-color: var(--danger);
  background: rgba(139, 58, 47, 0.08);
  color: var(--danger);
}

/* Admin – fast bredd så layouten inte hoppar mellan sidor */
body.admin-body {
  display: block;
  min-height: 100vh;
}
body.admin-body::after { opacity: 0.25; }
.admin-wrap {
  width: min(1100px, calc(100% - 3rem));
  max-width: 1100px;
  margin: 2rem auto 4rem;
  padding: 0;
  box-sizing: border-box;
}
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.admin-nav { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.admin-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.admin-nav a.active, .admin-nav a:hover { color: var(--ink); }
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
.admin-toolbar p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0;
}
.admin-card {
  width: 100%;
  background: rgba(250, 246, 239, 0.7);
  border: 1px solid var(--line);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-sizing: border-box;
}
.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  min-width: 960px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-table th {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.admin-table col.c-img { width: 72px; }
.admin-table col.c-title { width: 26%; }
.admin-table col.c-cat { width: 14%; }
.admin-table col.c-price { width: 14%; }
.admin-table col.c-status { width: 12%; }
.admin-table col.c-order { width: 120px; }
.admin-table col.c-actions { width: 180px; }
.admin-table img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  display: block;
  background: var(--paper-2);
}
.admin-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.admin-form {
  width: 100%;
  max-width: none;
}
.admin-form .field input,
.admin-form .field textarea,
.admin-form .field select {
  width: 100%;
}
.login-box {
  width: min(1100px, calc(100% - 3rem));
  max-width: 1100px;
  margin: 10vh auto;
  padding: 2.5rem;
  border: 1px solid var(--line);
  background: rgba(250, 246, 239, 0.85);
  box-sizing: border-box;
}
.login-box form {
  max-width: 420px;
}
.login-box h1 { font-size: 2rem; margin: 0.4rem 0 1.5rem; }
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
}
.checkbox-row input { width: auto; }
.help { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.3rem; }
.preview-img {
  max-width: 220px;
  margin-top: 0.8rem;
  border: 1px solid var(--line);
}
.preview-img img { width: 100%; display: block; }

@media (max-width: 860px) {
  :root { --shell: min(1180px, 100% - 2.2rem); }
  .hero, .bio, .contact, .product-layout { grid-template-columns: 1fr; }
  .hero { align-items: start; }
  .hero-media { aspect-ratio: 4/3; border-radius: 8px; }
  .vertical-note { display: none; }
  .ledger { grid-template-columns: 1fr; }
  .ledger article { border-right: 0; border-bottom: 1px solid var(--line); padding: 1.6rem 0; }
  .ledger article:not(:first-child) { padding-left: 0; }
  .bio-media::after { inset: 0.8rem -0.8rem -0.8rem 0.8rem; }
  .head { flex-direction: column; align-items: flex-start; }
  .product-main-shot { aspect-ratio: 4 / 5; max-width: 480px; }
  .product-body { max-width: none; }
  .admin-wrap,
  .login-box {
    width: calc(100% - 2rem);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: none;
  }

  .nav-toggle { display: inline-flex; }
  .topbar-inner {
    flex-wrap: wrap;
    min-height: 64px;
    padding-block: 0.35rem;
  }
  .wordmark { font-size: 1.15rem; }
  .wordmark small { display: none; }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding: 0.4rem 0 1.1rem;
    border-top: 1px solid var(--line);
    animation: rise 0.35s cubic-bezier(.2,.7,.3,1);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.65rem;
    line-height: 1.2;
    color: var(--ink);
    padding: 0.85rem 0.15rem;
    border-bottom: 1px solid var(--line);
  }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav a::after { display: none; }
  .site-nav a.active {
    color: var(--jute);
    font-style: italic;
  }

  body.nav-open {
    overflow: hidden;
  }
}

@media (max-width: 520px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
  }
}
