/* Grallaragerðin: a side column with the name, the menu, search and cart
   (a bar at the top on a phone); products in a plain grid; one typeface, no
   rounded corners on pictures. The sizes are the old site's, one for one. */
@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&display=swap");

:root {
  --color-ink: #181014;
  --color-bg: #ffffff;
  --color-soft: #f2f2f2;
  --color-rule: #e0e0e0;
  --color-button: #111111;
  --color-button-hover: #0e0e0e;
  --font-body: Archivo, ui-sans-serif, system-ui, sans-serif;

  /* The ink at the strengths the old site used. */
  --ink-80: color-mix(in srgb, var(--color-ink) 80%, transparent);
  --ink-75: color-mix(in srgb, var(--color-ink) 75%, transparent);
  --ink-70: color-mix(in srgb, var(--color-ink) 70%, transparent);
  --ink-60: color-mix(in srgb, var(--color-ink) 60%, transparent);
  --ink-50: color-mix(in srgb, var(--color-ink) 50%, transparent);
  --ink-15: color-mix(in srgb, var(--color-ink) 15%, transparent);
  --ink-10: color-mix(in srgb, var(--color-ink) 10%, transparent);

  /* The shop controls (cart, search, buy button). */
  --kp-accent: var(--color-button);
  --kp-accent-ink: #fff;
  --kp-surface: var(--color-bg);
  --kp-ink: var(--color-ink);
  --kp-radius: 999px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--color-bg); color: var(--color-ink); font-family: var(--font-body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 400; margin: 0; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* --- Cart and search buttons ----------------------------------------------- */
.kp-cart-button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid var(--ink-15);
  background: transparent; color: var(--color-ink);
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 500;
  transition: border-color 0.15s, color 0.15s;
}
.kp-cart-button:hover { border-color: var(--color-button); color: var(--color-button-hover); }
.kp-count { background: var(--color-button); color: #fff; font-size: 0.7rem; }
.kp-count[data-count="0"] { display: none; }

/* --- On a phone: a bar at the top, the menu under it ----------------------- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--color-bg); border-bottom: 1px solid var(--ink-10); }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 1rem; }
.topbar-brand { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; line-height: 1.25rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.topbar-tools { display: flex; flex-shrink: 0; align-items: center; gap: 0.25rem; }
.icon-button { padding: 0.5rem; display: inline-flex; color: var(--color-ink); }
.search-open.icon-button { color: var(--ink-60); }
.search-open.icon-button:hover { color: var(--color-ink); }

.menu-panel { display: none; border-top: 1px solid var(--ink-10); padding: 0.5rem 1rem; }
.menu-panel a { display: block; padding: 0.625rem 0; font-size: 0.875rem; line-height: 1.25rem; color: var(--ink-80); transition: color 0.15s; }
.menu-panel a:hover { color: var(--color-ink); }
.menu-panel.open { display: block; }
.menu-open .icon-close, .menu-open[aria-expanded="true"] .icon-bars { display: none; }
.menu-open[aria-expanded="true"] .icon-close { display: block; }

.side { display: none; }

/* --- From 768px: the side column ------------------------------------------- */
@media (min-width: 768px) {
  .topbar, .menu-panel, .menu-panel.open { display: none; }
  body { padding-left: 14rem; }
  .side { display: block; position: fixed; left: 0; top: 0; bottom: 0; width: 14rem; overflow-y: auto; z-index: 30; }
  .side-inner { display: flex; flex-direction: column; gap: 2.5rem; min-height: 100%; padding: 2rem; background: var(--color-bg); }
  .brand span { display: block; font-size: 1rem; line-height: 1.3; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
  .side-nav { display: flex; flex-direction: column; gap: 0.55rem; }
  .side-nav a { font-size: 0.875rem; line-height: 1.25rem; color: var(--ink-70); }
  .side-tools { margin-top: auto; display: flex; flex-direction: column; gap: 0.7rem; align-items: flex-start; }
  .search-word { font-size: 0.875rem; line-height: 1.25rem; opacity: 0.6; }
  .search-word:hover { opacity: 1; }
}
@media (min-width: 1024px) {
  body { padding-left: 16rem; }
  .side { width: 16rem; }
}
/* The thank-you page after paying has no side column. */
body:has(.kp-success) { padding-left: 0; }

/* --- Search, opened from "Leita" ------------------------------------------- */
.search-pages { display: none; }
.search-overlay { display: none; position: fixed; inset: 0; z-index: 50; align-items: flex-start; justify-content: center; padding: 10vh 1rem 0; background: color-mix(in srgb, var(--color-ink) 40%, transparent); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.search-overlay.open { display: flex; }
.search-box { width: 100%; max-width: 36rem; overflow: hidden; border-radius: 1rem; background: var(--color-bg); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--ink-10); }
.search-field { display: flex; align-items: center; gap: 0.75rem; padding: 0 1rem; border-bottom: 1px solid var(--color-rule); }
.search-field svg { flex-shrink: 0; color: color-mix(in srgb, var(--color-ink) 40%, transparent); }
.search-field input { width: 100%; padding: 1rem 0; border: 0; background: transparent; font: inherit; font-size: 1rem; line-height: 1.5rem; color: var(--color-ink); outline: none; -webkit-appearance: none; appearance: none; }
.search-field input::placeholder { color: color-mix(in srgb, var(--color-ink) 40%, transparent); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-field kbd { display: none; flex-shrink: 0; padding: 0.125rem 0.375rem; border: 1px solid var(--color-rule); border-radius: 0.25rem; font: inherit; font-size: 10px; font-weight: 500; color: color-mix(in srgb, var(--color-ink) 40%, transparent); }
@media (min-width: 640px) { .search-field kbd { display: inline; } }
.search-results { max-height: 55vh; overflow-y: auto; }
.search-results ul { padding: 0.5rem 0; }
.search-results a { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 1rem; }
.search-results a.active { background: color-mix(in srgb, var(--color-button) 10%, transparent); }
.search-thumb { width: 2.5rem; height: 2.5rem; flex-shrink: 0; border-radius: 0.25rem; object-fit: cover; }
.search-thumb-empty { display: flex; align-items: center; justify-content: center; background: var(--color-soft); color: color-mix(in srgb, var(--color-ink) 30%, transparent); }
.search-text { min-width: 0; flex: 1; }
.search-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.search-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.75rem; line-height: 1rem; color: color-mix(in srgb, var(--color-ink) 55%, transparent); }
.search-badge { flex-shrink: 0; padding: 0.125rem 0.5rem; border-radius: 999px; background: var(--color-soft); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.025em; color: var(--ink-50); }
.search-message { padding: 2.5rem 1rem; text-align: center; font-size: 0.875rem; line-height: 1.25rem; color: var(--ink-50); }
.search-hints { display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; padding: 0.5rem 1rem; border-top: 1px solid var(--color-rule); font-size: 11px; color: color-mix(in srgb, var(--color-ink) 40%, transparent); }

/* --- Product grids ---------------------------------------------------------- */
.grid-section { padding: 6rem 1.5rem; max-width: 80rem; margin: 0 auto; width: 100%; }
.grid-head { margin-bottom: 3.5rem; max-width: 42rem; }
.eyebrow { margin-bottom: 0.75rem; font-size: 0.75rem; line-height: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.25em; color: var(--color-button); }
.grid-head h2 { font-size: 2.25rem; line-height: 2.5rem; letter-spacing: -0.025em; }
.grid { display: grid; gap: 3rem 2rem; }
.grid > li { display: flex; flex-direction: column; min-width: 0; }
.grid .empty { color: var(--ink-70); }
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-head h2 { font-size: 3rem; line-height: 1; }
}
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.card-link { display: flex; flex-direction: column; }
.card-image { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--color-soft); }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card-link:hover .card-image img { transform: scale(1.05); }
.card-name { margin-top: 1rem; font-size: 1.125rem; line-height: 1.75rem; transition: color 0.15s; }
.card-link:hover .card-name { color: var(--color-button-hover); }
.card-price { margin-top: 0.25rem; font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; }

/* The fuller card on the category pages. */
.grid-full .card-name { margin-top: 1.25rem; font-size: 1.25rem; line-height: 1.75rem; }
.card-text { margin-top: 0.5rem; font-size: 0.875rem; line-height: 1.625; color: var(--ink-70); }
.card-text p + p { margin-top: 0.75rem; }
.card-text a, .prose a { text-decoration: underline; text-underline-offset: 2px; }
.card-foot { margin-top: auto; padding-top: 1.25rem; display: flex; align-items: flex-end; justify-content: space-between; }
.card-foot .card-price { margin: 0; font-size: 1rem; line-height: 1.5rem; }
.card-foot .kp-add {
  padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid var(--color-button);
  background: transparent; color: var(--color-button-hover);
  font-size: 0.75rem; line-height: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.card-foot .kp-add:hover { background: var(--color-button); color: #fff; }
.sold { color: var(--ink-70); font-size: 0.875rem; }

/* --- One product ------------------------------------------------------------ */
.product { max-width: 80rem; margin: 0 auto; width: 100%; padding: 3rem 1.5rem 0; }
.crumbs { margin-bottom: 2rem; font-size: 0.75rem; line-height: 1rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--ink-50); }
.crumbs a:hover { color: var(--color-button-hover); }
.crumb-sep { padding: 0 0.5rem; }
.crumb-here { color: var(--ink-80); }
.product-grid { display: grid; gap: 3rem; }
.product-media { overflow: hidden; background: var(--color-soft); }
.product-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.product-media img + img { margin-top: 0.75rem; }
.product-info { display: flex; flex-direction: column; }
.product-info h1 { font-size: 2.25rem; line-height: 2.5rem; letter-spacing: -0.025em; }
.product-price { margin-top: 1.5rem; font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; }
.prose { margin-top: 1.5rem; font-size: 1rem; line-height: 1.625; color: var(--ink-75); }
.prose p + p { margin-top: 0.75rem; }
.product-buy { margin-top: 2rem; }
.product-buy .kp-add {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.875rem 2rem; border-radius: 999px; border: 0;
  background: var(--color-button); color: #fff;
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; letter-spacing: 0.025em;
  transition: background 0.15s;
}
.product-buy .kp-add:hover { background: var(--color-button-hover); }
@media (min-width: 640px) { .product-info h1 { font-size: 3rem; line-height: 1; } }
@media (min-width: 768px) {
  .product { padding-top: 4rem; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-media { order: 2; }
}

/* The extra pictures again, whole, under the product (as the old site had them). */
.product-more-pictures { margin: 1.5rem 0 0 auto; padding-bottom: 2.5rem; width: 47.8%; display: flex; flex-direction: column; gap: 1rem; }
.product-more-pictures img { width: 100%; }

/* The pictures of one product, as a carousel once theme.js has run. */
.gallery-stage { position: relative; }
.gallery-stage > img { cursor: zoom-in; }
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.75rem; height: 2.75rem; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.9); color: var(--color-ink);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--ink-10);
  transition: background 0.15s, color 0.15s;
}
.gallery-arrow:hover { background: var(--color-button); color: #fff; }
.gallery-prev { left: 0.75rem; }
.gallery-next { right: 0.75rem; }
.gallery-count { position: absolute; right: 0.75rem; bottom: 0.75rem; padding: 0.25rem 0.75rem; border-radius: 999px; background: color-mix(in srgb, var(--color-ink) 65%, transparent); color: #fff; font-size: 0.75rem; line-height: 1rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.gallery-thumbs { display: flex; gap: 0.5rem; overflow-x: auto; margin-top: 0.75rem; padding: 0.25rem; }
.gallery-thumbs button { width: 4rem; height: 4rem; flex-shrink: 0; overflow: hidden; border-radius: 0.5rem; border: 2px solid transparent; opacity: 0.7; transition: opacity 0.15s; }
.gallery-thumbs button:hover { opacity: 1; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--color-button); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; margin: 0 !important; }
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, 0.9); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox img { max-width: 95vw; max-height: 95vh; object-fit: contain; }

/* --- Related products ------------------------------------------------------- */
.related { max-width: 80rem; margin: 5rem auto 0; padding: 4rem 1.5rem 3rem; width: 100%; position: relative; }
.related::before { content: ""; position: absolute; top: 0; left: 1.5rem; right: 1.5rem; border-top: 1px solid var(--color-rule); }
.related h2 { font-size: 1.875rem; line-height: 2.25rem; letter-spacing: -0.025em; }
.related .grid { margin-top: 2.5rem; gap: 2.5rem 2rem; }
@media (min-width: 1024px) { .related .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* --- Text ------------------------------------------------------------------- */
.text { max-width: 48rem; margin: 0 auto; width: 100%; padding: 4rem 1.5rem; }
.text h1 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 700; letter-spacing: -0.025em; }
.text .prose { margin-top: 2rem; }
.text .prose p + p { margin-top: 1.5rem; }
.text .prose a { text-decoration: none; color: var(--color-ink); }
@media (min-width: 640px) { .text h1 { font-size: 2.25rem; line-height: 2.5rem; } }
@media (min-width: 768px) { .text { padding: 6rem 1.5rem; } }

/* --- Footer ----------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--ink-15); }
.site-footer-inner { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; justify-content: space-between; align-items: baseline; padding: 2.5rem 1.5rem; }
.footer-note { font-size: 0.75rem; line-height: 1rem; color: var(--ink-50); }
@media (min-width: 768px) { .site-footer-inner { padding: 2.5rem; } }
