.tab-section {
  margin-top: 2rem;
}

.tab-section .section {
  display: none;
}

.tab-section input {
  display: none;
}

.tab-section label {
  position: relative;
  order: 1;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  margin-right: -3px;
  margin-bottom: 0;
  cursor: pointer;
  font-weight: 600;
  background-color: var(--dark-purple);
  color: var(--white);
  min-height: 84px;
}

.tab-section label span {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.tab-section label:hover {
  cursor: pointer;
}

.tab-section label:first-of-type {
  margin-left: 32px;
  padding-left: 0;
}

.tab-section label:last-of-type {
  padding-right: 0;
  margin-right: 32px;
}

.tab-section label:first-of-type::before {
  position: absolute;
  display: block;
  content: "";
  width: 32px;
  height: 84px;
  top: 0;
  left: -32px;
  -webkit-mask: url(../../images/icons/tab-left.svg) no-repeat 50% 50%;
  mask: url(../../images/icons/tab-left.svg) no-repeat 50% 50%;
  -webkit-mask-size: cover;
  mask-size: cover;
  background-color: var(--dark-purple);
}

.tab-section label:last-of-type::after {
  position: absolute;
  display: block;
  content: "";
  width: 32px;
  height: 84px;
  top: 0;
  right: -32px;
  -webkit-mask: url(../../images/icons/tab-right.svg) no-repeat 50% 50%;
  mask: url(../../images/icons/tab-right.svg) no-repeat 50% 50%;
  -webkit-mask-size: cover;
  mask-size: cover;
  background-color: var(--dark-purple);
}

.tab-section label span::after {
  display: inline-block;
  content: "";
  width: 20px;
  height: 16px;
  -webkit-mask: url(../../images/icons/arrow.svg) no-repeat 50% 50%;
  mask: url(../../images/icons/arrow.svg) no-repeat 50% 50%;
  -webkit-mask-size: cover;
  mask-size: cover;
  background-color: var(--white);
}

.tab-section input:checked + label {
  background-color: var(--bright-yellow);
  color: var(--black);
}

.tab-section input:checked + label::before,
.tab-section input:checked + label::after {
  background-color: var(--bright-yellow);
}

.tab-section input:checked + label span::after {
  background-color: var(--black);
}

.tab-section #tab1:checked ~ #content1,
.tab-section #tab2:checked ~ #content2,
.tab-section #tab3:checked ~ #content3,
.tab-section #tab4:checked ~ #content4,
.tab-section #tab5:checked ~ #content5,
.tab-section #tab6:checked ~ #content6,
.tab-section #tab7:checked ~ #content7,
.tab-section #tab8:checked ~ #content8 {
  display: block;
  padding: 2rem 0;
}

.tab-section .section > div,
.cm-related-products .tab-buttons {
  max-width: calc(100% - 350px);
}

@media screen and (max-width: 992px) {
  .tab-section .section > div,
  .cm-related-products .tab-buttons {
    max-width: unset;
  }
}

.cm-related-products .tab-buttons a.button {
  max-width: 245px;
  width: 100%;
}

.cm-related-products .tab-buttons .availability {
  display: flex;
  justify-content: flex-end;
}

.cm-related-products .tab-buttons .enquiry {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
}

.cm-related-products .tab-buttons .enquiry p {
  max-width: 500px;
}

.cm-related-products .tab-buttons .enquiry a {
  height: fit-content;
  max-width: 245px;
  width: 100%;
}

@media screen and (min-width: 1024px) {
  .cm-related-products .tab-buttons .enquiry a {
    max-width: unset;
    width: auto;
  }
}

@media screen and (max-width: 992px) {
  .tab-section label {
    display: flex;
    justify-content: center;
    margin: 0 32px 1rem;
  }

  .tab-section label:first-of-type {
    margin: 0 32px 1rem;
    padding: 1rem 2rem;
  }

  .tab-section label:last-of-type {
    margin: 0 32px 1rem;
    padding: 1rem 2rem;
  }

  .tab-section label::before {
    position: absolute;
    display: block;
    content: "";
    width: 32px;
    height: 84px;
    top: 0;
    left: -32px;
    -webkit-mask: url(../../images/icons/tab-left.svg) no-repeat 50% 50%;
    mask: url(../../images/icons/tab-left.svg) no-repeat 50% 50%;
    -webkit-mask-size: cover;
    mask-size: cover;
    background-color: var(--dark-purple);
  }

  .tab-section label::after {
    position: absolute;
    display: block;
    content: "";
    width: 32px;
    height: 84px;
    top: 0;
    right: -32px;
    -webkit-mask: url(../../images/icons/tab-right.svg) no-repeat 50% 50%;
    mask: url(../../images/icons/tab-right.svg) no-repeat 50% 50%;
    -webkit-mask-size: cover;
    mask-size: cover;
    background-color: var(--dark-purple);
  }

  .tab-section input:checked + label::before,
  .tab-section input:checked + label::after {
    background-color: var(--bright-yellow);
  }

  .cm-related-products .tab-buttons .availability {
    flex-direction: column;
  }

  .cm-related-products .tab-buttons .enquiry {
    flex-direction: column;
    gap: 0;
  }
}

.tab-section .section .glance h2 {
  margin-bottom: 0.5em;
}
