/* MARK: FONT FAMILIES
*/

@font-face {
  font-family: "Urbanist";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/fonts/urbanist-400.woff2) format('woff2');
}

@font-face {
  font-family: "Urbanist";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/fonts/urbanist-500.woff2) format('woff2');
}

@font-face {
  font-family: "Urbanist";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/fonts/urbanist-600.woff2) format('woff2');
}

@font-face {
  font-family: "Urbanist";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/fonts/urbanist-700.woff2) format('woff2');
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  --body-bg-color: var(--white-100);
  --body-text-color: var(--black-100);
  background-color: var(--body-bg-color);
  color: var(--body-text-color);
  interpolate-size: allow-keywords;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

main {
  display: flex;
  flex-direction: column;
  row-gap: 2.5rem;
  margin-block: 2.5rem;

  @media (width >= 56.25rem) {
    row-gap: 4rem;
    margin-block: 4rem;
  }
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background-color: transparent;
}

img {
  max-width: 100%;
  height: auto;
}

video {
  max-width: 100%;
  height: auto;
  width: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 10;
  padding: 1rem;
  background-color: var(--black-100);
  color: var(--white-100);
  opacity: 0;

  &:focus-visible {
    left: 50%;
    translate: -50% 0;
    opacity: 1;
    outline-offset: 5px;
  }
}

.visually-hidden {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: clip;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  left: -9999px;
}

hgroup {
  display: flex;
  flex-direction: column;
  row-gap: 1.25rem;

  &.flipped {
    flex-direction: column-reverse;
  }
}

:where([class*="section"] > .container) {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  grid-template-rows: auto;
}

:where([class*="section"] .container) > * {
  grid-column: span 16;
}

.container {
  max-inline-size: var(--page-width);
  margin-inline: 1rem;
  width: 100%;

  &.narrow {
    max-inline-size: calc(var(--page-width) / 1.5);
  }
}

[class*="section"] {
  width: 100%;
  display: flex;
  justify-content: center;

  &.bg-primary {
    background-color: var(--primary-bg-color);
  }

  &.bg-secondary {
    background-color: var(--secondary-bg-color);
  }
}

.heading {
  --primary-color: var(--primary-text-color);
  --secondary-color: var(--secondary-text-color);

  line-height: var(--line-height-s);
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-xs);
  color: var(--primary-text-color);
  text-align: center;

  &.h1 {
    font-size: var(--font-size-2xl);

    @media (width >= 37.5rem) {
      font-size: var(--font-size-4xl);
    }

    @media (width >= 56.25rem) {
      font-size: var(--font-size-6xl);
    }
  }

  &.h2 {
    font-size: var(--font-size-2xl);

    @media (width >= 56.25rem) {
      font-size: var(--font-size-4xl);
    }
  }

  &.h3 {
    font-size: var(--font-size-xl);

    @media (width >= 56.25rem) {
      font-size: var(--font-size-2xl);
    }
  }

  &.h4 {
    font-size: var(--font-size-l);

    @media (width >= 56.25rem) {
      font-size: var(--font-size-xl);
    }
  }

  &.h5 {
    font-size: var(--font-size-m);

    @media (width >= 56.25rem) {
      font-size: var(--font-size-l);
    }
  }

  &.h6 {
    font-size: var(--font-size-s);

    @media (width >= 56.25rem) {
      font-size: var(--font-size-m);
    }
  }

  &.h7 {
    font-size: var(--font-size-s);
  }

  &.h8 {
    font-size: var(--font-size-xxs);

    @media (width >= 56.25rem) {
      font-size: var(--font-size-xs);
    }
  }

  &.h9 {
    font-size: var(--font-size-xxs);
    letter-spacing: var(--letter-spacing-xs);
    line-height: var(--line-height-xs);
  }

  &.secondary-color {
    color: var(--secondary-color);
  }
}

.text {
  --primary-color: var(--primary-text-color);
  --secondary-color: var(--secondary-text-color);

  line-height: var(--line-height-s);
  font-family: var(--font-family-text);
  font-weight: var(--font-weight-normal);
  letter-spacing: var(--letter-spacing-xs);
  color: var(--primary-text-color);

  &.t1 {
    font-size: var(--font-size-xl);
  }

  &.t2 {
    font-size: var(--font-size-l);
  }

  &.t3 {
    font-size: var(--font-size-m);
  }

  &.t4 {
    font-size: var(--font-size-s);
  }

  &.t5 {
    font-size: var(--font-size-xs);
  }

  &.t6 {
    font-size: var(--font-size-xxs);
  }

  &.secondary-color {
    color: var(--secondary-color);
  }
}

.wysiwyg {
  --primary-color: var(--primary-text-color);
  --secondary-color: var(--secondary-text-color);

  display: flex;
  flex-direction: column;
  gap: 1rem;

  line-height: var(--line-height-s);
  font-family: var(--font-family-text);
  font-weight: var(--font-weight-normal);
  letter-spacing: var(--letter-spacing-xs);
  color: var(--primary-text-color);

  &.t1 {
    font-size: var(--font-size-xl);
  }

  &.t2 {
    font-size: var(--font-size-l);
  }

  &.t3 {
    font-size: var(--font-size-m);
  }

  &.t4 {
    font-size: var(--font-size-s);
  }

  &.t5 {
    font-size: var(--font-size-xs);
  }

  &.t6 {
    font-size: var(--font-size-xxs);
  }

  &.secondary-color {
    color: var(--secondary-text-color);
  }
}

.wysiwyg a {
  display: inline;
  color: var(--primary-link-color);

  &:hover {
    text-decoration: underline;
  }
}

.wysiwyg :is(ul, ol) {
  list-style: initial;
  list-style-position: inside;
}

.wysiwyg li {
    padding-block: 0.5rem;
  }

.wysiwyg :is(h1, h2, h3, h4, h5, h6) {
  margin-block: 1rem 0;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-l);
}

:where(.icon)::before,
:where(.icon)::after {
  content: "";
  background-color: currentcolor;
  mask-repeat: no-repeat;
  mask-size: contain;
  display: none;
  width: var(--icon-size, 1.5rem);
  height: var(--icon-size, 1.5rem);
  min-width: var(--icon-size, 1.5rem);
  min-height: var(--icon-size, 1.5rem);
}

.icon.icon-xxxl { --icon-size: 4rem; }
.icon.icon-xxl { --icon-size: 3rem; }
.icon.icon-xl { --icon-size: 2rem; }
.icon.icon-l  { --icon-size: 1.75rem; }
.icon.icon-m  { --icon-size: 1.5rem; }
.icon.icon-s  { --icon-size: 1.25rem; }
.icon.icon-xs { --icon-size: 1rem; }

.button-container {
  display: grid;
  align-items: center;
  gap: 0.5rem;
  width: 100%;

  @media (width >= 56.25rem) {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: fit-content;
  }
}

.button-container .button {
  height: 100%;
}

.button {
  font-weight: var(--font-weight-normal);
  font-family: var(--font-family-button);
  letter-spacing: var(--letter-spacing-s);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-m);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  justify-content: center;
  transition: background-color 0.3s, border 0.3s, color 0.3s;
  width: 100%;
  text-transform: uppercase;  
  text-align: center;
  height: fit-content;

  @media (width >= 56.25rem) {
    width: fit-content;
  }

  &:focus-visible {
    outline-offset: 5px;
  }

  &.primary-button {
  background-color: var(--primary-button-bg-color);
  color: var(--primary-button-text-color);
  border: var(--border-transparent);

    &:hover {
      background-color: var(--primary-button-hover-bg-color);
      color: var(--primary-button-hover-text-color);
      border: var(--border-current);
    }
  }

  &.secondary-button {
    background-color: var(--secondary-button-bg-color);
    color: var(--secondary-button-text-color);
    border: var(--border-transparent);

    &:hover {
      background-color: var(--secondary-button-hover-bg-color);
      color: var(--secondary-button-hover-text-color);
      border: var(--border-current);
    }
  }

  &.tertiary-button {
    background-color: var(--tertiary-button-bg-color);
    color: var(--tertiary-button-text-color);
    border: var(--border-current);

    &:hover {
      background-color: var(--tertiary-button-hover-bg-color);
      color: var(--tertiary-button-hover-text-color);
    }
  }
}

.rounded-button {
  border-radius: 100%;
  padding: 0.75rem;
  box-shadow: var(--box-shadow);
  transition: background-color 0.3s, color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;

  @media (width >= 56.25rem) {
    padding: 1rem;
  }

  &:focus-visible {
    outline-offset: 5px;
  }

  &.primary-rounded-button {
    background-color: var(--primary-rounded-button-bg-color);
    color: var(--primary-rounded-button-text-color);

    &:hover {
      background-color: var(--primary-rounded-button-hover-bg-color);
      color: var(--primary-rounded-button-hover-text-color);
    }
  }

  &.secondary-rounded-button {
    background-color: var(--secondary-rounded-button-bg-color);
    color: var(--secondary-rounded-button-text-color);

    &:hover {
      background-color: var(--secondary-rounded-button-hover-bg-color);
      color: var(--secondary-rounded-button-hover-text-color);
    }
  }
}

@keyframes skeleton-loading {
  0% {
    background-color: var(--skeleton-start-bg-color);
  }
  100% {
    background-color: var(--skeleton-end-bg-color);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bg-zoom {
  from {
    transform: scale(1.1);
  }
  to {
    transform: scale(1);
  }
}
:root {

  /* COLOR PALETTE */
  --black-100: #000;
  --black-200: #1c1c1c;
  --black-300: #2e2e2e;
  --white-100: #fff;
  --white-200: #f3f3f3;
  --grey-100: #757575;
  --grey-200: #b4b4b4;
  --yellow-100: #ffd700;
  --blue-100: #0073e6;
  --red-100: #ff0000;
  --green-100: #00a000;
  --transparent-200: #00000029;
  --transparent-300: #0000004D;
  --transparent-400: #ffffff90;
  --transparent-500: #00000080;

  /* FONT FAMILIES */
  --font-family-heading: "Urbanist", sans-serif;
  --font-family-text: "Urbanist", sans-serif;
  --font-family-button: "Urbanist", sans-serif;
  --font-family-nav: "Urbanist", sans-serif;

  /* FONT SIZES */
  --font-size-xxs: 0.75rem;   /* 12px */
  --font-size-xs: 0.875rem;   /* 14px */
  --font-size-s: 1rem;        /* 16px */
  --font-size-m: 1.125rem;    /* 18px */
  --font-size-l: 1.25rem;     /* 20px */
  --font-size-xl: 1.5rem;     /* 24px */
  --font-size-2xl: 1.75rem;   /* 28px */
  --font-size-3xl: 2rem;      /* 32px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 2.5rem;    /* 40px */
  --font-size-6xl: 3rem;      /* 48px */

  /* FONT WEIGHTS */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* LINE HEIGHTS */
  --line-height-xs: 1.25;
  --line-height-s: 1.5;
  --line-height-m: 1.625;
  --line-height-l: 2;

  /* LETTER SPACING */
  --letter-spacing-xs: 0.1rem;
  --letter-spacing-s: 0.15rem;
  --letter-spacing-m: 0.2rem;
  --letter-spacing-l: 0.25rem;

  /* BUTTON COLORS */
  --primary-button-text-color: var(--white-100);
  --primary-button-hover-text-color: var(--black-100);
  --primary-button-bg-color: var(--black-200);
  --primary-button-hover-bg-color: var(--white-100);

  --secondary-button-text-color: var(--black-100);
  --secondary-button-hover-text-color: var(--white-100);
  --secondary-button-bg-color: var(--white-100);
  --secondary-button-hover-bg-color: transparent;

  --tertiary-button-text-color: var(--black-100);
  --tertiary-button-hover-text-color: var(--black-100);
  --tertiary-button-bg-color: var(--white-200);
  --tertiary-button-hover-bg-color: var(--white-100);

  --primary-rounded-button-bg-color: var(--black-200);
  --primary-rounded-button-text-color: var(--white-100);
  --primary-rounded-button-hover-bg-color: var(--black-300);
  --primary-rounded-button-hover-text-color: var(--white-100);

  --secondary-rounded-button-bg-color: var(--white-100);
  --secondary-rounded-button-text-color: var(--black-100);
  --secondary-rounded-button-hover-bg-color: var(--white-200);
  --secondary-rounded-button-hover-text-color: var(--black-100);

  --tertiary-rounded-button-bg-color: var(--grey-200);
  --tertiary-rounded-button-text-color: var(--black-100);

  /* THEME COLORS */
  --primary-bg-color: var(--white-100);
  --secondary-bg-color: var(--white-200);
  --primary-text-color: var(--black-100);
  --secondary-text-color: var(--white-100);
  --tertiary-text-color: var(--grey-100);
  --primary-link-color: var(--blue-100);
  --error-color: var(--red-100);
  --success-color: var(--green-100);
  --popup-bg-color: var(--primary-bg-color);
  --backdrop-bg-color: var(--transparent-300);
  --inactive-color: var(--grey-200); 

  /* OTHER VARIABLES */
  --box-shadow: 0 2px 10px var(--transparent-200);
  --page-width: 77.5rem;
  --primary-image-overlay: linear-gradient(var(--transparent-500), var(--transparent-500));
  --secondary-image-overlay: linear-gradient(var(--transparent-400), var(--transparent-400));

  --border-primary: 1px solid var(--black-100);
  --border-secondary: 1px solid var(--grey-200);
  --border-transparent: 1px solid transparent;
  --border-current: 1px solid currentColor;
  --skeleton-start-bg-color: var(--grey-200);
  --skeleton-end-bg-color: var(--white-200);
}
.topbar-section {
  --bg-color-topbar: var(--primary-button-bg-color);

  background-color: var(--bg-color-topbar);
}

.topbar-items {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding-block: 0.75rem;
  scroll-behavior: auto;

  &.smooth {
    scroll-behavior: smooth;
  }
}

.topbar-item {
  display: flex;
  flex: 0 0 100%;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  scroll-snap-align: start;
  scroll-snap-stop: always;

  &:before {
    display: block;
    mask-image: var(--icon);
  }
}
.shopping-cart {
  --cart-counter-bg-color: var(--primary-rounded-button-bg-color);
  --cart-counter-color: var(--primary-rounded-button-text-color);
  --cart-bg-color: var(--popup-bg-color);
  --soldout-color: var(--error-color);
  --original-price-sale-color: var(--tertiary-text-color);
  --max-quantity-color: var(--error-color);
  --minimum-order-error-color: var(--error-color);
}

body:has(.cart-overview-items[aria-busy="true"]) .cart-items {
  pointer-events: none;
  opacity: 0.5;
}

body:has(.cart-dialog[open]) {
  overflow: hidden;
}

.cart-item.template {
  display: none;
}

.toggle-cart {
  display: flex;
  position: relative;

  &:after {
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/cart.svg);
    display: block;
  }

  &[data-items="0"]:before {
    display: none;
  }

  &:before {
    content: attr(data-items);
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    z-index: 1;
    background-color: var(--cart-counter-bg-color);
    color: var(--cart-counter-color);
    min-height: 1rem;
    min-width: 1rem;
    width: 1rem;
    height: 1rem;
    border-radius: 100%;
    padding: 0.5rem;
    letter-spacing: 0;
  }
}

.cart-dialog {
  max-width: 30rem;
  max-height: 100%;
  height: 100%;
  width: 100%;
  justify-self: end;
  border: var(--border-primary);

  &::backdrop {
    background-color: var(--backdrop-bg-color);
  }

  @supports (transition-behavior: allow-discrete) {
    transition: transform 0.3s, overlay 0.3s, display 0.3s;
    transition-behavior: allow-discrete;
    transform: translateX(100%);
  }

  &[open] {
    display: flex;

    @supports (transition-behavior: allow-discrete) {
      transform: translateX(0);

      @starting-style {
        transform: translateX(100%);
      }
    }
  }
}

.cart-container {
  display: flex;
  flex-direction: column;
  row-gap: 2rem;
  padding: 2rem;
  background-color: var(--cart-bg-color);
  width: 100%;
}

.cart-container:has(.cart-items[data-items="0"]) :is(.checkout-button, .cart-total, .cart-delivery-container) {
  display: none;
}

.cart-dialog:has(.cart-items[data-items="0"]) .empty-cart-message {
  display: flex;
  padding-block: 2rem;
  justify-content: center;
  text-align: center;
}

.empty-cart-message {
  display: none;
}

.cart-items {
  overflow: auto;
  scrollbar-width: thin;

  &[data-items="0"] {
    display: none;
  }
}

.cart-items[aria-busy="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.cart-header {
  display: flex;
  flex-direction: column;
  border-bottom: var(--border-secondary);
  padding-bottom: 1rem;
}

.cart-title-container {
  display: flex;
  justify-content: space-between;
  column-gap: 1rem;
  align-items: center;
  /* border-bottom: var(--border-secondary); */
  /* padding-bottom: 1rem; */
}

.close-cart {
  display: flex;

  &:after {
    display: block;
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/close.svg);
  }
}

.cart-items {
  display: flex;
  flex-direction: column;
  row-gap: 3rem;
}

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 5rem) 1fr;
  column-gap: 1rem;

  &[data-stockquantity="0"] .cart-item-sold-out {
    display: flex;
  }

  &[data-stockquantity="0"] .cart-item-quantity-controls {
    display: none;
  }

  @media (width >= 56.25rem) {
    column-gap: 2rem;
  }
}

.cart-item-link {
  display: flex;
  height: fit-content;
}

.cart-item-variations:has(.cart-item-variation-label:empty, .cart-item-variation-value:empty) {
  display: none;
}

.cart-item-variations {
  display: flex;
  flex-direction: column;
}

.cart-item-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  row-gap: 1rem;
  justify-content: space-between;
}

.cart-item hgroup {
  row-gap: 0.25rem;
}

.cart-item-title-container {
  display: flex;
  column-gap: 1rem;
  justify-content: space-between;
  row-gap: 0.5rem;
  flex-direction: column;
}

.cart-item-name-text {
  font-weight: var(--font-weight-semibold);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.25rem;
  transition: text-decoration-color 0.3s;
  text-align: start;

  &:hover {
    text-decoration-color: currentColor;
  }
}

.cart-item-comment:has(.cart-item-comment-value:empty) {
  display: none;
}

.cart-item-price {
  display: flex;
  column-gap: 0.5rem;
  text-align: start;
  flex-wrap: wrap;

  &:has(.cart-item-sale-price:not(:empty)) .cart-item-original-price {
    text-decoration: line-through;
    color: var(--original-price-sale-color);
  }
}

.cart-item-sale-price:empty {
  display: none;
}

.cart-item-quantity-container {
  display: flex;
  column-gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

.cart-item-sold-out {
  font-weight: var(--font-weight-semibold);
  color: var(--soldout-color);
  display: none;
  column-gap: 1rem;
  align-items: center;

  &:before {
    display: block;
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/warning.svg);
  }
}

.cart-item-image {
  object-fit: cover;
  aspect-ratio: 1 / 1;
  transition: opacity 0.3s;
  width: 100%;

  &:hover {
    opacity: 0.5;
  }
}

.cart-item-remove {
  display: flex;
  padding: 0.25rem;

  &:after {
    display: block;
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/trash.svg);
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    min-height: 1rem;
  }
}

.cart-container .cart-footer {
  display: flex;
  flex-direction: column;
  row-gap: 0.5rem;
  width: 100%;
  border-top: var(--border-secondary);
  padding-top: 1.5rem;
  margin-top: auto;
}

.cart-container .button-container {
  display: flex;
  flex-direction: column;
  row-gap: 1rem;
  width: 100%;
  padding-top: 1rem; 
}

.cart-container .button-container .button {
  width: 100%;
}

.cart-container:has(.cart-items[aria-busy="true"]) .button-container {
  pointer-events: none;
  opacity: 0.5;
}

.cart-container .checkout-button:before {
  display: block;
  mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/lock.svg);
}

.cart-container:has(.cart-item[data-stockquantity="0"]) .checkout-button {
  opacity: 0.5;
  pointer-events: none;
}

.cart-item-quantity-controls {
  display: flex;
  align-items: center;
  border: var(--border-secondary);
  width: fit-content;
}

.cart-item-quantity-input {
  text-align: center;
  border: none;
  appearance: textfield;
  height: 100%;
  width: 3ch;

  &::-webkit-inner-spin-button,
  &::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
}

.cart-item-quantity-decrease,
.cart-item-quantity-increase {
  padding: 0.5rem 1rem;
}

.cart-item .max-quantity-message {
  color: var(--max-quantity-color);

  &.hidden {
    display: none;
  }
}

.cart-total {
  display: flex;
  justify-content: space-between;
  width: 100%;
  flex-direction: row;
}

.cart-total-title {
  font-weight: var(--font-weight-semibold);
}

.cart-total-amount {
  font-weight: var(--font-weight-semibold);
}

.cart-delivery-container {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 1rem;
}

.cart-delivery-method {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0.25rem;
  width: fit-content;
  border-radius: 2rem;
  border: var(--border-secondary);
}

.cart-delivery-label {
  width: 100%;
  text-transform: none;
  cursor: pointer;
  border-radius: 2rem;
  padding: 0.5rem;
  text-transform: none;

  &[for="cart-delivery-method-pickup"]:before {
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/pickup.svg);
    display: block;
  }

  &[for="cart-delivery-method-delivery"]:before {
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/bicycle.svg);
    display: block;
  }
}

.cart-delivery-input:checked + .cart-delivery-label {
  background-color: var(--primary-button-bg-color);
  color: var(--primary-button-text-color);
}

.cart-delivery-input:focus-visible + .cart-delivery-label {
  outline: 2px solid var(--black-100);
  outline-offset: 5px;
}

.cart-delivery-postal-code {
  display: flex;
  column-gap: 0.5rem;
  align-items: center;
  padding: 0.5rem;
  border-radius: 2rem;
  border: var(--border-secondary);
  text-transform: uppercase;
  width: fit-content;
  transition: border-color 0.3s;

  &:hover {
    border-color: currentColor;
  }
}

.cart-delivery-postal-code:empty {
  display: none;
}

.cart-delivery-postal-code:before {
  mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/route.svg);
  display: block;
}

.cart-minimum-error-message {
  color: var(--minimum-order-error-color);
  display: flex;
  column-gap: 0.5rem;
  align-items: center;

  &:empty {
    display: none;
  }

  &:before {
    display: block;
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/warning.svg);
  }
}

.cart-dialog:has(#cart-delivery-method-pickup:checked) .cart-minimum-error-message {
  display: none;
}
.search-form-container {
  --search-bg-color: var(--popup-bg-color);
  --original-price-color: var(--tertiary-text-color);
  --sold-out-badge-bg-color: var(--primary-button-bg-color);
  --sale-badge-bg-color: var(--red-100);
}

body:has(.search-dialog[open]) {
  overflow: hidden;
}

.search-toggle-button {
  display: flex;
  
  &:after {
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/search.svg);
    display: block;
  }
}

.search-dialog {
  width: 100%;
  max-width: 100%;
  justify-content: center;
  background-color: var(--search-bg-color);
  border: var(--border-primary);

  
  @supports (transition-behavior: allow-discrete) {
    transition: transform 0.3s, overlay 0.3s, display 0.3s;
    transition-behavior: allow-discrete;
    transform: translateY(-100%);
  }

  &[open] {
    display: flex;

    @supports (transition-behavior: allow-discrete) {
      transform: translateY(0);

      @starting-style {
        transform: translateY(-100%);
      }
    }
  }

  &::backdrop {
    background-color: var(--backdrop-bg-color);
  }
}

.search-form {
  display: flex;
  max-width: var(--page-width);
  flex-direction: column;
  width: 100%;
  padding: 2rem 1rem;
  row-gap: 2rem;

  &[aria-busy="true"] .search-label:before {
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/loader.svg);
    animation: spin 1s linear infinite;
  }
}

.search-controls {
  display: flex;
  width: 100%;
  column-gap: 2rem;
  align-items: center;
}

.search-label {
  display: flex;
  width: 100%;
  column-gap: 2rem;
  align-items: center;

  &:before {
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/search.svg);
    display: block;
  }
}

.search-form-input {
  width: 100%;
  text-align: left;
  border: none;

  &:focus {
    outline: none;
  }

  &::-webkit-search-cancel-button,
  &::-webkit-search-decoration,
  &::-webkit-search-results-button,
  &::-webkit-search-results-decoration {
    display: none;
  }
}

.search-form-close-button {
  display: flex;

  &:after {
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/close.svg);
    display: block;
  }
}

.search-suggestions {
  display: flex;
  align-items: center;
  padding-block: 2rem 0.5rem;
  border-top: var(--border-secondary);
  overflow-x: auto;
  scrollbar-width: thin;
  flex-direction: column;
  row-gap: 2rem;

  &:nth-child(6) {
    display: none;
  }

  @media (width >= 56.25rem) {
    row-gap: 1rem;
  }
}

.search-suggestion {
  display: flex;
  position: relative;
  height: 100%;
  width: 100%;
  flex-direction: column;
  row-gap: 1rem;
}

.search-suggestion-link {
  display: grid;
  grid-template-columns: minmax(0, 7.5rem) 1fr;
  column-gap: 1rem;
  height: 100%;

  &:hover .search-suggestion-image {
    opacity: 0.5;
  }
}

.search-suggestion-image-container {
  position: relative;
  display: flex;
  justify-content: center;
}

.search-suggestion-image {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: opacity 0.3s;
  align-self: center;
  width: 100%;
}

.search-suggestion hgroup {
  row-gap: 0.5rem;
  text-align: center;
  height: 100%;
  text-align: left;
}

.search-suggestion-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;  
  -moz-line-clamp: 3;
  -moz-box-orient: vertical;
  line-clamp: 3;
  box-orient: vertical;
  overflow: hidden;
  text-align: left;
}
.search-suggestion-price {
  display: flex;
  column-gap: 0.5rem;
  flex-wrap: wrap;

  &:has(.search-suggestion-sale-price:not(:empty)) .search-suggestion-original-price {
    text-decoration: line-through;
    color: var(--original-price-color);
  }
}

.search-suggestion-sale-price:empty {
  display: none;
}

.search-suggestion[data-pricetype="multiple"] .search-suggestion-from-text {
  display: inline;
}

.search-suggestion-from-text {
  display: none;
}

.search-suggestion[data-stockquantity="0"] .sold-out-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background-color: var(--sold-out-badge-bg-color);
  padding: 0.1rem 0.25rem;
  display: block;
  z-index: 1;
}

.search-suggestion .sale-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: var(--sale-badge-bg-color);
  padding: 0.1rem 0.25rem;
  display: block;
  z-index: 1;
}

.search-suggestion[data-stockquantity="0"] .sale-badge {
  display: none;
}

.search-suggestion .sale-badge:empty,
.search-suggestion .sold-out-badge {
  display: none;
}

.search-submit-button {
  display: none;
  margin-inline: auto;
  column-gap: 0.25rem;

  &:after {
    content: "(" attr(data-item-count) ")";
  }
}

.search-form:has(.search-suggestions[data-items="5+"]) .search-submit-button {
  display: flex;
}

.search-suggestions:has(.search-suggestion.template:only-child) {
  display: none;
}

.search-suggestion.template {
  display: none;
}

.search-no-results {
  display: none;
  padding: 2rem;
}

.search-form[aria-busy="false"]:not(.typing):has(.search-suggestion.template:only-child):has(.search-form-input:not(:placeholder-shown)) .search-no-results {
  display: flex;
}
.language-dropdown {
  --language-dropdown-bg: var(--primary-bg-color);

  display: flex;
  flex-direction: column;
  position: relative;
  gap: 0.5rem;
  align-items: center;

  &:has(.language-dropdown-button[aria-expanded="true"]) .language-dropdown-list {
    display: flex;
  }
}

.language-dropdown img {
  width: 1.5rem;
  height: 1.5rem;
  min-width: 1.5rem;
  min-height: 1.5rem;
}

.language-dropdown-button {
  display: flex;
}

.language-dropdown-list {
  display: none;
  position: absolute;
  top: 120%;
  background-color: var(--language-dropdown-bg);
  padding: 0.5rem;
  box-shadow: 0 2px 10px #00000029;
  flex-direction: column;
  gap: 0.5rem;
}

.language-dropdown-item {
  display: flex;

  &:has(a[aria-current="true"]) {
    display: none;
  }
}

.language-dropdown-item a {
  display: flex;
}
.browser-outdated-section {
  --container-bg-color: var(--popup-bg-color);

  position: fixed;
	top: 0;
	left: 0;
	z-index: 3;
  background-color: var(--backdrop-bg-color);
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
	display: none;
}

.browser-outdated-section.visible {
  display: flex;
}

.browser-outdated-section .container {
  background-color: var(--container-bg-color);
	position: relative;
	display: flex;
	flex-direction: column;
	width: 45rem;
	height: auto;
	max-width: 95%;
	padding: 2rem;	
	row-gap: 2.5rem;
}

.browser-outdated-section .close-browser-outdated-section {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: fit-content;
}

.browser-outdated-section .close-browser-outdated-section:after {
  display: block;
  mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/close.svg);
  -webkit-mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/close.svg);
}

.browser-outdated-section hgroup {
  text-align: center;
}

.browser-outdated-section .browser-list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  row-gap: 2rem;
  flex-wrap: wrap;
}

.browser-outdated-section .browser-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.browser-outdated-section .browser-item a:hover .browser-name {
  text-decoration: underline;
}

.browser-outdated-section .browser-name {
  max-width: 6rem;
  text-align: center;
}
.header-section {
  --nav-bg-color: var(--primary-bg-color);

  --nav-item-text-color: var(--primary-text-color);
  --nav-item-font-weight: var(--font-weight-normal);
  --nav-item-font-size: var(--font-size-xl);
  --nav-item-font-family: var(--font-family-nav);
  --nav-item-letter-spacing: var(--letter-spacing-xs);

  --dropdown-bg-color: var(--primary-bg-color);

  --dropdown-item-text-color: var(--primary-text-color);
  --dropdown-item-text-hover-color: var(--tertiary-text-color);
  --dropdown-item-font-weight: var(--font-weight-normal);
  --dropdown-item-font-size: var(--font-size-l);
  --dropdown-item-font-family: var(--font-family-nav);
  --dropdown-item-letter-spacing: var(--letter-spacing-xs);

  @media (width >= 56.25rem) {
    --nav-item-font-size: var(--font-size-s);
    --dropdown-item-font-size: var(--font-size-xs);
  }

  top: 0;
  z-index: 3;
  background-color: var(--nav-bg-color);
  transition: translate 0.3s;
  position: sticky;
  border-bottom: var(--border-primary);

  &.not-scrolling-up:not(:focus-visible):has(:not(.mobile-menu-button[aria-expanded="true"])) {
    translate: 0 -100%;
    border-bottom-width: 0px;
  }

  &.not-scrolling-up:not(:focus-visible):has(:not(.mobile-menu-button[aria-expanded="true"])) .has-dropdown:has(.dropdown-button[aria-expanded="true"]) .dropdown-menu {
    translate: -50% -100%;
  }

  &:has(.mobile-menu-button[aria-expanded="true"]) .header-navigation {
    display: flex;

    @media (width < 56.25rem) {
      @supports (transition-behavior: allow-discrete) {
        transform: translateX(0);

        @starting-style {
          transform: translateX(100%);
        }
      }
    }
  }

  &:has(.mobile-menu-button[aria-expanded="true"]):after {
    @media (width < 56.25rem) {
      content: '';
      position: fixed;
      height: 100%;
      width: 100%;
      inset: 0;
      background-color: var(--backdrop-bg-color);
      z-index: 1;
    }
  }
}

.header-section .container {
  align-items: center;
  display: flex;
  gap: 2rem;
  padding-block: 1.25rem;
  justify-content: space-between;
}

body:has(.mobile-menu-button[aria-expanded="true"]) .skip-link {
  display: none;
}

body:has(.mobile-menu-button[aria-expanded="true"]) {
  @media (width < 56.25rem) {
    overflow: hidden;
  }
}

.header-logo,
.header-mobile-logo {
  transition: opacity 0.3s;

  &:hover {
    opacity: 0.5;
  }
}

.header-logo img,
.header-mobile-logo img {
  width: 16rem;
  min-width: 3rem;
}

.header-mobile-logo-container {
  display: flex;
  align-items: center;
  column-gap: 1rem;
  justify-content: space-between;
  flex-direction: row-reverse;

  @media (width >= 56.25rem) {
    display: none;
  }
}

.header-menu-close-button:after {
  mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/close.svg);
  display: block;
}

.header-navigation {
  display: none;
  width: 100%;
  flex-direction: column;
  position: fixed;
  height: 100%;
  top: 0;
  right: 0;
  overflow: auto;
  padding: 2rem;
  background-color: var(--nav-bg-color);
  max-width: 30rem;
  row-gap: 2rem;
  z-index: 2;

  @media (width >= 56.25rem) {
    width: 100%;
    flex-direction: row;
    position: initial;
    height: auto;
    display: flex;
    justify-content: space-between;
    column-gap: 0.5rem;
    row-gap: 0;
    overflow: initial;
    padding: 0;
    max-width: none;
    z-index: unset;
  }

  @media (width < 56.25rem) {
    @supports (transition-behavior: allow-discrete) {
      transition: transform 0.3s, overlay 0.3s, display 0.3s;
      transition-behavior: allow-discrete;
      transform: translateX(100%);
    }
  }
}

.header-menu {
  display: flex;
  gap: 1.5rem;
  flex-direction: column;

  @media (width >= 56.25rem) {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    row-gap: 0;
  }
}

.header-menu-item .dropdown-button,
.header-menu-item > a,
.header-menu-item-label {
  font-weight: var(--nav-item-font-weight);
  font-size: var(--nav-item-font-size);
  font-family: var(--nav-item-font-family);
  letter-spacing: var(--nav-item-letter-spacing);
  color: var(--nav-item-text-color);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.5rem;
  transition: text-decoration-color 0.3s;
  min-height: 1.5rem;
  align-items: center;
  display: flex;
}

.header-menu-item-label > a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.5rem;
  transition: text-decoration-color 0.3s;
  min-width: fit-content;


  @media (width < 56.25rem) {
    display: none;
  }
}

.header-menu-item.has-link .dropdown-button-label { 
  @media (width >= 56.25rem) {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: clip;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }
}

.dropdown-menu-item.overview-link {
  @media (width >= 56.25rem) {
    display: none;
  }
}

.header-menu-item {
  &:hover .dropdown-button,
  &:hover > a,
  &:hover .header-menu-item-label > a {
    text-decoration-color: currentColor;
  }

  &:has([aria-current="page"]) > a,
  &:has([aria-current="page"]) > .dropdown-button,
  &:has([aria-current="page"]) .header-menu-item-label > a {
    text-decoration-color: currentColor;
  }
}

.has-dropdown {
  position: relative;

  &:has(.dropdown-button[aria-expanded="true"]):after {
    @media (width >= 56.25rem) {
      content: "";
      height: 1.25rem;
      left: 0;
      position: absolute;
      width: 100%;
    }
  }

  &:has(.dropdown-button[aria-expanded="true"]) .dropdown-menu {
    display: flex;

    @supports (transition-behavior: allow-discrete) and (interpolate-size: allow-keywords) {
      @media (width < 56.25rem) {
        height: auto;
        padding-block: 1.25rem;
        margin-block: 1.25rem;

        @starting-style {
          height: 0;
          padding-block: 0;
          margin-block: 0;
        }
      }
    }
  }
}

.dropdown-button {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;

  &:after {
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/angle-down.svg);
    display: block;
    transition: rotate 0.3s;
    margin-left: 0.25rem;
  }

  &[aria-expanded="true"]:after {
    rotate: -180deg;
  }
}

.dropdown-menu {
  display: none;
  row-gap: 1rem;
  justify-content: space-between;
  margin-block: 1.25rem;
  padding: 1.25rem;
  border: var(--border-current);
  flex-direction: column;

  @media (width >= 56.25rem) {
    left: 50%;
    position: absolute;
    translate: -50% 0;
    width: max-content;
    background-color: var(--dropdown-bg-color);
    margin-block: 1.25rem 0;
  }

  @supports (transition-behavior: allow-discrete) and (interpolate-size: allow-keywords) {
    @media (width < 56.25rem) {
      transition: height 0.3s, display 0.3s, padding-block 0.3s, margin-block 0.3s;
      transition-behavior: allow-discrete;
      height: 0;
      padding-block: 0;
      margin-block: 0;
      overflow: hidden;
    }
  }
}

.dropdown-menu-item {
  width: 100%;
  display: flex;
}

.dropdown-menu-item > a {
  width: 100%;
  font-weight: var(--dropdown-item-font-weight);
  font-size: var(--dropdown-item-font-size);
  font-family: var(--dropdown-item-font-family);
  letter-spacing: var(--dropdown-item-letter-spacing);
  color: var(--dropdown-item-text-color);
  transition: color 0.3s;

  &:hover {
    color: var(--dropdown-item-text-hover-color);
  }

  &[aria-current="page"] {
    color: var(--dropdown-item-text-hover-color);
  }
}

.header-utils {
  align-items: center;
  display: flex;
  gap: 1rem;
}

.mobile-menu-button {
  &:after {
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/bars.svg);
    display: block;
  }

  @media (width >= 56.25rem) {
    display: none;
  }
}

#header-cta {
  transition: background-color 0.3s, color 0.3s, border 0.3s;
  text-decoration: none;
  width: fit-content;

  &:hover {
    text-decoration: none;
  }
}
.bottombar-section .container {
  padding-block: 2rem;
}

.bottombar-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 2rem;
}

.bottombar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  row-gap: 0.5rem;
}

.bottombar-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 1rem;
  font-weight: var(--font-weight-semibold);

  @media (width >= 56.25rem) {
    row-gap: 1.5rem;
  }

  &:before {
    display: block;
    mask-image: var(--icon);
  }
}

.bottombar-text {
  text-wrap: balance;
}
.contact-bubble-section {
  --contact-bubble-label-bg-color: var(--primary-bg-color);

  position: fixed;
  bottom: 1.25rem;
  right: 0;
  display: flex;
  align-items: end;
  width: fit-content;
  z-index: 1;

  &:has(.contact-bubble-button[aria-expanded='true']) .contact-bubble-list {
    display: flex;

    @supports (transition-behavior: allow-discrete) {
      transform: translateY(0);
      opacity: 1;

      @starting-style {
        transform: translateY(1rem);
        opacity: 0;
      }
    }
  }
}

.contact-bubble-section .container {
  row-gap: 0.5rem;
  }

.contact-bubble-button {
  transition: background-color 0.3s, color 0s;
  grid-row: 2;
  justify-self: end;

  &:after {
    display: block;
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/contact.svg);
  }

  &[aria-expanded='true']:after {
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/close.svg);
  }
}

.contact-bubble-list {
  display: none;
  flex-direction: column;
  align-items: end;
  row-gap: 0.5rem;

  @supports (transition-behavior: allow-discrete) {
    transition: transform 0.3s, display 0.3s, opacity 0.3s;
    transition-behavior: allow-discrete;
    transform: translateY(1rem);
    opacity: 0;
  }
}

.contact-bubble-item {
  display: flex;
  align-items: center;
  column-gap: 1rem;
}

.contact-bubble-link {
  &:after {
    display: block;
    mask-image: var(--icon);
  }
}

.contact-bubble-label {
  box-shadow: var(--box-shadow);
  background-color: var(--contact-bubble-label-bg-color);
  padding: 0.5rem;
  border-radius:  0.5rem 0 0 0.5rem;
}
footer {
  --footer-bg-color: var(--primary-bg-color);
}

.footer-section {
  background-color: var(--footer-bg-color);
}

.footer-section .container {
  row-gap: 2rem;
  padding-bottom: 3rem 2rem;
}

.footer-logo {
  transition: opacity 0.3s;
  width: fit-content;
  
  &:hover {
    opacity: 0.5;
  }
}

.footer-logo img {
  width: 16rem;
  min-width: 3rem;
}

.footer-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  column-gap: 4rem;
  row-gap: 2rem;
}

.footer-menu-item {
  display: flex;
  flex-direction: column;
  row-gap: 1rem;
}

.footer-menu-title {
  text-align: left;
  font-weight: var(--font-weight-semibold);
}

.footer-links {
  display: flex;
  flex-direction: column;
  row-gap: 0.5rem;
}

.footer-link a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.25rem;
  transition: text-decoration-color 0.3s;

  &:hover {
    text-decoration-color: currentColor;
  }
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: var(--border-secondary);
}

.footer-icon-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-icon-item {
  display: flex;
}

.footer-icon-item img {
  width: auto;
  height: 2rem;
}
.checkout-section {
  --return-link-color: var(--tertiary-text-color);
  --original-price-sale-color: var(--tertiary-text-color);
  --soldout-color: var(--error-color);
  --label-color: var(--tertiary-text-color);
  --label-bg-color: var(--primary-bg-color);
  --select-bg-color: var(--primary-bg-color);
  --radio-color: var(--primary-text-color);
  --inactive-radio-color: var(--tertiary-text-color);
  --variation-label-color: var(--tertiary-text-color);
  --error-dialog-bg-color: var(--popup-bg-color);

  visibility: hidden;

  &[data-empty] {
    visibility: visible;
  }

  &[data-empty="true"] :is(.checkout-overview, .checkout-form, .checkout-section .return-link) {
    display: none;
  }

  &[data-empty="true"] .container {
    row-gap: 2rem;
  }

  &[data-empty="true"] .empty-checkout-container {
    display: flex;
  }
}

body:has(.checkout-error-dialog[open]) {
  overflow: hidden;
}

body:has(.checkout-section) .header-section {
  position: static;

  &.not-scrolling-up {
    translate: none;
  }
}

body:has(.checkout-section) :is(footer, .topbar-section, .header-navigation, .header-utils) {
  display: none;
}

body:has(.checkout-section) .header-section .container {
  justify-content: center;
}

.checkout-title-container {
  display: flex;
  flex-direction: column-reverse;
  row-gap: 1rem;
}

.checkout-title {
  text-align: left;

  @media (width >= 56.25rem) {
    text-align: center;
  }
}

.checkout-section .return-link {
  width: fit-content;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.25rem;
  transition: text-decoration-color 0.3s;
  color: var(--return-link-color);
  display: flex;
  column-gap: 0.5rem;
  align-items: center;

  &:hover {
    text-decoration-color: currentColor;
  }

  &:before {
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/arrow-left.svg);
    display: block;
  }
}

.checkout-section .container {
  row-gap: 2rem;

  @media (width >= 56.25rem) {
    row-gap: 4rem;
  }
}

.empty-checkout-container {
  display: none;
  flex-direction: column;
  row-gap: 2rem;
  align-items: center;
  justify-content: center;
}

.checkout-overview {
  display: flex;
  row-gap: 2rem;
  flex-direction: column;
  border-bottom: var(--border-secondary);
  padding-bottom: 2rem;

  @media (width >= 56.25rem) {
    grid-column: 9 / -1;
    grid-row: 2 / 2;
    border-left: var(--border-secondary);
    padding-left: 3rem;
    padding-bottom: 0;
    border-bottom: none;
  }
}

.checkout-details {
  appearance: none;
  overflow: clip;

  @supports selector(::details-content) and (transition-behavior: allow-discrete) and (interpolate-size: allow-keywords) {
    &::details-content {
      transition: height 0.3s, opacity 0.3s, content-visibility 0.3s;
      transition-behavior: allow-discrete;
      opacity: 0;
      height: 0;
      content-visibility: hidden;
    }
  }

  &[open] {
    @supports not (transition-behavior: allow-discrete) {
      display: flex;
      flex-direction: column;
    }
    
    @supports selector(::details-content) and (transition-behavior: allow-discrete) and (interpolate-size: allow-keywords) {
      &::details-content {
        opacity: 1;
        height: auto;
        content-visibility: visible;
        display: flex;
        flex-direction: column;
      }
    }
  }
}

.checkout-details[open] .checkout-details-title-text:after {
  rotate: -180deg;
}

.checkout-details-title {
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  display: flex;
  column-gap: 1.5rem;
  text-align: left;

  &::-webkit-details-marker {
    display: none;
  }

  @media (width >= 56.25rem) {
    justify-content: space-between;
  }
}

.checkout-details-title-text {
  display: flex;
  column-gap: 1rem;
  align-items: center;

  &:after {
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/angle-down.svg);
    display: block;
    transition: rotate 0.3s;
  }
}

.checkout-details-title .checkout-total {
  display: none;

  @media (width >= 56.25rem) {
    display: inline;
  }
}

.checkout-items {
  display: flex;
  flex-direction: column;
  row-gap: 2rem;
  border-bottom: var(--border-secondary);
  padding-block: 2rem;

  @media (width >= 56.25rem) {
    row-gap: 3rem;
  }
}

.checkout-item {
  display: grid;
  grid-template-columns: minmax(0, 5rem) 1fr;
  column-gap: 1rem;

  @media (width >= 56.25rem) {
    column-gap: 2rem;
  }
}

.checkout-item-image-container {
  display: flex;
  height: fit-content;
}

.checkout-item-image {
  object-fit: cover;
  aspect-ratio: 1 / 1;
  width: 100%;
}

.checkout-item-details-container {
  display: flex;
  flex-direction: column;
  row-gap: 0.5rem;
  width: 100%;
}

.checkout-item-title-container {
  display: flex;
  width: 100%;
  flex-direction: column;
  row-gap: 0.5rem;
}

.checkout-item hgroup {
  row-gap: 0.25rem;
}

.checkout-item-name {
  text-align: left;
}

.checkout-item-comment:has(.checkout-item-comment-value:empty) {
  display: none;
}

.checkout-item-variations:has(.checkout-item-variation-label:empty, .checkout-item-variation-value:empty) {
  display: none;
}

.checkout-item-variations {
  display: flex;
  flex-direction: column;
}

.checkout-item-variation, 
.checkout-item-quantity,
.checkout-item-comment {
  color: var(--variation-label-color);
  width: fit-content;
}

.checkout-item-price {
  display: flex;
  text-align: left;
  width: fit-content;
  column-gap: 0.5rem;
  flex-wrap: wrap;

  &:has(.checkout-item-sale-price:not(:empty)) .checkout-item-original-price {
    text-decoration: line-through;
    color: var(--original-price-sale-color);
  }

  @media (width >= 56.25rem) {
    text-align: end;
  }
}

.checkout-item-sale-price:empty {
  display: none;
}

.checkout-item-sold-out {
  font-weight: var(--font-weight-semibold);
  color: var(--soldout-color);
  display: none;
  column-gap: 1rem;
  align-items: center;

  &:before {
    display: block;
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/warning.svg);
  }
}

.checkout-item[data-stockquantity="0"] .checkout-item-sold-out {
  display: flex;
}

.checkout-items[aria-busy="false"] .checkout-item.template {
  display: none;
}

.checkout-items[aria-busy="true"] .checkout-item.template.skeleton :is(.checkout-item-image-container, .checkout-item-name, .checkout-item-quantity, .checkout-item-original-price) {
  color: transparent;
  border-radius: 0.5rem;
  border: var(--border-transparent);
  background-color: var(--skeleton-start-bg-color);
  animation: skeleton-loading 1s infinite alternate;
  opacity: 0.7;
  pointer-events: none;
  min-width: 5rem;
  min-height: 1lh;
}

.checkout-items[aria-busy="true"] .checkout-item.template.skeleton .checkout-item-name {
  width: 8rem;
}

.checkout-items[aria-busy="true"] .checkout-item.template.skeleton .checkout-item-image {
  opacity: 0;
}

.coupon-form {
  margin-block: 2rem;
}

.coupon-form-container {
  display: flex;
  column-gap: 1rem;

  &[aria-busy="true"] {
    pointer-events: none;
    opacity: 0.7;
  }
}

.coupon-form button[type="submit"] {
  width: fit-content;
  position: relative;
}

.coupon-form[aria-busy="true"] button[type="submit"]:after {
  mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/loader.svg);
  display: block;
  animation: spin 1s linear infinite;
    position: absolute;
  left: 50%;
  translate: -50% 0;
}

.coupon-form[aria-busy="true"] button[type="submit"] span {
  visibility: hidden;
}

.coupon-message {
  display: flex;
  column-gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;

  &:empty {
    display: none;
  }

  &.error {
    color: var(--error-color);

    &:before {
      display: block;
      mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/warning.svg);
    }
  }

  &.success {
    color: var(--success-color);

    &:before {
      display: block;
      mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/check.svg);
    }
  }
}

.checkout-summary {
  display: flex;
  flex-direction: column;
  row-gap: 0.5rem;
}

.checkout-summary li {
  display: flex;
  justify-content: space-between;
}

.checkout-summary .checkout-total {
  font-weight: var(--font-weight-semibold);
  margin-top: 0.5rem;
}

.checkout-summary .checkout-discount:not(:has(.checkout-discount-amount[data-amount])) {
  display: none;
}

.checkout-details:has(.checkout-items[aria-busy="true"]) .checkout-total-amount {
  color: transparent;
  border-radius: 0.5rem;
  border: var(--border-transparent);
  background-color: var(--skeleton-start-bg-color);
  animation: skeleton-loading 1s infinite alternate;
  opacity: 0.7;
  pointer-events: none;
  min-width: 5rem;
  height: 1lh;
}

.checkout-summary .checkout-error-message {
  justify-content: start;
  color: var(--error-color);
  column-gap: 1rem;
  align-items: center;

  &:empty {
    display: none;
  }

  &:before {
    display: block;
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/warning.svg);
  }
}

.checkout-summary .checkout-delivery-hours-error-message,
.checkout-summary .checkout-pickup-hours-error-message {
  display: none;
  justify-content: start;
  color: var(--error-color);
  column-gap: 1rem;
  align-items: center;

  &:before {
    display: block;
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/warning.svg);
  }
}

.checkout-section:has(#delivery-hours-slot[data-unavailable="true"]):has(#delivery:checked) .checkout-summary .checkout-delivery-hours-error-message,
.checkout-section:has(#pickup-hours-slot[data-unavailable="true"]):has(#pickup:checked) .checkout-summary .checkout-pickup-hours-error-message {
  display: flex;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  row-gap: 2rem;

  @media (width >= 56.25rem) {
    grid-column: 1 / 9;
    grid-row: 2 / 2;
    padding-right: 3rem;
  }
}

.checkout-form-title {
  font-weight: var(--font-weight-semibold);
  margin-bottom: 1rem;
  text-align: left;
}

.checkout-form fieldset {
  border: none;
  display: flex;
  flex-direction: column;
  row-gap: 1.5rem;
  min-inline-size: initial;
}

.form-label,
.select-label {
  display: flex;
  flex-direction: column;
  row-gap: 0.5rem;
  position: relative;
  width: 100%;
  min-width: 0;
}

.form-label-text,
.select-label-text {
  position: absolute;
  background-color: var(--label-bg-color);
  color: var(--label-color);
  padding-inline: 0.25rem;
  left: 0.5rem;
  top: -0.75rem;
  max-width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.form-label input[type="text"],
.form-label input[type="email"],
.form-label input[type="tel"],
.form-label textarea {
  padding: 0.75rem;
  border: var(--border-secondary);
}

.form-label textarea {
  resize: vertical;
  field-sizing: content;
  min-height: 3lh;
  box-sizing: content-box;
}

.select-label:after {
  mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/angle-down.svg);
  display: flex;
  position: absolute;
  right: 1rem;
  pointer-events: none;
  top: 50%;
  translate: 0 -50%;
  background-color: var(--label-color);
}

.select-label[for="delivery-hours-slot"][aria-busy="true"]:before,
.select-label[for="pickup-hours-slot"][aria-busy="true"]:before {
  mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/loader.svg);
  display: flex;
  position: absolute;
  left: 1rem;
  pointer-events: none;
  top: 50%;
  translate: 0 -50%;
  background-color: var(--label-color);
  animation: spin 1s linear infinite;
}

.delivery-details-fieldset:has(#pickup:checked) .select-label[for="delivery-hours-slot"],
.delivery-details-fieldset:has(#delivery:checked) .select-label[for="pickup-hours-slot"] {
  display: none;
}

.select-label select {
  appearance: none;
  cursor: pointer;
  padding: 0.75rem;
  padding-right: 2.5rem;
  border: var(--border-secondary);
  opacity: 1;
  background-color: var(--select-bg-color);
	overflow: hidden;
	text-overflow: ellipsis;
}

.inline-field-group {
  display: grid;
  row-gap: 1.5rem;

  @media (width >= 56.25rem) {
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
    row-gap: 0;
  }
}

.radio-group {
  display: flex;
  flex-direction: column;
  border: var(--border-secondary);
}

.radio-label {
  display: flex;
  align-items: center;
  column-gap: 1rem;
  padding: 0.75rem;
  cursor: pointer;
  border-top: var(--border-secondary);

  &:first-child {
    border-top: none;
  }
}

.radio-label input[type="radio"] {
  cursor: pointer;
  accent-color: var(--radio-color);
}

.radio-label-text {
  display: flex;
  justify-content: space-between;
  width: 100%;
  column-gap: 1rem;
}

.radio-label:not(:has(:checked)) .radio-label-price {
  color: var(--inactive-radio-color);
}

.radio-label-price {
  font-weight: var(--font-weight-semibold);
}

.checkout-form .pickup-location-fieldset {
  display: none;
}

.checkout-form .delivery-method-fieldset .delivery-methods {
  display: none;
}

.checkout-form .delivery-method-fieldset .delivery-methods.visible {
  display: block;
}

.checkout-form:not(:has(.pickup-location-fieldset input[name="pickup-location"])) .delivery-details-fieldset label[for="pickup"],
.checkout-form:not(:has(.delivery-method-fieldset input[name^="delivery-method-"])) .delivery-details-fieldset label[for="delivery"] {
  display: none;
}

.delivery-details-fieldset[data-sitetype="webshop"] label[for="delivery"] .radio-label-text:after {
  mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/truck.svg);
  display: block;
  background-color: var(--inactive-radio-color);
}

.delivery-details-fieldset[data-sitetype="restaurant"] label[for="delivery"] .radio-label-text:after {
  mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/bicycle.svg);
  display: block;
  background-color: var(--inactive-radio-color);
}

.delivery-details-fieldset label[for="delivery"]:has(:checked) .radio-label-text:after {
  background-color: currentColor;
}

.delivery-details-fieldset[data-sitetype="webshop"] label[for="pickup"] .radio-label-text:after {
  mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/store.svg);
  display: block;
  background-color: var(--inactive-radio-color);
}

.delivery-details-fieldset[data-sitetype="restaurant"] label[for="pickup"] .radio-label-text:after {
  mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/pickup.svg);
  display: block;
  background-color: var(--inactive-radio-color);
}

.delivery-details-fieldset label[for="pickup"]:has(:checked) .radio-label-text:after {
  background-color: currentColor;
}

.checkout-form:has(input[type="radio"][name="delivery-type"][value="pickup"]:checked) .pickup-location-fieldset,
.checkout-form:has(input[type="radio"][name="delivery-type"][value="pickup"]:checked) .invoice-address-fields {
  display: flex;
}

.checkout-form:has(input[type="radio"][name="delivery-type"][value="pickup"]:checked) .delivery-method-fieldset,
.checkout-form:has(input[type="radio"][name="delivery-type"][value="pickup"]:checked) .delivery-details-fieldset > *:not(.radio-group, .checkout-form-title, label[for="pickup-hours-slot"]),
.checkout-form:has(input[type="radio"][name="delivery-type"][value="pickup"]:checked) .invoice-setting-fieldset .radio-group {
  display: none;
}

.delivery-details-fieldset[data-shipping-count="0"] .radio-group {
  border-top: none;
}

.address-fields {
  display: flex;
  flex-direction: column;
  row-gap: 1.5rem;
}

.invoice-address-fields {
  display: none;
  flex-direction: column;
  row-gap: 1.5rem;
}

.checkout-form:has(input[type="radio"][name="invoice-setting"][value="different-from-delivery"]:checked) .invoice-address-fields {
  display: flex;
}

.checkout-form:has(input[type="radio"][name="delivery-type"][value="pickup"]:checked):has(input[type="radio"][name="payment-method"][value="klarna"]:checked) .invoice-setting-fieldset {
  display: flex;
}

.checkout-form:has(input[type="radio"][name="payment-method"][value="cash"]:checked) .invoice-setting-fieldset,
.checkout-form:has(input[type="radio"][name="payment-method"][value="pinnen"]:checked) .invoice-setting-fieldset,
.checkout-form:has(input[type="radio"][name="delivery-type"][value="pickup"]:checked) .invoice-setting-fieldset {
  display: none;
}

.checkout-submit-button {
  width: 100%;

  &:disabled {
    pointer-events: none;
    opacity: 0.7;
  }
}

.checkout-form[aria-busy="true"] .checkout-submit-button {
  pointer-events: none;
  opacity: 0.7;

  &:before {
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/loader.svg);
    display: block;
    animation: spin 1s linear infinite;
  }
}

.checkout-form:not([aria-busy="true"]) .checkout-submit-button:before {
  mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/lock.svg);
  display: block;
}

.checkout-error-dialog {
  width: 30rem;
  max-width: 90%;
  max-height: 90%;
  background-color: var(--error-dialog-bg-color);
  border: var(--border-primary);
  margin: auto;

  &::backdrop {
    background-color: var(--backdrop-bg-color);
  }
}

.checkout-error-dialog-content {
  display: flex;
  flex-direction: column;
  row-gap: 1rem;
  padding: 1rem;
  align-items: center;
}

.checkout-error-dialog-title {
  color: var(--error-color);
  display: flex;
  flex-direction: column;
  row-gap: 1rem;
  align-items: center;

  &:before {
    display: block;
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/warning.svg);
  }
}

.checkout-error-dialog-message {
  text-align: center;
}

.checkout-error-dialog-button {
  margin-top: 1rem;
}

.checkout-error-dialog-close-button {
  position: absolute;
  top: 1rem;
  right: 1rem;

  &:before {
    mask-image: url(https://webshop.kamedia.nl/wp-content/themes/acf/assets/icons/close.svg);
    display: block;
  }
}
