/* ==========================================================================
   Variabler
   ========================================================================== */

:root {
  --ink: #17202a;
  --muted: #667085;
  --brand: #155eef;
  --brand-dark: #1249bd;
  --surface: #fff;
  --page: #f4f6fa;
  --line: #e4e7ec;
  --accent: #eaf2ff;
  --radius: 18px;
  --shadow: 0 8px 28px rgba(16, 24, 40, .07);
}


/* ==========================================================================
   Base
   ========================================================================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}


/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: auto;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: var(--brand);
  color: white;
  font-size: 2rem;
  font-weight: 850;
  letter-spacing: -2px;
}

.brand-name {
  display: block;
  font-size: 1.65rem;
  line-height: 1.1;
  font-weight: 800;
}

.brand-slogan {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.cart-shortcut {
  text-decoration: none;
  font-weight: 750;
}

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--brand);
}


/* ==========================================================================
   Layout og paneler
   ========================================================================== */

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 44px;
}

.narrow {
  max-width: 850px;
}

.intro {
  margin-bottom: 22px;
}

.intro h1 {
  margin: 0 0 4px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.intro p {
  margin: 0;
  color: var(--muted);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(270px, .9fr);
  gap: 22px;
  align-items: start;
}

.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 22px;
}

.panel h1,
.panel h2 {
  margin-top: 0;
}

.panel h2 {
  font-size: 1.3rem;
}

.eyebrow {
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
  font-weight: 800;
}

.section-title {
  margin: 20px 0 14px;
  font-size: 1.15rem;
}

.section-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 25px 0;
}


/* ==========================================================================
   Produkter
   ========================================================================== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.product-image {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: #f0f4fa;
  color: #98a2b3;
  overflow: hidden;
  text-decoration: none;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-icon {
  font-size: 2.2rem;
}

.product-info {
  padding: 12px;
}

.product-name {
  margin: 0 0 5px;
  font-weight: 700;
  font-size: 1rem;
}

.product-name a {
  text-decoration: none;
}

.product-name a:hover {
  text-decoration: underline;
}

.product-price {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-weight: 800;
}


/* ==========================================================================
   Knapper
   ========================================================================== */

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--brand);
  border-radius: 11px;
  background: var(--brand);
  color: white;
  text-decoration: none;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.button:hover {
  background: var(--brand-dark);
}

.button.secondary {
  color: var(--brand);
  background: white;
}

.button.secondary:hover {
  background: var(--accent);
}

.button.small {
  min-height: 36px;
  padding: 7px 10px;
  font-size: .9rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: #b42318;
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
}


/* ==========================================================================
   Formularer
   ========================================================================== */

.add-form {
  margin-top: 10px;
}

label {
  display: block;
  margin: 12px 0 7px;
  font-weight: 700;
}

input {
  font: inherit;
}

.search-row {
  display: flex;
  gap: 8px;
}

.search-row input {
  min-width: 0;
  width: 100%;
  padding: 12px;
  border: 1px solid #cfd4dc;
  border-radius: 11px;
}

.search-row input:focus,
input:focus {
  outline: 3px solid #c7d7fe;
  border-color: var(--brand);
}

.stack-form {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.stack-form input {
  width: 100px;
  padding: 10px;
  border: 1px solid #cfd4dc;
  border-radius: 8px;
}

.hidden-form {
  display: none;
}


/* ==========================================================================
   Hjælp og kontor
   ========================================================================== */

.help-card {
  margin-top: 22px;
  padding: 16px;
  border-radius: 16px;
  background: var(--accent);
  display: flex;
  align-items: center;
  gap: 14px;
}

.help-card h3 {
  margin: 0 0 4px;
}

.help-card p {
  margin: 0 0 12px;
  color: #475467;
  font-size: .94rem;
}

.bot-avatar {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: white;
  font-size: 2.2rem;
}

.office-link {
  display: flex;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  text-decoration: none;
  font-weight: 750;
}


/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: #111827;
  color: white;
  padding: 25px 16px;
}

.footer-inner {
  width: min(1180px, 100%);
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.footer-links a {
  color: #e5e7eb;
  text-decoration: none;
}

.footer-copy {
  width: 100%;
  margin: 0;
  color: #9ca3af;
  font-size: .85rem;
}


/* ==========================================================================
   Hjælpeklasser og beskeder
   ========================================================================== */

.muted {
  color: var(--muted);
}

.small-text {
  font-size: .88rem;
}

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff4d6;
  color: #704d00;
}

.alert.success {
  background: #e8f7ed;
  color: #166534;
}

.alert.error {
  background: #fee4e2;
  color: #912018;
}


/* ==========================================================================
   Tabeller og kurv
   ========================================================================== */

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

th,
td {
  text-align: left;
  padding: 12px 9px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  font-size: .9rem;
  color: var(--muted);
}

.qty-input {
  width: 76px;
  padding: 8px;
  border: 1px solid #cfd4dc;
  border-radius: 8px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-top: 2px solid var(--line);
  font-size: 1.15rem;
}

.clear-cart {
  margin-top: 18px;
}


/* ==========================================================================
   Produktside
   ========================================================================== */

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.detail-image,
.detail-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  background: #f0f4fa;
}

.detail-placeholder {
  display: grid;
  place-items: center;
  font-size: 4rem;
}

.detail-price {
  font-size: 1.4rem;
}


/* ==========================================================================
   Tilgængelighed
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ==========================================================================
   Responsivt
   ========================================================================== */

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

@media (max-width: 540px) {
  .panel {
    padding: 16px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-detail {
    grid-template-columns: 1fr;
  }

  .search-row {
    flex-direction: column;
  }

  .help-card {
    align-items: flex-start;
  }

  .header-inner {
    min-height: 78px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .brand-name {
    font-size: 1.45rem;
  }

  th,
  td {
    padding: 10px 6px;
  }
}
