#traktorpool-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
  margin: 0;

  #traktorpool-listings {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    align-items: stretch;
  }

  .tp-elem {
    flex: 1 1 28%;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    gap: 0.5rem;
    border: 1px solid #ccc;
    padding: 0.5rem;
    .tp-elem-category {
      font-size: 0.9rem;
      text-overflow: ellipsis;
      word-break: break-all;
    }
    .tp-elem-image-primary {
      width: 100%;
      background-size: cover;
      aspect-ratio: 4/3;
      background-position: center center;
      cursor: pointer;
      &:hover {
        opacity: 0.8;
      }
    }
    .tp-elem-other-image {
      background-size: cover;
      aspect-ratio: 4/3;
      width: calc(25% - 0.5rem);
      background-position: center center;
      cursor: pointer;
      &:hover {
        opacity: 0.8;
      }
    }
  }

  .tp-elem-section {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    position: relative;

    &.details {
      display: none;
      overflow: hidden;
      height: 0;
      opacity: 0;
      transition: height 0.3s ease, opacity 0.3s ease;
    }
    &.details.visible {
      display: flex;
      height: auto;
      opacity: 1;
      transition: height 0.3s ease, opacity 0.3s ease;
    }
    &.otherimages {
      justify-content: flex-start;
    }
    &.bool-attributes {
      ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 0 1rem;
        li {
          width: calc(50% - 0.5rem);
          display: flex;
          gap: 0.5rem;
          line-height: 1.3em;
          span.io {
            color: green;
          }
          span.nio {
            color: red;
          }
        }
      }
    }
    &.tableattributes {
      table {
        border-collapse: collapse;
        width: 100%;
      }
      table,
      tbody,
      tr,
      td {
        border: none;
        margin: 0;
      }
      tr {
        &:nth-child(even) {
          background-color: rgba(128, 128, 128, 0.1);
        }
        td {
          width: 50%;
          &:last-child {
            padding-left: 0.5rem;
          }
          line-height: 1.3em;
        }
      }
    }

    .tp-elem-col {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      &.c13 {
        width: calc(33% - 0.5rem);
      }
      &.c23 {
        width: calc(66% - 0.5rem);
      }
      .tp-elem-col-section {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        .tp-elem-title {
          flex: 1 1 20%;
          h5 {
            margin: 0;
            font-size: 1.1rem;
            font-weight: bold;
            word-break: break-all;
          }
        }
        .tp-elem-price {
          flex: 1 0 100px;
          text-align: right;
          .price {
            color: var(--traktorpool-primary-color);
            font-size: 1rem;
            font-weight: bold;
          }
          .mwst,
          .price_netto {
            font-size: 0.8rem;
          }
        }
      }
    }

    .tp-elem-shortdescription {
      font-size: 0.8rem;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 5;
      -webkit-box-orient: vertical;
      text-overflow: ellipsis;
      line-clamp: 5;
    }

    #traktorpool-loading {
      display: flex;
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      &.hidden {
        display: none;
      }
      &.visible {
        display: flex;
      }
    }
  }
  #traktorpool-filter {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
  }
  .tp-elem-btn,
  #traktorpool_reset-filter {
    box-shadow: none;
    border: 1px solid var(--traktorpool-primary-color);
    padding: 0.25rem 0.5rem;
    background-color: transparent;
    color: var(--traktorpool-primary-color);
    cursor: pointer;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    justify-content: center;
    &:hover {
      background-color: var(--traktorpool-primary-color);
      color: white;
    }
  }
  #traktorpool-filter select {
    width: 100%;
    max-width: 300px;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--traktorpool-primary-color);
    background-color: white;
    border-radius: 0;
    color: #333;
    font-size: 1rem;
    cursor: pointer;
    appearance: none; /* Remove default styling for consistency across platforms */
    option {
      color: #333;
    }
  }

  #traktorpool-filter select:focus {
    outline: none;
    border-color: var(--traktorpool-primary-color);
  }

  #traktorpool-filter {
    margin-bottom: 1rem;
  }
}
