:root {
  --cream: #f7f2e9;
  --paper: #fffdf8;
  --ink: #2d2f2b;
  --muted: #6d6f68;
  --moss: #5d6e3f;
  --moss-dark: #485631;
  --rhubarb: #b4474f;
  --line: #e4dccd;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

a { color: inherit; }

h1, h2, h3 { font-weight: 600; line-height: 1.2; margin: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 14px 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--moss-dark);
}

.site-header nav { display: flex; gap: 20px; }
.site-header nav a { text-decoration: none; font-size: 0.95rem; }
.site-header nav a:hover { color: var(--rhubarb); }

/* The hero background is the logo picture's own background colour, so its edges do not show. */
.hero {
  padding: 48px 24px 72px;
  text-align: center;
  background: #f6f0e8;
}

.hero-logo { display: block; width: min(440px, 100%); height: auto; margin: 0 auto 24px; }
.hero h1 { font-size: clamp(1.4rem, 4vw, 2rem); color: var(--moss-dark); }
.hero p { max-width: 560px; margin: 16px auto 28px; color: var(--muted); font-size: 1.1rem; }

.button {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--moss);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--moss-dark); }
.button.small { padding: 9px 18px; font-size: 0.9rem; }

.section { max-width: 1120px; margin: 0 auto; padding: 64px 24px; }
.section.narrow { max-width: 680px; }
.section h2 { font-size: 1.8rem; margin-bottom: 20px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }

.chip {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.chip:hover { border-color: var(--moss); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 32px 24px;
}

.card { display: flex; flex-direction: column; align-items: flex-start; }
.card-linked { outline: 2px solid var(--rhubarb); outline-offset: 8px; border-radius: 8px; }
.card-link { display: block; width: 100%; height: 100%; }
.card-name a { text-decoration: none; }
.card-name a:hover { color: var(--rhubarb); }
.card p { margin: 0; }

/* The picture's 3:4 window (WINDOW_ASPECT in frame.js); the picture inside is framed by frame.js. */
.card-frame {
  position: relative; /* for the arrows and counter of an item with several pictures */
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 14px;
  background: var(--paper);
}

.card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-arrow {
  position: absolute;
  z-index: 1;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0 0 3px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.85);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.card-arrow.previous { left: 8px; }
.card-arrow.next { right: 8px; }
.card-counter {
  position: absolute;
  z-index: 1;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(45, 47, 43, 0.7);
  color: #fff;
  font-size: 0.75rem;
}

/* An item's video (app.js): over the picture, shown once it plays while the mouse is on the card. */
.card-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none; /* clicks reach the picture's link and arrows */
}
.card-playing .card-video { opacity: 1; }
.card-video-badge {
  position: absolute;
  z-index: 1;
  left: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(45, 47, 43, 0.7);
  color: #fff;
  font-size: 0.75rem;
  pointer-events: none;
}

.card-category { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.card-name { font-size: 1.1rem; margin-top: 2px; }
.card-description { color: var(--muted); font-size: 0.92rem; margin-top: 4px !important; }
.card-price { font-weight: 600; margin: 8px 0 12px !important; }
.card .button { margin-top: auto; }

.order { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 64px; }
.order ol { padding-left: 20px; margin: 0 0 24px; }
.order li { margin-bottom: 6px; }

.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 4px; font-weight: 600; font-size: 0.95rem; }
.form label[hidden] { display: none; }
.form input, .form textarea, .form select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  font: inherit;
}
.form-actions { display: flex; align-items: center; gap: 12px; }
.form .button { border: 0; cursor: pointer; }
.form .button:disabled { opacity: 0.6; cursor: default; }
/* The same 3:4 window as .card-frame; the picture inside is framed by frame.js and dragged. */
.preview {
  justify-self: start;
  width: 240px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--line); /* an outline that takes no room from the window */
  background: var(--paper);
  cursor: grab;
  touch-action: none; /* a finger drags the picture instead of scrolling the page */
}
.preview:active { cursor: grabbing; }
.preview img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-select: none; }
.picture-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.picture-picker .field-label { flex-basis: 100%; font-weight: 600; font-size: 0.95rem; }
.picture-picker .chip:disabled { opacity: 0.4; cursor: default; }
.picture-count { color: var(--muted); font-size: 0.9rem; }
/* The video as on the site's cards: the same 3:4 window, filled. */
.video-preview { justify-self: start; width: 240px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; background: var(--ink); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -4px; }
.thumbs[hidden] { display: none; }
.thumb {
  width: 48px;
  aspect-ratio: 3 / 4;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 6px;
  background: var(--paper);
  cursor: pointer;
}
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-pressed="true"] { border-color: var(--ink); }
.frame-controls .chip:disabled { opacity: 0.4; cursor: default; }
.frame-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: -4px; color: var(--muted); font-size: 0.9rem; }
.frame-controls[hidden] { display: none; }
.form .frame-controls label { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.suggest { display: grid; justify-items: start; gap: 8px; margin-top: -4px; }
.suggest-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.form .suggest-controls select { padding: 6px 12px; border-radius: 999px; font-size: 0.9rem; }
.suggestions { display: grid; gap: 8px; color: var(--muted); font-size: 0.9rem; }
.suggestion-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.suggestion-row span { min-width: 4.5em; }
.standard-texts { margin-top: -4px; color: var(--muted); font-size: 0.9rem; }
.standard-texts .chip { text-align: left; }

.admin-list-heading { margin-top: 48px; }
.admin-items { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
/* Picture on the left; name and details, then the buttons on a line of their own, beside it. */
.admin-items li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 8px 12px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.admin-items .item-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.admin-items .item-actions .chip { padding: 5px 12px; font-size: 0.85rem; }
.list-status { color: var(--muted); min-height: 1.6em; margin: 0 0 12px; }
.admin-items li > img { grid-row: span 2; width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.place-icon { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; border-radius: 3px; }
.admin-items .item-text { display: grid; }
/* Hidden on the site: greyed out here, its buttons still usable. */
.admin-items .item-hidden > img,
.admin-items .item-hidden .item-text { opacity: 0.5; }
.admin-items small { color: var(--muted); }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 28px 24px;
  background: var(--ink);
  color: #e9e5dc;
  font-size: 0.95rem;
}

/* An item's own page (vara.html): pictures on the left, text on the right; one column on phones. */
.item-page { max-width: 1040px; }
.back { margin: 0 0 24px; }
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { color: var(--rhubarb); }
.item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 48px; align-items: start; }
@media (max-width: 760px) { .item { grid-template-columns: 1fr; } }
.item-pictures .card-frame { margin-bottom: 12px; border-radius: 10px; }
.item-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.item-thumb {
  width: 64px;
  aspect-ratio: 3 / 4;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 6px;
  background: var(--paper);
  cursor: pointer;
}
.item-thumb img { display: block; width: 100%; height: 100%; }
.item-thumb[aria-pressed="true"] { border-color: var(--ink); }
/* The whole video, in the pictures' 3:4 window. */
.item-video { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: contain; margin-top: 12px; border-radius: 10px; background: var(--ink); }
.item-video[hidden] { display: none; }
.item-info h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 4px 0 8px; }
.item-price { font-size: 1.2rem; font-weight: 600; margin: 0 0 16px; }
.item-description { margin: 0 0 24px; }
.item-note { color: var(--muted); font-size: 0.9rem; margin: 12px 0 0; }
.item-elsewhere { margin: 24px 0 0; color: var(--muted); }
.item-about { max-width: 680px; margin-top: 56px; }
.item-about h2 { font-size: 1.4rem; margin-bottom: 12px; }
.item-missing { font-size: 1.1rem; }

/* Om oss (om-oss.html). */
.about-page h1 { font-size: 1.8rem; margin-bottom: 20px; }
.about-picture { display: block; width: 100%; height: auto; border-radius: 10px; margin-bottom: 24px; }
.about-page p { margin: 0 0 16px; }

/* "Hitta oss på" in the footer: light links with the platforms' logos. */
.footer-follow a { color: inherit; }
.footer-follow .place-icon { vertical-align: -2px; }
