:root {
  --bg: #f7f2ea;
  --surface: #fffdf8;
  --ink: #221d18;
  --muted: #6f655a;
  --line: #e6dccd;
  --accent: #a85f24;
  --accent-dark: #8a4c1a;
  --badge: #a03c2f;
  --shadow: 0 6px 18px rgba(34, 29, 24, 0.08);
  --radius: 10px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: min(100% - 2.5rem, 1100px);
  margin-inline: auto;
}

/* ---------------- Header / nav ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 242, 234, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.3px;
  display: inline-flex;
  align-items: center;
}

.brand__logo {
  height: 44px;
  width: auto;
  display: block;
}

@media (max-width: 520px) {
  .brand__logo {
    height: 34px;
  }
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent-dark);
}

.site-nav a[hidden] {
  display: none;
}

/* ---------------- Hero ---------------- */

.hero {
  padding: 4.5rem 0 3rem;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 0.6rem;
}

.tagline {
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  max-width: 46ch;
  margin: 0 auto;
}

/* ---------------- Sections ---------------- */

.section {
  padding: 3rem 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  margin: 0 0 0.4rem;
}

.section-intro {
  color: var(--muted);
  max-width: 65ch;
  margin: 0 0 2rem;
}

/* ---------------- Guitar grid / cards ---------------- */

.guitar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 1.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card__media {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: #ece4d6;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
  width: 100%;
}

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__img.is-broken {
  display: none;
}

.card--sold .card__img {
  opacity: 0.55;
  filter: grayscale(0.7);
}

.card__badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--badge);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.1rem 1.2rem;
  flex: 1;
}

.card__name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin: 0;
}

.card__price {
  color: var(--accent-dark);
  font-weight: 600;
  margin: 0;
}

.card--sold .card__price {
  color: var(--muted);
  text-decoration: line-through;
}

.card__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-block;
  flex: 1;
  text-align: center;
  padding: 0.55rem 0.9rem;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--accent-dark);
}

/* ---------------- Logo options (Egen logga) ---------------- */

.logo-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.logo-option {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.logo-option__box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 1rem;
  background: #fff;
  border-radius: calc(var(--radius) - 3px);
  border: 1px solid var(--line);
}

.logo-option__box img {
  max-width: 100%;
  height: auto;
  max-height: 110px;
}

.logo-option figcaption {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.logo-option figcaption strong {
  color: var(--ink);
  font-size: 1.05rem;
}

/* ---------------- Building process ---------------- */

.building-section + .building-section {
  margin-top: 2.5rem;
}

.building-section h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin: 0 0 0.3rem;
}

.building-section p {
  color: var(--muted);
  max-width: 70ch;
  margin: 0 0 1.25rem;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
  gap: 0.9rem;
}

.thumb {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: #ece4d6;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  cursor: zoom-in;
  width: 100%;
}

.thumb__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb__img.is-broken {
  display: none;
}

/* ---------------- Recently sold (details) ---------------- */

#nyligen-salda[hidden] {
  display: none;
}

.details-recently {
  padding: 0;
}

.details-recently summary {
  list-style: none;
  cursor: pointer;
  padding: 2.2rem 0 1.6rem;
  border-top: 1px solid var(--line);
}

.details-recently summary::-webkit-details-marker {
  display: none;
}

.details-recently summary h2 {
  display: inline;
  margin: 0;
}

.details-recently summary::after {
  content: "\25be";
  margin-left: 0.6rem;
  color: var(--accent);
}

.details-recently[open] summary::after {
  content: "\25b4";
}

.details-recently .container {
  padding-bottom: 3rem;
}

/* ---------------- Contact ---------------- */

.section-contact {
  background: var(--surface);
}

.contact-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact-list a {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent-dark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.contact-list a:hover,
.contact-list a:focus-visible {
  border-bottom-color: var(--accent);
}

/* ---------------- Footer ---------------- */

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------------- Error banner ---------------- */

.error-banner {
  padding: 1rem 1.2rem;
  border: 1px solid var(--badge);
  border-radius: 8px;
  background: #fdf3f0;
  color: var(--badge);
  max-width: 65ch;
}

/* ---------------- Lightbox ---------------- */

body.has-lightbox {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 12, 10, 0.94);
  padding: 1.5rem;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__frame {
  margin: 0;
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.lightbox__img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox__caption {
  color: #d9d2c8;
  text-align: center;
  font-size: 0.95rem;
}

.lightbox__counter {
  position: absolute;
  top: 1.1rem;
  right: 1.3rem;
  color: #b3a99c;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  border: 0;
  background: transparent;
  color: #f7f2ea;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
}

.lightbox__close {
  top: 0.8rem;
  left: 1rem;
  font-size: 2.2rem;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.4rem;
}

.lightbox__nav--prev {
  left: 0.6rem;
}

.lightbox__nav--next {
  right: 0.6rem;
}

.lightbox__close:hover,
.lightbox__nav:hover,
.lightbox__close:focus-visible,
.lightbox__nav:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

.lightbox__nav[disabled] {
  opacity: 0.4;
  cursor: default;
}

/* ---------------- Small screens ---------------- */

@media (max-width: 560px) {
  .header-inner {
    justify-content: center;
    text-align: center;
  }

  .section {
    padding: 2.25rem 0;
  }

  .card__actions {
    flex-direction: column;
  }
}