/* ========================================================================
   Global
   ======================================================================== */

.main__inner {
    margin-left: auto;
    margin-right: auto;
    max-width: 935px;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

@media not all and (min-width: 768px) {
    .main__inner {
        padding: 0.75rem;
        padding-top: 3.5rem;
    }
}

/* ========================================================================
   Styles Item Show
   ======================================================================== */

.item .item-images {
    position: relative;
    max-height: 282px;
}

.item-images ul {
    height: 100%;
}

.item-images .item-img {
    width: 100%;
    min-height: 270px; /* Valeur par défaut mobile */
    max-height: 282px;
}

.item-images .item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Desktop */
@media (min-width: 768px) {
    .item .item-images {
        min-height: 286px;
        max-height: 495px;
    }

    .item-images .item-img {
        min-height: 286px;
        max-height: 495px;
    }
}

/* ========================================================================
   Explore gallery Layout
   ======================================================================== */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem;
}

@media (min-width: 640px) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

.gallery a {
  display: block;
}

.gallery__card {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
}

.gallery__card  a {
  height: 100%;
  width: 100%;
}

.card__image {
  position: relative;
  aspect-ratio: 2.5/3;
  height: 100%;
  width: 100%;
}

@media (min-width: 640px) {
  .card__image {
    height: 13rem;
  }
}

@media (min-width: 1024px) {
  .card__image {
    height: 15rem;
  }
}

.card__image img {
  height: 100%;
  width: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

@media (min-width: 640px) {
  .gallery .gallery__card:nth-child(3),
    .gallery .gallery__card:nth-child(6),
    .gallery .gallery__card:nth-child(13),
    .gallery .gallery__card:nth-child(16),
    .gallery .gallery__card:nth-child(23),
    .gallery .gallery__card:nth-child(26) {
    grid-row: span 2 / span 2;
  }
}

.gallery .gallery__card:nth-child(3)   .card__image ,
    .gallery .gallery__card:nth-child(6)   .card__image ,
    .gallery .gallery__card:nth-child(13)  .card__image ,
    .gallery .gallery__card:nth-child(16)  .card__image ,
    .gallery .gallery__card:nth-child(23)  .card__image ,
    .gallery .gallery__card:nth-child(26)  .card__image {
  height: 100%;
}
