/* HEADER BLOCK */
.cbp-header {
  --line-color: #AEAEAE;
  --color-h: #333;
  --color-t: #666;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  margin-top: 1rem !important;

  >h2 {
    font-size: 1.75rem;
    text-transform: uppercase;
    color: var(--color-h);
    font-family: "Raleway", sans-serif;
    font-weight: 500;
    margin: 0 !important;

    &:empty {
      display: none !important;
    }
  }

  >p {
    margin: 0 !important;
    font-size: 1.5rem;
    font-family: "Raleway", sans-serif;
    font-weight: 300;
    color: var(--color-t);
    line-height: 1.2;

    &:empty {
      display: none !important;
    }
  }

  &:has(>h2+p) {
    >p {
      font-size: 1.125rem;
    }
  }

  >.wp-block-image {
    margin: 0 !important;

    >figure {
      position: relative;
      margin-bottom: 0 !important;

      &::before,
      &::after {
        position: absolute;
        content: '';
        height: 2px;
        width: 75px;
        top: 50%;
        transform: translateY(-50%);
        background-color: var(--line-color);
      }

      &::before {
        right: 45px;
      }

      &::after {
        left: 45px;
      }
    }
  }

  @media(max-width: 1024px) {
    >p {
      font-size: 1.2rem;
    }

  }
}

/* COLUMNS BLOCK */
.cbp-columns {
  gap: 6rem;

  .cbp-column {
    border: 1px solid #DDDDDD;
    box-shadow: 3px 2px 7px rgba(0, 0, 0, 0.35);
    background: #F4F4F4;
    padding: 20px !important;
    margin: 0 !important;
    align-self: stretch;
    position: relative;
    transition-property: transform, background-color, border-color, box-shadow;
    transition-duration: 0.3s;
    transition-timing-function: ease-in;

    &:hover {
      transform: scale(1.03);
      background: #DDDDDD;
      border-color: #AEAEAE;
      box-shadow: 3px 2px 12px rgba(0, 0, 0, 0.45);
    }
  }
}

/* SECTION W 100vw black background */
.cbp-section {
  position: relative;
  z-index: 1;
  padding-top: 60px;
  padding-bottom: 60px;

  &.black {
    --bc: #000;
    background-color: var(--bc);

    &::before,
    &::after {
      position: absolute;
      background-color: var(--bc);
      width: 50vw;
      height: 100%;
      top: 0;
      content: '';
      z-index: -1;
    }

    &::before {
      left: -50vw;
    }

    &::after {
      right: -50vw;
    }
  }
}

/* LIST WITH ICONS (CHECK) */
.cbp-icon-list {
  --cr: var(--red);
  font-family: "Raleway", sans-serif;
  margin-left: 0;
  list-style: none;

  li {
    margin-bottom: 1rem;

    >strong {
      color: var(--cr);
    }

    &::before {
      content: "\f00c";
      /* FontAwesome Unicode */
      font-family: FontAwesome;
      display: inline-block;
      margin-right: 12px;
      color: var(--deco);
      text-shadow: 1px 1px 3px #000;
      font-family: "Font Awesome 5 Free";
      font-weight: 900;
      display: inline-block;
    }
  }
}

/* Product tile */
.cbp-product-container {
  padding-top: 60px;
  padding-bottom: 60px;

  &.no-margin {
    margin: 0 !important;
    padding: 0 !important;

    .cbp-product-tile {
      margin: 0 !important;
    }
  }
}

.cbp-product-tile {
  .amount::before {
    display: inline;
    content: 'CENA: ';
  }

  .wp-block-post-title>a {
    text-decoration: none !important;
    outline: none !important;
  }

  .wp-block-woocommerce-product-summary {
    text-align: center;
  }

  .button-holder {
    display: flex;
    justify-content: center;
  }
}

/* Equals columns */
.cbp-equals {
  >div {
    margin-right: 0 !important;
  }

  .wp-block-image {
    margin: 0 !important;
  }
}

.cbp-btn-holder {
  margin: 0 !important;
  padding: 0 !important;
  flex-basis: 50% !important;
  flex-grow: unset !important;
  margin-left: auto !important;
  margin-right: auto !important;

  .cbp-but-button-extra {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  &.half {
    flex-basis: 50% !important;
    display: flex;
    align-items: center;

    .wp-block-woocommerce-single-product {
      height: 100%;

      >.wp-block-columns {
        height: 100%;
        margin-bottom: 0 !important;

        .cbp-but-button-extra {
          align-self: stretch;
        }
      }
    }
  }
}

.cbp-but-button-extra {
  position: relative;
  margin-bottom: 0 !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem !important;
  flex-basis: fit-content !important;
  flex-grow: unset !important;
  margin-left: auto !important;
  margin-right: auto !important;

  &.half {
    flex-basis: 50% !important;
  }

  >* {
    transition: opacity .3s ease-in-out;
  }

  .old-price {
    position: relative;

    &::before,
    &::after {
      position: absolute;
      content: '';
      width: 130%;
      height: 1px;
      background-color: #000;
      opacity: 0.8;
      top: 50%;
      left: 50%;
    }

    &::before {
      transform: translate(-50%, -50%) rotate(17deg);
    }

    &::after {
      transform: translate(-50%, -50%) rotate(-17deg);
    }

  }

  .wp-block-add-to-cart-form {
    height: 0;

    form.cart {
      height: 0 !important;
    }

    .quantity {
      display: none !important;
    }

    button {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      opacity: 0;
    }
  }

  &:has(button:hover) {
    >* {
      opacity: .7;
    }
  }

  &.single {
    .wp-block-buttons {
      opacity: 0;
      height: 0 !important;

      .wp-element-button {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
      }
    }

    &:has(.wp-element-button:hover) {
      >* {
        opacity: .7;
      }
    }
  }

  &.alt {
    transition-property: background-color, border;
    transition-duration: 0.3s;
    transition-timing-function: ease-in;

    p,
    bdi {
      transition: color .3s ease-in-out;
    }

    figure {
      margin-bottom: 0 !important;

      img {
        transition: filter .3s ease-in-out;
        filter: invert(1);
      }
    }

    .old-price {

      &::before,
      &::after {
        background-color: var(--red);
        height: 2px;
        opacity: 1;
        width: 110%;
      }
    }

    &:has(button:hover) {
      background: #000 !important;
      border: 5px solid #0000FF !important;

      >* {
        opacity: 1;
      }

      p,
      bdi {
        color: #fff !important;
      }

      img {
        filter: unset;
      }
    }
  }
}

/* FILE TO DOWNLOAD */
.cbp-file>.wp-block-columns {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 2rem !important;
  margin-bottom: 2rem !important;
  border-bottom: 1px solid #666;
	
	*{
		word-break: keep-all;
	}

  >.wp-block-column {
    margin-bottom: 0 !important;
    align-self: center;

    &:last-of-type {
      justify-content: flex-end;
    }
  }

  /* TEXT */
  .wp-block-post-title {
    display: block;
    font-size: 1.75rem;
    color: #333;
    text-decoration: none !important;
    outline: none !important;
    font-weight: 500;
    line-height: 1.2;
    font-family: "Raleway", sans-serif;
    transition: text-shadow 0.3s ease-in-out;

    &:hover {
      text-shadow: -1px -1px 0 #000;
    }
  }

  @media (max-width: 1024px) {
    h2 {
      font-size: 1.25rem !important;
      text-align: center;
    }

    >.wp-block-column {
      justify-content: center !important;
    }
  }
}

@media (max-width:1024px) {
  .cbp-file>.is-layout-flex>.is-layout-flow {
    flex-direction: column;
  }
}

.somdn-download-archive,
.download-not-logged>a {
  outline: none !important;
  background: unset !important;
  position: relative;
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  font-family: "Raleway", sans-serif;
  line-height: 1.2 !important;
  color: #000;
  transition-property: transform, color, border !important;
  transition-duration: 0.3s !important;
  transition-timing-function: ease-in-out !important;
  border: 2px solid #000 !important;
  border-radius: 8px !important;

  &:hover {
    transform: scale(1.05);
    color: var(--red) !important;
    border-color: var(--red) !important;
  }
}

.somdn-download-archive {
  padding: 1rem 1rem 1rem 4rem !important;

  &::before {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    content: url(assets/icons/download.svg);
    transition: filter .25s ease-in-out;
  }

  &:hover {
    &::before {
      filter: invert(17%) sepia(90%) saturate(6972%) hue-rotate(356deg) brightness(93%) contrast(112%);
    }
  }
}

.download-not-logged>a {
  padding: 1rem !important;
}


/* Free files search */
/* IF NO FILES AFTER HEADER */
.cbp-header-columns {
  &:not(:has(+.cbp-file)) {
    display: none !important;
  }
}

.loader {
  display: none;

  &:has(+.opinions.load) {
    display: block;
    text-align: center;
    width: 100%;
    position: relative;

    >div {
      position: absolute;
      top: 100px;
      left: 50%;
      transform: translateX(-50%);
      width: 150px;
      height: 150px;
      background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><linearGradient id="a10"><stop offset="0" stop-color="%23000000" stop-opacity="0"></stop><stop offset="1" stop-color="%23000000"></stop></linearGradient><circle fill="none" stroke="url(%23a10)" stroke-width="30" stroke-linecap="round" stroke-dasharray="0 44 0 44 0 44 0 44 0 360" cx="100" cy="100" r="70" transform-origin="center"><animateTransform type="rotate" attributeName="transform" calcMode="discrete" dur="1" values="360;324;288;252;216;180;144;108;72;36" repeatCount="indefinite"></animateTransform></circle></svg>');
    }
  }
}

.opinions {
  transition: opacity 1s ease-in-out;
  opacity: 1;

  &.load {
    opacity: 0;
  }
}

.single-opinion {
  width: calc(50% - 24px);
  text-align: center;
  border: 1px solid #DDDDDD;
  box-shadow: 3px 2px 7px rgba(0, 0, 0, 0.35);
  background: #F4F4F4;
  padding: 10px;
  position: relative;
  margin-bottom: 24px;
  transition: opacity 1s ease-in-out .5s;

  >.fb-post {
    width: 100% !important;
    max-width: 100% !important;

    >span {
      display: flex !important;
      justify-content: center !important;
      width: 100% !important;
      max-width: 100% !important;
    }
  }

  @media(max-width: 1024px) {
    width: 100%;
  }
}


.cbp-opinion-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;

  input,
  textarea {
    width: 100%;
  }
}


.cbp-custom-box-shadow-1 {
  box-shadow: 3px 2px 7px rgba(0, 0, 0, 0.35);
}

#opinion-slider {
  &.load {
    height: 250px;
  }

  .glide__slides {
    display: flex;
    align-items: center;
  }

  .glide__arrows {
    .glide__arrow {
      background-color: #DDD;
      color: #000;
      border-color: transparent;
      font-weight: 700;
      transition: all .3s ease-in-out;

      &:hover {
        background-color: var(--deco);
      }
    }

    .glide__arrow--left {
      left: -4rem;
    }

    .glide__arrow--right {
      right: -4rem;
    }

    @media(max-width: 1250px) {
      .glide__arrow {
        border-color: #000
      }

      .glide__arrow--left {
        left: -1rem;
      }

      .glide__arrow--right {
        right: -1rem;
      }
    }
  }
}

.cbp-col-more-link-space {
  p>a {
    line-height: 2.5;
  }
}

.cbp-image-rotate {
  position: relative;

  .cbp-image-rotate-1 {
    /* transform: scale(0.8) rotate(10deg) */;
    position: relative;
    max-height: 650px;
    >a, >a>img{
      max-height: inherit;
      object-fit: contain;
    }
    /*&::after{
      position: absolute;
      bottom: -120px;
      right: -130px;
      content: '';
      width: 150px;
      height: 300px;
      z-index: 2;
      background: url("assets/images/arrow-alt.webp") no-repeat center;
      background-size: contain;
      transform: rotate(-10deg);
    }*/
  }

  >p {
    line-height: 1.1;

    >a {
      text-decoration: none !important;
      padding-right: 28%;
      position: relative;
      top: -40px;
    }
  }
}
