/* ==========================================================================
   Havestedet — fælles stylesheet
   Rustik/landlig stil: varme jordfarver, naturmaterialer, hyggelig stemning
   ========================================================================== */

:root {
  --color-cream:      #f7f1e4;
  --color-cream-dark:  #efe4cf;
  --color-brown-dark:  #3f2f22;
  --color-brown:       #6b4a34;
  --color-terracotta:  #c1652f;
  --color-terracotta-dark: #a34f22;
  --color-olive:       #6b7a4f;
  --color-olive-dark:  #55613e;
  --color-cream-text:  #fbf7ee;
  --shadow-soft: 0 6px 20px rgba(63, 47, 34, 0.12);
  --radius: 14px;
  --max-width: 1120px;
  --font-heading: "Fraunces", "Georgia", serif;
  --font-body: "Jost", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-brown-dark);
  background: var(--color-cream);
  line-height: 1.6;
}

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

a {
  color: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--color-brown-dark);
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--color-olive-dark);
  font-weight: 600;
  margin-bottom: 0.6em;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-cream-dark);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-brown-dark);
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-terracotta);
  color: var(--color-cream-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.2rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-brown-dark);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.8rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  border-bottom-color: var(--color-terracotta);
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-cream);
    border-bottom: 1px solid var(--color-cream-dark);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .main-nav.open {
    max-height: 400px;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.5rem 1.5rem;
  }

  .main-nav li {
    border-top: 1px solid var(--color-cream-dark);
  }

  .main-nav a {
    display: block;
    padding: 0.9rem 0;
  }
}

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

.hero {
  padding: 4.5rem 0 4rem;
  background: linear-gradient(180deg, var(--color-cream) 0%, var(--color-cream-dark) 100%);
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 780px) {
  .hero .container {
    grid-template-columns: 1fr;
  }
}

.hero-copy p.lead {
  font-size: 1.15rem;
  color: var(--color-brown);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.6rem;
}

.page-hero {
  padding: 3.2rem 0 2.6rem;
  background: var(--color-cream-dark);
  text-align: center;
}

.page-hero p {
  max-width: 60ch;
  margin: 0 auto;
  color: var(--color-brown);
}

/* ---------- Placeholder image blocks (no real photos yet) ---------- */

.placeholder-img {
  border-radius: var(--radius);
  background: repeating-linear-gradient(
      135deg,
      var(--color-cream-dark),
      var(--color-cream-dark) 12px,
      #e7d9bd 12px,
      #e7d9bd 24px
  );
  border: 1px solid var(--color-cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brown);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
  min-height: 220px;
}

.placeholder-img span {
  background: rgba(247, 241, 228, 0.85);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
}

.hero-image .placeholder-img {
  min-height: 320px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--color-terracotta);
  color: var(--color-cream-text);
}

.btn-primary:hover {
  background: var(--color-terracotta-dark);
}

.btn-secondary {
  background: transparent;
  border-color: var(--color-brown-dark);
  color: var(--color-brown-dark);
}

.btn-secondary:hover {
  background: var(--color-brown-dark);
  color: var(--color-cream-text);
}

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

section {
  padding: 3.6rem 0;
  scroll-margin-top: 84px; /* forhindrer at det sticky menu-bjælke dækker toppen af sektionen ved anker-navigation */
}

.section-alt {
  background: var(--color-cream-dark);
}

.section-heading {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 2.4rem;
}

.section-heading p {
  color: var(--color-brown);
}

/* ---------- Product / feature grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

.card-body {
  padding: 1.4rem 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.card-body h3 {
  margin-bottom: 0.2em;
}

.price {
  font-weight: 600;
  color: var(--color-terracotta-dark);
  margin-top: auto;
}

.badge-unika {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  background: var(--color-olive);
  color: var(--color-cream-text);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

/* ---------- Info / about blocks ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.6rem;
  align-items: center;
}

@media (max-width: 780px) {
  .split { grid-template-columns: 1fr; }
}

.family-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1.6rem;
}

.family-item {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1rem 1.2rem;
  flex: 1 1 140px;
  text-align: center;
  font-weight: 500;
}

/* ---------- Notice / info box ---------- */

.notice {
  background: #fff;
  border-left: 4px solid var(--color-terracotta);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow-soft);
  margin: 2rem 0;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.6rem;
}

@media (max-width: 780px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-info-list {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.contact-info-list li {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 0.9rem 1.1rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.8rem;
}

label {
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--color-cream-dark);
  background: var(--color-cream);
  color: var(--color-brown-dark);
}

input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--color-olive);
  outline-offset: 1px;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.form-note {
  font-size: 0.85rem;
  color: var(--color-brown);
}

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

.site-footer {
  background: var(--color-brown-dark);
  color: var(--color-cream);
  padding: 2.6rem 0 1.6rem;
  margin-top: 3rem;
}

.site-footer a {
  color: var(--color-cream);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 1.6rem;
}

.footer-grid h4 {
  color: var(--color-cream);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-bottom {
  border-top: 1px solid rgba(247, 241, 228, 0.15);
  padding-top: 1.2rem;
  font-size: 0.85rem;
  color: rgba(247, 241, 228, 0.7);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
}

/* ==========================================================================
   Kurv, status-badges, illustrationer, admin — tilføjet til bestillingsflow
   ========================================================================== */

/* ---------- Illustrationer (dansk landstil, ingen fotos endnu) ---------- */

.illustration {
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, #cfe3d8 0%, #e9f0e0 62%, #e9f0e0 100%);
  border: 1px solid var(--color-cream-dark);
  display: flex;
  align-items: flex-end;
  min-height: 220px;
}

.illustration svg {
  width: 100%;
  height: auto;
  display: block;
}

.illustration img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
}

.illustration-note {
  font-size: 0.72rem;
  color: var(--color-brown);
  text-align: center;
  margin-top: 0.4rem;
}

.card-image {
  position: relative;
}

/* ---------- Status badges på varer ---------- */

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

.badge-reserveret {
  background: #e3b23c;
  color: var(--color-brown-dark);
}

.badge-solgt {
  background: #9a9186;
  color: var(--color-cream-text);
}

.badge-ny {
  background: #e3b23c;
  color: var(--color-brown-dark);
}

.badge-sendt {
  background: var(--color-olive);
  color: var(--color-cream-text);
}

.badge-penge_modtaget {
  background: #a9c4d8;
  color: var(--color-brown-dark);
}

.badge-pakkes {
  background: var(--color-terracotta);
  color: var(--color-cream-text);
}

.badge-sendes {
  background: var(--color-brown);
  color: var(--color-cream-text);
}

.badge-afsluttet {
  background: var(--color-olive);
  color: var(--color-cream-text);
}

.badge-annulleret {
  background: #9a9186;
  color: var(--color-cream-text);
}

.order-edit-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.order-edit-form input[type="text"],
.order-edit-form select {
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

.order-edit-form input[type="text"] {
  width: 10rem;
}

.card.is-inactive {
  opacity: 0.72;
}

.card.is-inactive .illustration,
.card.is-inactive img {
  filter: grayscale(45%);
}

/* ---------- Kurv-knap i nav ---------- */

.nav-cart {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-terracotta);
  color: var(--color-cream-text) !important;
  padding: 0.5rem 1rem !important;
  border-radius: 999px;
  border-bottom: none !important;
}

.nav-cart-count {
  background: var(--color-brown-dark);
  color: var(--color-cream-text);
  border-radius: 999px;
  font-size: 0.75rem;
  min-width: 1.4em;
  height: 1.4em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.3em;
}

/* ---------- Mængde-vælger ---------- */

.qty-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.qty-row input[type="number"] {
  width: 4.5rem;
  text-align: center;
}

.add-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.4rem;
}

/* ---------- Kurv-tabel ---------- */

.cart-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.cart-table th,
.cart-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-cream-dark);
}

.cart-table tfoot td {
  font-weight: 700;
  border-bottom: none;
}

.cart-table .remove-btn {
  background: none;
  border: none;
  color: var(--color-terracotta-dark);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.cart-empty {
  text-align: center;
  color: var(--color-brown);
  padding: 2rem 0;
}

/* ---------- Flash-beskeder ---------- */

.flash {
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  font-weight: 500;
}

.flash-success {
  background: #e4ecd8;
  border: 1px solid var(--color-olive);
  color: var(--color-olive-dark);
}

.flash-error {
  background: #f6dede;
  border: 1px solid #c1652f;
  color: var(--color-terracotta-dark);
}

.flash-warning {
  background: #fbeecb;
  border: 1px solid #e3b23c;
  color: #7a5b12;
}

/* ---------- Admin ---------- */

.admin-bar {
  background: var(--color-brown-dark);
  color: var(--color-cream);
  font-size: 0.85rem;
  padding: 0.6rem 0;
}

.admin-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.admin-bar a {
  color: var(--color-cream);
}

.admin-login-wrap {
  max-width: 420px;
  margin: 3rem auto;
}

.admin-section {
  margin-bottom: 3rem;
}

.admin-table-wrap,
.table-scroll {
  overflow-x: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-cream-dark);
  vertical-align: middle;
  font-size: 0.92rem;
}

.admin-table img.thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
}

.admin-thumb-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: var(--color-cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--color-brown);
  text-align: center;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--color-brown-dark);
  background: #fff;
  color: var(--color-brown-dark);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-small:hover {
  background: var(--color-brown-dark);
  color: var(--color-cream-text);
}

.btn-small.danger {
  border-color: var(--color-terracotta-dark);
  color: var(--color-terracotta-dark);
}

.btn-small.danger:hover {
  background: var(--color-terracotta-dark);
  color: #fff;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .admin-form-grid { grid-template-columns: 1fr; }
}

.admin-form-grid .full { grid-column: 1 / -1; }

fieldset {
  border: 1px solid var(--color-cream-dark);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin: 0;
}

legend {
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 0 0.5rem;
}
