:root {
  --ink: #1c1c1c;
  --text: #212529;
  --muted: #555555;
  --line: #cccccc;
  --nav: #efefef;
  --search-btn: #6c757d;
  --white: #ffffff;
  --max: 1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--white);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; object-fit: cover; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: #000; }
h1, h2, h3 { font-weight: 500; color: var(--ink); }
.container { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.skip-link {
  position: absolute; left: -999px; top: 8px;
}
.skip-link:focus { left: 8px; background: #fff; padding: 8px; z-index: 100; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0);
}

/* Header */
.site-header { background: #fff; padding: 8px 0; }
.header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 0 16px;
}
.site-logo img { width: 90px; height: 90px; object-fit: contain; }
.header-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; margin-top: 4px; }
.utility-nav { display: flex; align-items: center; gap: 18px; }
.utility-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14.4px;
  background: none;
  border: 0;
  padding: 0;
  cursor: default;
}
a.utility-item { cursor: pointer; }
.utility-item svg { display: block; }
.utility-caret { font-size: 10px; color: var(--muted); }
.cart-count {
  display: inline-flex; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--ink); color: #fff; font-size: 10px;
  align-items: center; justify-content: center;
}
.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  color: var(--ink);
}

/* Search */
.site-search { display: flex; width: min(351px, 100%); }
.site-search input {
  flex: 1;
  height: 38px;
  border: 1px solid #ced4da;
  border-right: 0;
  padding: 6px 12px;
  font: inherit;
  border-radius: 4px 0 0 4px;
}
.site-search button {
  width: 50px;
  height: 38px;
  border: 1px solid var(--search-btn);
  background: var(--search-btn);
  color: #fff;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main nav — gray bar like the old shop */
.main-nav { background: var(--nav); }
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  min-height: 55px;
  align-items: stretch;
}
.nav-list li { display: flex; }
.nav-list a {
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--muted);
  font-size: 16px;
  line-height: 55px;
  border-bottom: 6px solid transparent;
}
.nav-list .current-menu-item a,
.nav-list .current_page_item a,
.nav-list a:hover {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--line);
}

/* Product category filter under Produkter */
.product-filter { background: #fff; }
.product-filter .container { padding-top: 10px; padding-bottom: 10px; }
.product-filter-list {
  list-style: none;
  margin: 0;
  padding: 6px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid #e4e4e4;
  border-radius: 4px;
  background: #fafafa;
}
.product-filter-item { position: relative; }
.product-filter-item > a {
  display: block;
  padding: 8px 14px;
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}
.product-filter-item.is-active > a,
.product-filter-item > a:hover {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
}
.product-filter-sublist {
  list-style: none;
  margin: 8px 0 0;
  padding: 4px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid #e4e4e4;
  border-radius: 4px;
  background: #fff;
}
.product-filter-subitem a {
  display: block;
  padding: 6px 12px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .02em;
  text-decoration: none;
}
.product-filter-subitem.is-active a,
.product-filter-subitem a:hover {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
}

/* Pages */
.page-wrap { padding: 32px 0 64px; min-height: 40vh; }
.content-page h1 { font-size: 2rem; font-weight: 500; margin: 0 0 16px; }
.entry-content p { max-width: 42em; }

/* Homepage */
.home-hero { height: min(70vw, 700px); overflow: hidden; }
.home-hero img { width: 100%; height: 100%; object-fit: cover; }
.home-section {
  display: flex;
  flex-direction: column-reverse;
  margin-top: 50px;
}
.home-section-img { height: 400px; }
.home-section-img img { width: 100%; height: 100%; }
.home-section-text {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-end;
  margin: 0 20px 20px;
}
.home-section-text p { font-weight: 500; font-size: 1.25rem; width: 100%; }
.home-section-text h2 {
  font-weight: 500;
  font-size: 3.5em;
  margin: 0 0 20px;
  width: 100%;
}
.text-link {
  display: inline-block;
  font-weight: 300;
  font-size: x-large;
  color: #000;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
  padding: 4px 0;
  margin-top: 12px;
}
.text-link.light { color: #fff; border-color: #fff; }

.home-gallery { margin-top: 50px; }
.home-gallery-row { display: flex; flex-direction: column; gap: 8px; }
.home-gallery-row img { width: 100%; height: 400px; }

.home-collection {
  position: relative;
  height: min(70vw, 700px);
  margin-top: 50px;
  overflow: hidden;
}
.home-collection img { width: 100%; height: 100%; object-fit: cover; }
.home-collection-text {
  position: absolute;
  top: 50px;
  left: 20px;
}
.home-collection-text h2 {
  color: #fff;
  font-weight: 500;
  font-size: 2.5em;
  text-shadow: 2px 2px 5px #000;
  margin: 0 0 20px;
}

@media (min-width: 768px) {
  .home-section { flex-direction: row; }
  .home-section > div { width: 50%; }
  .home-gallery-row { flex-direction: row; justify-content: space-between; gap: 0; }
  .home-gallery-row img { width: 32%; height: 300px; }
  .home-collection-text { left: 40px; top: 50%; transform: translateY(-50%); }
}
@media (min-width: 992px) {
  .home-section, .home-gallery { width: 85vw; margin-left: auto; margin-right: auto; }
  .home-section-img { height: 500px; }
  .home-section-text { margin: 0 30px 50px; }
  .home-section-text h2 { font-size: 5em; }
  .home-section-text p { max-width: 50%; }
  .home-gallery-row img { height: 400px; }
  .home-collection-text h2 { font-size: 5em; }
}
@media (min-width: 1200px) {
  .home-section-img { height: 600px; }
  .home-gallery-row img { height: 500px; }
}

/* WooCommerce */
.shop-wrap .woocommerce-products-header__title,
.shop-wrap .page-title { font-weight: 500; }
ul.products { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 24px; list-style: none; padding: 0; margin: 24px 0; }
ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; }
ul.products li.product a { color: var(--ink); }
ul.products li.product img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #f6f6f6; }
ul.products .woocommerce-loop-product__title { font-size: 1rem; font-weight: 400; margin: 8px 0 4px; }
.price { color: var(--muted); }
.button, .woocommerce a.button, .woocommerce button.button {
  background: var(--search-btn) !important;
  color: #fff !important;
  border-radius: 4px !important;
  border: 0 !important;
}
@media (min-width: 768px) {
  ul.products { grid-template-columns: repeat(4, 1fr); }
}

/* Parent category = family grid like the old shop */
.kh-family-grid ul.products::before,
.kh-family-grid ul.products::after {
  display: none !important;
  content: none !important;
}
.kh-family-grid ul.products {
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 600px) {
  .kh-family-grid ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .kh-family-grid ul.products { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
.woocommerce.kh-family-grid ul.products.kh-family-cards {
  align-items: stretch;
}
.woocommerce.kh-family-grid ul.products.kh-family-cards li.product-category {
  height: auto;
}
.woocommerce.kh-family-grid ul.products li.product-category a,
.kh-family-grid ul.products li.product-category a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  height: 100%;
  min-height: 14.5em;
  padding: 12px 16px 48px;
  border: 1px solid #ececec;
  border-radius: 4px;
  background: #fff;
  text-decoration: none;
}
.kh-family-grid ul.products li.product-category a:hover {
  border-color: #ddd;
}
/* Beat Woo `.woocommerce ul.products li.product a img { height: auto }` so cards stay equal like the old shop (.card-img-top { height: 10em; object-fit: contain }). */
.woocommerce.kh-family-grid ul.products li.product-category a img,
.kh-family-grid ul.products li.product-category img {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: 10em !important;
  max-height: 10em;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center;
  background: #fff;
}
.kh-family-grid ul.products li.product-category .woocommerce-loop-category__title {
  position: absolute;
  left: 16px;
  bottom: 14px;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--ink);
}
.kh-family-grid ul.products:not(.kh-family-cards),
.kh-family-grid .woocommerce-result-count,
.kh-family-grid .woocommerce-ordering,
.kh-family-grid .woocommerce-pagination {
  display: none !important;
}

/* Footer */
.site-footer { margin: 50px 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 50px; }
.footer-links { list-style: none; margin: 0; padding: 0; line-height: 2rem; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--ink); }

.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 36px;
  height: 36px;
  background: #4a4a4a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; }

@media (max-width: 767px) {
  .header-inner { align-items: center; }
  .header-tools { display: none; }
  .menu-toggle { display: block; margin-left: auto; }
  .main-nav { display: none; }
  .main-nav.is-open { display: block; }
  .nav-list { flex-direction: column; min-height: 0; }
  .nav-list a { line-height: 44px; }
  .product-filter-item > a { padding: 8px 10px; font-size: 14px; }
}

/* Undersidor — samma sektioner som den gamla shopen */
.landing { overflow: hidden; }
.entry-content .header,
.landing .header {
  height: min(70vw, 700px);
  position: relative;
  overflow: hidden;
}
.entry-content .header img,
.landing .header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.entry-content .header h1,
.landing .header h1 {
  position: absolute;
  bottom: 20px;
  left: 20px;
  font-weight: 500;
  font-size: 2em;
  text-shadow: 2px 2px 5px #000;
  max-width: 80%;
  margin: 0;
}
@media (min-width: 992px) {
  .entry-content .header h1,
  .landing .header h1 {
    font-size: 4em;
    bottom: 30px;
    left: 30px;
  }
}
.section {
  display: flex;
  flex-direction: column-reverse;
  margin-top: 50px;
}
.section-img { height: 400px; }
.section-img img { width: 100%; height: 100%; object-fit: cover; }
.section-text {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-end;
  margin: 0 20px 20px;
}
.section-text p { font-weight: 500; font-size: 1.25rem; width: 100%; }
.section-text h2 {
  font-weight: 500;
  font-size: 3.5em;
  margin: 0 0 20px;
  width: 100%;
}
.section-text blockquote {
  margin: 0;
  font-weight: 500;
}
.section-reverse { flex-direction: column-reverse; }
.section-center-text {
  text-align: center;
  margin: 50px 20px 0;
}
.section-center-text p { font-weight: 500; }
.img-section-2 { margin-top: 50px; }
.img-row-2 { display: flex; flex-direction: column; gap: 8px; }
.img-row-2 img { width: 100%; height: 400px; object-fit: cover; }
.simple-section-text { margin: 50px 20px 0; }
.simple-section-text p { font-weight: 500; font-size: 1.25rem; }
.image-section { height: 250px; margin: 20px; }
.image-section img { width: 100%; height: 100%; object-fit: cover; }
.contacts { margin-top: 50px; }
.contacts h2 { font-size: 2em; margin: 0 20px 20px; }
.contact { margin: 0 20px 30px; }
.contact h3 { margin: 0 0 10px; }
.adress p, .adress a { margin: 5px 0; color: #000; }
.link span, a.link {
  display: inline-block;
  text-decoration: none;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
  padding: 4px 0;
  color: #000;
  font-size: x-large;
  font-weight: 300;
}
.kh-table { width: 100%; border-collapse: collapse; margin: 16px 0 40px; }
.kh-table td { border: 1px solid #ddd; padding: 8px 10px; vertical-align: top; }
.kh-contact p { max-width: 42em; }
.kh-contact label { display: block; margin-bottom: 4px; }
.kh-contact input,
.kh-contact textarea {
  width: 100%;
  max-width: 42em;
  border: 1px solid #ced4da;
  padding: 8px 10px;
  font: inherit;
}
.kh-contact button { margin-top: 8px; }
.kh-notice { padding: 12px 0; font-weight: 500; }
.kh-notice-error { color: #a40000; }
@media (min-width: 768px) {
  .section { flex-direction: row; }
  .section-reverse { flex-direction: row-reverse; }
  .section > div { width: 50%; }
  .img-row-2 { flex-direction: row; justify-content: space-between; gap: 0; }
  .img-row-2 img { width: 49%; height: 300px; }
  .contacts { display: flex; flex-wrap: wrap; }
  .contact { width: 40%; }
}
@media (min-width: 992px) {
  .section, .img-section-2, .simple-section-text { width: 85vw; margin-left: auto; margin-right: auto; }
  .section-img { height: 500px; }
  .section-text { margin: 0 30px 50px; }
  .section-text h2 { font-size: 5em; }
  .section-text p { max-width: 90%; }
  .img-row-2 img { height: 400px; }
  .image-section { height: 450px; }
}
