/*
 * Colours and type come from the site's Elementor kit (global "Polyflor 1", "Sand",
 * "Tekst 2") and the child theme (#111 / .button-black), with fallbacks if a global
 * is renamed or removed.
 */
.pf-ls {
  --pf-ls-green: var(--e-global-color-4ea315c, #00684e);
  --pf-ls-green-soft: #e6f0ed;
  --pf-ls-sand: var(--e-global-color-1843920, #c5b9ac);
  --pf-ls-ink: #111;
  --pf-ls-text: var(--e-global-color-2f5ca2e, #585858);
  --pf-ls-muted: #777;
  --pf-ls-line: #dcdcdc;
  --pf-ls-soft: #f5f3f1;
  --pf-ls-warn: #c2571a;
  --pf-ls-warn-soft: #fbeee6;
  --pf-ls-low-dot: #e0a100;

  font-family: "Helvetica Pro", "Helvetica Neue", Arial, sans-serif;
  color: var(--pf-ls-ink);
}

/* Filter */
.pf-ls-filter {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  background: #fff;
  border-bottom: 1px solid var(--pf-ls-line);
}

.pf-ls-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}

.pf-ls-chip {
  flex: none;
  border: 1px solid var(--pf-ls-ink);
  background: #fff;
  color: var(--pf-ls-ink);
  padding: 8px 18px;
  border-radius: 20px;
  font: inherit;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}

.pf-ls-chip span {
  margin-left: 6px;
  color: var(--pf-ls-muted);
}

.pf-ls-chip.is-active {
  background: var(--pf-ls-ink);
  color: #fff;
}

.pf-ls-chip.is-active span {
  color: #bbb;
}

.pf-ls-sort {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--pf-ls-muted);
  white-space: nowrap;
}

.pf-ls-sort select {
  font: inherit;
  font-size: 14px;
  color: var(--pf-ls-ink);
  border: 1px solid var(--pf-ls-line);
  padding: 6px 8px;
  background: #fff;
}

/* Sections */
.pf-ls-section {
  padding-top: 40px;
}

.pf-ls-section[hidden] {
  display: none;
}

.pf-ls-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.pf-ls-section-head h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 400;
}

.pf-ls-count {
  font-size: 14px;
  color: var(--pf-ls-muted);
}

.pf-ls-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 22px;
}

/* Card */
.pf-ls-card {
  display: flex;
  flex-direction: column;
}

.pf-ls-card-img {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--pf-ls-soft);
  overflow: hidden;
}

.pf-ls-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}

.pf-ls-card:hover .pf-ls-card-img img {
  transform: scale(1.03);
}

.pf-ls-stock {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 14px;
  border-radius: 20px;
  background: #fff;
  color: var(--pf-ls-ink);
  font-size: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.pf-ls-stock i,
.pf-ls-detail-stock i {
  display: block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pf-ls-green);
}

.pf-ls-stock.is-low i { background: var(--pf-ls-warn); }
.pf-ls-stock.is-unknown i { background: #aaa; }

.pf-ls-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 2px 10px;
  border-radius: 20px;
  background: var(--pf-ls-warn);
  color: #fff;
  font-size: 12px;
}

.pf-ls-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-top: 14px;
}

.pf-ls-card-title,
.pf-ls-card-title:hover,
.pf-ls-card-title:visited {
  color: var(--pf-ls-ink);
  text-decoration: none !important;
}

.pf-ls-coll {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--pf-ls-muted);
}

.pf-ls-name {
  display: block;
  font-size: 17px;
  line-height: 1.3;
}

.pf-ls-specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  margin: 12px 0 14px;
  font-size: 14px;
  color: var(--pf-ls-text);
}

.pf-ls-specs dt { color: var(--pf-ls-muted); }
.pf-ls-specs dd { margin: 0; }

.pf-ls .button-black.pf-ls-btn {
  margin: auto 0 0;
  text-align: center;
  font-size: 14px;
  text-decoration: none !important;
}

.pf-ls-empty {
  padding: 40px 0;
  color: var(--pf-ls-text);
}

@media (max-width: 1024px) {
  .pf-ls-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .pf-ls-filter { flex-wrap: wrap; gap: 10px; }
  .pf-ls-chips { flex-basis: 100%; }
  .pf-ls-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .pf-ls-section-head h2 { font-size: 22px; }
  .pf-ls-specs { grid-template-columns: 1fr; font-size: 13px; }
  .pf-ls-specs dt { display: none; }
  .pf-ls-stock { left: 6px; bottom: 6px; padding: 2px 10px; font-size: 12px; }
}

/* Product page */
.pf-ls-page .breadcrumbs {
  margin-bottom: 24px;
  font-size: 14px;
}

/* Page 456 is full width for the regular product pages; lagersalg pages match the
   product category pages instead. */
.pf-ls-page {
  max-width: 1258px;
  margin-inline: auto;
}

.pf-ls-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px;
  align-items: start;
}

.pf-ls-detail-media {
  max-width: 600px;
  position: sticky;
  top: 24px;
  aspect-ratio: 1 / 1;
  background: var(--pf-ls-soft);
  overflow: hidden;
}

.pf-ls-detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.pf-ls-eyebrow {
  margin-bottom: 6px;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--pf-ls-muted);
}

.pf-ls-detail-info h1 {
  margin: 0 0 22px;
  font-size: 40px;
  font-weight: 400;
  line-height: 1.15;
}

.pf-ls-detail-stock {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--pf-ls-green-soft);
  font-size: 18px;
}

.pf-ls-detail-stock i {
  width: 10px;
  height: 10px;
}

.pf-ls-detail-stock.is-low { background: var(--pf-ls-warn-soft); }
.pf-ls-detail-stock.is-low i { background: var(--pf-ls-warn); }
.pf-ls-detail-stock.is-unknown { background: var(--pf-ls-soft); }
.pf-ls-detail-stock.is-unknown i { background: #aaa; }

.pf-ls-detail-stock small {
  display: block;
  font-size: 14px;
  color: var(--pf-ls-muted);
}

.pf-ls-detail-specs {
  display: grid;
  grid-template-columns: auto 1fr;
  margin: 22px 0 26px;
  font-size: 16px;
}

.pf-ls-detail-specs dt,
.pf-ls-detail-specs dd {
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--pf-ls-line);
}

.pf-ls-detail-specs dt {
  padding-right: 28px;
  color: var(--pf-ls-muted);
}

.pf-ls-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pf-ls .pf-ls-action {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 12px 20px;
  border: 1px solid var(--pf-ls-ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none !important;
}

/* <button> picks up the Elementor kit's button colours, so restate .button-black here. */
.pf-ls button.button-black,
.pf-ls button.button-black:focus {
  background-color: var(--pf-ls-ink);
  color: #fff;
  border-radius: 0;
}

.pf-ls button.button-black:hover {
  background-color: var(--pf-ls-ink);
  color: #ccc;
}

.pf-ls .pf-ls-action-ghost {
  background: #fff;
  color: var(--pf-ls-ink);
}

.pf-ls .pf-ls-action-ghost:hover {
  background: var(--pf-ls-ink);
  color: #fff;
}

.pf-ls-docs {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--pf-ls-line);
}

.pf-ls-docs h3 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 600;
}

.pf-ls-docs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pf-ls-docs-list .button-black {
  margin: 0;
  font-size: 15px;
  text-decoration: none !important;
}

.pf-ls-more {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--pf-ls-line);
}

.pf-ls-see-all {
  font-size: 14px;
  color: var(--pf-ls-ink) !important;
  text-decoration: underline !important;
}

.pf-ls-admin-note {
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--pf-ls-warn-soft);
  font-size: 14px;
}

/* Request sheet: a side panel on desktop, full screen on mobile. The fields scroll
   between a fixed header and a submit button that stays in view. */
.pf-ls-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: flex-end;
  background: rgba(17, 17, 17, .45);
}

.pf-ls-modal[hidden] {
  display: none;
}

.pf-ls-modal-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  height: 100%;
  height: 100dvh;
  background: #fff;
  box-shadow: -12px 0 40px rgba(0, 0, 0, .12);
  animation: pf-ls-sheet-in .28s cubic-bezier(.2, .8, .2, 1);
}

@keyframes pf-ls-sheet-in {
  from { transform: translateX(100%); }
}

.pf-ls-modal-close {
  position: absolute;
  top: 34px;
  right: 22px;
  border: 0;
  background: none;
  font-size: 30px;
  line-height: 1;
  color: var(--pf-ls-ink);
  cursor: pointer;
}

/* A <button>, so the Elementor kit's pink button hover applies unless restated. */
.pf-ls-modal button.pf-ls-modal-close:hover,
.pf-ls-modal button.pf-ls-modal-close:focus {
  background: none;
  color: var(--pf-ls-ink);
  opacity: .6;
  box-shadow: none;
  outline: none;
}

.pf-ls-modal button.pf-ls-modal-close:focus-visible {
  opacity: 1;
  outline: 2px solid var(--pf-ls-green);
  outline-offset: 2px;
}

.pf-ls-modal-head {
  flex: none;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 26px 64px 22px 28px;
  border-bottom: 1px solid var(--pf-ls-line);
}

.pf-ls-modal-head img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  flex: none;
}

.pf-ls-modal-head h3 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 400;
}

.pf-ls-modal-stock {
  font-size: 14px;
  color: var(--pf-ls-green);
}

.pf-ls-modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 28px 0;
}

/* Stretch the form to the sheet's height so the submit row sits at the bottom even
   when the fields are short, then keep it pinned there once they scroll. */
.pf-ls-modal-body .wpforms-container,
.pf-ls-modal-body .wpforms-form {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pf-ls-modal .wpforms-form .wpforms-submit-container {
  position: sticky;
  bottom: 0;
  margin: auto -28px 0 !important;
  padding: 20px 28px;
  background: #fff;
  border-top: 1px solid var(--pf-ls-line);
}

@media (max-width: 760px) {
  .pf-ls-modal-dialog { max-width: none; box-shadow: none; animation-name: pf-ls-sheet-up; }
  .pf-ls-modal-head { padding: 20px 56px 18px 18px; }
  .pf-ls-modal-close { top: 28px; right: 14px; }
  .pf-ls-modal-body { padding: 8px 18px 0; }
  .pf-ls-modal .wpforms-form .wpforms-field.wpforms-one-half { width: 100% !important; margin-left: 0 !important; }
  .pf-ls-modal .wpforms-form .wpforms-submit-container { margin: auto -18px 0 !important; padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); }
}

@keyframes pf-ls-sheet-up {
  from { transform: translateY(24px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pf-ls-modal-dialog { animation: none; }
}

.pf-ls-modal .pf-ls-design input {
  background: var(--pf-ls-soft);
}

body.pf-ls-locked {
  overflow: hidden;
}

@media (max-width: 900px) {
  .pf-ls-detail { grid-template-columns: 1fr; gap: 24px; }
  .pf-ls-detail-media { position: static; aspect-ratio: 4 / 3; }
  .pf-ls-detail-info h1 { font-size: 30px; }
}

/* WPForms inside the request modal: match the site's black buttons and type. */
.pf-ls-modal .wpforms-container {
  margin: 0 !important;
  font-family: inherit;
}

.pf-ls-modal .wpforms-field-label {
  font-weight: 600;
  color: var(--pf-ls-ink);
}

.pf-ls-modal .wpforms-form input:not([type="checkbox"]):not([type="radio"]),
.pf-ls-modal .wpforms-form textarea,
.pf-ls-modal .wpforms-form select {
  max-width: 100% !important;
  border-radius: 0 !important;
  font-family: inherit;
}

.pf-ls-modal .wpforms-form button[type="submit"],
.pf-ls-modal .wpforms-form button[type="submit"]:focus {
  width: 100%;
  padding: 14px 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: var(--pf-ls-ink) !important;
  color: #fff !important;
  font-family: inherit;
  font-size: 15px;
}

.pf-ls-modal .wpforms-form button[type="submit"]:hover {
  color: #ccc !important;
}

.pf-ls-modal .wpforms-confirmation-container-full {
  margin: 0;
  border-radius: 0;
  background: var(--pf-ls-green-soft);
  border-color: var(--pf-ls-green);
  color: var(--pf-ls-ink);
}

/* The product-inspect page (Elementor page 456) has no bottom padding of its own. */
.pf-ls-page {
  padding-bottom: 80px;
}

@media (max-width: 760px) {
  .pf-ls-page { padding-bottom: 48px; }
}

/* The child theme colours every visited link inside <article> #111, which made the
   card buttons black on black once a design had been opened. */
.pf-ls a.button-black,
.pf-ls a.button-black:link,
.pf-ls a.button-black:visited,
.pf-ls a.button-black:active {
  color: #fff;
}

.pf-ls a.button-black:hover {
  color: #ccc;
}

/* Chips are <button>s, so the Elementor kit's button hover/focus colours apply unless restated. */
.pf-ls .pf-ls-chips {
  /* Room for the focus ring, which overflow-x would otherwise clip. */
  padding: 4px;
  margin: -4px;
}

.pf-ls button.pf-ls-chip,
.pf-ls button.pf-ls-chip:focus {
  background-color: #fff;
  color: var(--pf-ls-ink);
  border: 1px solid var(--pf-ls-ink);
  outline: none;
  box-shadow: none;
}

.pf-ls button.pf-ls-chip:hover {
  background-color: var(--pf-ls-soft);
  color: var(--pf-ls-ink);
}

.pf-ls button.pf-ls-chip.is-active,
.pf-ls button.pf-ls-chip.is-active:hover,
.pf-ls button.pf-ls-chip.is-active:focus {
  background-color: var(--pf-ls-ink);
  color: #fff;
}

.pf-ls button.pf-ls-chip:focus-visible {
  outline: 2px solid var(--pf-ls-green);
  outline-offset: 2px;
}

/* The design is already in the modal header; the field only carries it into the e-mail. */
.pf-ls-modal .wpforms-field.pf-ls-design {
  display: none;
}

/* WPForms prints an empty header with bottom padding when the form has no description. */
.pf-ls-modal .wpforms-head-container:empty {
  display: none;
}
