@use "../../abstracts/variables"as *;

.product {
  &-content {
    margin-block: 3rem;
    display: grid;
    gap: var(--ev-grid-gutter, 1rem);
  }

  &-title::first-letter {
    text-transform: uppercase;
  }

  &-filter,
  &-list__header,
  &-list__body {
    background-color: rgba(127, 135, 184, 0.2);
    padding: 2rem;
  }

  &-list {
    &__header {
      margin-bottom: 1rem;
      display: flex;
      justify-content: space-between;
      align-items: center;

      .h5 {
        margin-bottom: 0;
      }
    }

    &__item {
      display: flex;
      gap: var(--ev-grid-gutter, 1rem);
      place-items: center;

      &>* {
        flex: 1;
      }

      &-top {
        flex: 0 0 auto;
        width: 30%;
        background: white;
        display: grid;
        place-content: center;
        height: 100%;
        padding: 1rem;
      }

      &-details {
        display: grid;
        gap: var(--ev-grid-gutter, 1rem);

        .btn-primary {
          width: fit-content;
          margin-top: 1rem;
        }

        p {
          font-size: 1rem;
        }

        ul {
          font-size: 1rem;
          opacity: 0.8;
        }
      }

      &-title {
        font-family: var(--ev-body-font-family);
        font-weight: normal;
        font-size: 1.15rem;
        line-height: 1.5;
      }
    }

    &__end {
      border-top: 1px solid #ffffff61;
      padding-top: 1rem;
      margin-top: 3rem;
      display: grid;
      place-content: center;

      .btn-link {
        color: var(--ev-body-color);
      }
    }
  }

  &-filter {
    height: 100%;

    &__header {
      display: flex;
      place-content: space-between;
      place-items: center;
      flex-wrap: wrap;
      margin-bottom: 1rem;

      &>* {
        font-size: 1rem;
        letter-spacing: .03em;
        padding: 0;
        margin: 0;
      }
    }
  }

  &-item {
    display: flex;
    gap: var(--ev-grid-gutter, 1rem);
    place-items: center;
    background-color: rgba(127, 135, 184, 0.2);
    padding: 0.75rem;
    height: 70px;

    &__title {
      font-size: 1.15rem;
      letter-spacing: 0.06em;
      margin-bottom: 0;
    }

    &__img {
      flex: 0 0 auto;
      width: 30%;
    }
  }

  &-details {
    margin-block: 5rem;

    &__content {
      display: flex;
      gap: var(--ev-grid-gutter, 1rem);
      margin-top: 2rem;
    }

    &__gallery {
      flex: 0 0 auto;
      width: 40%;
    }

    &__info {

      #panier {
        padding: .75rem;
      }

      .btn-outline-primary {
        --ev-btn-color: var(--ev-body-color);
        border-width: 2px;
        border-color: white;
      }
    }

    &__tocart {
      display: flex;
      gap: var(--ev-grid-gutter, 1rem);
      margin-block: 2rem 3rem;

      .btn {
        width: 100%;
      }
    }

    &__descr {
      h5 {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--ev-body-color);
      }

      ul {
        list-style-type: none;
        padding-left: 0;
      }

      b {
        display: inline-block;

        &::first-letter {
          text-transform: uppercase;
        }
      }
    }

    #productImg {
      position: relative;
    }

    .gallery-link {
      position: absolute;
      left: 1rem;
      bottom: 1rem;
      color: var(--ev-body-bg);
    }
  }
}

#ulProducts.d-list {
  margin: 0;
  list-style-type: none;
  padding: 0;
  display: grid;
  gap: var(--ev-grid-gutter, 1rem);

  .bi-cart::after {
    content: "Ajouter au panier";
    font-style: normal;
    margin-left: .25rem;
    display: inline-block;
  }
}

#ulProducts.d-grid {
  margin: 0;
  list-style-type: none;
  padding: 0;
  gap: var(--ev-grid-gutter, 1rem);

  #panier {
    position: absolute;
    top: 185px;
    right: 10px;
    opacity: 0;
  }

  h5 {
    font-size: 1rem;
  }

  h3 {
    font-size: 1.5rem;
    margin-top: -.75rem;
  }

  .product-list__item {
    display: flex;
    gap: 2rem;
    place-items: center;
    flex-direction: column;
    position: relative;

    &:hover #panier {
      opacity: 1;
      transition: all .5s ease-in;
    }
  }

  .product-list__item-top {
    flex: 0 0 auto;
    width: 100%;
    background: white;
    display: grid;
    place-content: center;
    height: 250px;
    padding: 1rem;
  }

  .product-list__item-details {
    display: grid;
    gap: 1rem;
    justify-content: center;
    text-align: center;
  }
  
  .product-list__item-details ul {
    font-size: 1rem;
    opacity: 0.8;
    display: none;
  }
}