@import url("./styles.css");

/*=============== DETAILS ===============*/
.details__container {
    grid-template-columns: 5.5fr 6.5fr;
  }
  
  .details__img {
    margin-bottom: 0.5rem;
    max-height: 500px;
  }
  
  .details__small-images {
    grid-template-columns: repeat(4, 1fr);
    column-gap: 0.625rem;
  }
  
  .details__small-img {
    cursor: pointer;
    max-height: 100px;
  }
  
  .details__title {
    font-size: var(--h2-font-size);
  }
  
  .details__category {
    font-size: var(--small-font-size);
    margin-block: 1rem;
  }
  
  .details__category span {
    color: var(--text-color-light);
  }
  
  .details__price {
    border-top: 1px solid var(--border-color-alt);
    border-bottom: 1px solid var(--border-color-alt);
    padding-block: 1rem;
    column-gap: 1rem;
  }
  
  .details__price .new__price {
    font-size: var(--h2-font-size);
  }
  
  .details__price .old__price {
    font-size: var(--normal-font-size);
    font-weight: var(--weight-500);
  }
  
  .short__description {
    margin-block: 1rem 2rem;
  }
  
  .list__item,
  .meta__list {
    font-size: var(--small-font-size);
    margin-bottom: .75rem;
  }
  
  .details__customization {
    column-gap: .75rem;
  }
  
  
  .details__customization {
    margin-bottom: 2.5rem;
  }
  
  .customization-value__list {
    display: flex;
    column-gap: 0.25rem;
  }
  
  
  .customization-value__link {
    border: 1px solid var(--border-color-alt);
    padding: .375rem .75rem .5rem;
    color: var(--text-color);
    font-size: var(--small-font-size);
  }
  
  .customization-value-active {
    background-color: var(--yellow-color);
    color: var(--body-color);
  }
  
  .details__action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
    background-color: #f8f8f8;
  }
  
  .quantity-btn {
    background-color: #fff;
    border: none;
    font-size: 18px;
    padding: 10px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
  }
  
  .quantity-btn:hover {
    background-color: #e0e0e0;
  }
  
  
  .quantity {
    border: none;
    text-align: center;
    font-size: 16px;
    width: 50px;
    height: 40px;
    outline: none;
    background-color: #fff;
    color: #333;
    padding: 0 10px;
  }

  .quantity:focus {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  }
  
  .details__meta {
    border-top: 1px solid var(--border-color-alt);
    padding-top: 1rem;
  }
  
  /*=============== DETAILS INFO & REVIEWS ===============*/
  .detail__tabs {
    display: flex;
    column-gap: 1.7rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
  }
  
  .detail__tab {
    font-family: var(--second-font);
    font-size: var(--large-font-size);
    font-weight: var(--weight-600);
    cursor: pointer;
  }
  
  .detail__tab.active-tab {
    color: var(--yellow-color);
  }
  
  .details__tab-content:not(.active-tab) {
    display: none;
  }
  
  .info__table tr th,
  .info__table tr td {
    border: 1px solid var(--border-color-alt);
    padding: 0.625rem 1.25rem;
  }
  
  .info__table tr th {
    font-weight: var(--weight-500);
    text-align: left;
  }
  
  .info__table tr td {
    color: var(--text-color-light);
  }
  
  .reviews__container {
    padding-bottom: 3rem;
    row-gap: 1.25rem;
  }
  
  .review__single {
    border-bottom: 1px solid var(--border-color-alt);
    padding-bottom: 1.2rem;
    display: flex;
    align-items: flex-start;
    column-gap: 1.5rem;
  }
  
  .review__single:last-child {
    padding-bottom: 3rem;
  }
  
  .review__img {
    width: 70px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
  }
  
  .review__title {
    font-size: var(--tiny-font-size);
  }
  
  .review__data {
    width: calc(100% - 94px);
  }
  
  .review__description {
    margin-bottom: 0.5rem;
  }
  
  .review__rating {
    color: hsl(42, 100%,  50%);
    margin-bottom: 0.25rem;
  }
  
  .review__rating,
  .review__date {
    font-size: var(--small-font-size);
  }
  
  .review__form-title {
    font-size: var(--large-font-size);
    margin-bottom: 1rem;
  }
  
  .rate__product {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: row;
  }

   /*=============== RELATED PRODUCTS ===============*/
  .related__products {
    overflow: hidden;
  }
  
  .related__products__container {
    position: relative;
  }
  
  .swiper-button-next,
  .swiper-button-prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    color: white;
    cursor: pointer;
  }
  
  .swiper-button-next {
    right: 10px;
  }
  
  .swiper-button-prev {
    left: 10px;
  }
  
  /* Swiper class */
  .swiper {
    overflow: initial;
  }
  
  .swiper-button-next:after,
  .swiper-button-prev:after {
    content: '';
  }
  
  .swiper-button-next,
  .swiper-button-prev {
    top: -1.875rem;
    background-color: var(--first-color-alt);
    border: 1px solid var(--border-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--first-color);
    font-size: var(--tiny-font-size);
  }
  
  .swiper-button-prev {
    left: initial;
    right: 2.5rem;
  }
  
  .swiper-button-next {
    right: 0;
  }

  /*=============== ADD TO CART ANIMATION ===============*/
  @keyframes addToCartAnimation {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.7;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
        top: 20px;
        left: calc(100% - 100px);
    }
  }

  .add-to-cart-animation {
    position: fixed;
    width: 20px;
    height: 20px;
    background-color: var(--yellow-color);
    border-radius: 50%;
    animation: addToCartAnimation 0.8s ease-out forwards;
    z-index: 1000;
    pointer-events: none;
  }

   /* For large devices */
   @media screen and (max-width: 1200px) {
    .swiper-button-next,
    .swiper-button-prev {
      top: -28px;
      width: 26px;
      height: 26px;
    }
  
    .swiper-button-prev {
      right: 36px;
    }

    .details__category {
      margin-block: .75rem;
    }
  
    .details__price {
      padding-block: 0.75rem;
    }
  
    .short__description {
      margin-bottom: 1.5rem;
    }
  
    .details__color {
      margin-block: 1.75rem 1.25rem;
    }
  
    .details__size {
      margin-bottom: 2.25rem
    }
  
    .color__link {
      width: 22px;
      height: 22px;
    }
  
    .size__link {
      padding: .375rem .625rem;
    }
  
    .details__action {
      margin-bottom: 2.75rem;
    }
  }

  /* For medium devices */
  @media screen and (max-width: 992px) {
    .details__container {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  @media screen and (max-width: 768px) {
    .details__container {
      grid-template-columns: 100%;
    }
  }

  /* For small devices */
  @media screen and (max-width: 576px) {
    .details__tabs {
      column-gap: 1.25rem;
      margin-bottom: 2.5rem;
    }
  }

  @media screen and (max-width: 350px) {
    .swiper-button-next,
    .swiper-button-prev {
      display: none;
    }
  }