/* Spacing for the Hydra and Lotino sections */
#hydra_section{
  margin-top: 100px;
}
#lotino_section{
  margin-top: 50px;
}


/* Main grid container */
.grid{
  position: relative;
  z-index: 1;
  width: 90%;
  display: flex;
  height: 78vh; /* Large visual height for desktop */
  min-height: 400px;
  margin-left: 5%; /* Centers the grid */
  gap:5%; /* Space between items */
  justify-content: center;
  align-items: center;
}

/* Specific background for picture items */
.grid_item_picture{
    background-color: #dee3d1!important;
}

/* Base width for picture and link elements inside the grid */
.grid_item_picture, .a_img_grid{
  width: 90%;
}

/* Background color for new grid items */
.new_item_grid{
  background-color: #bac59f;
}
.back_item{
  background-color: #bac59f;
}
.back_white_item{
  background-color: rgb(228, 231, 221);
}



/* ---------------- MEDIA QUERIES ---------------- */

@media (max-width: 1280px) and (max-height:1024px) {
  .new_items{
    min-height: 300px;
    height:60%;
  }
  .resp_grid_item{
    height:80%;
  }
  #btn_grid1{
    margin-top: 0;
  }
}
@media (max-width: 1280px) and (max-height:800px) {
  .new_items{
    min-height: 380px;
    height:80%;
  }
  #btn_grid1{
    margin-top: 50px;
  }
}



/* Tablets / Medium screens */
@media (max-width: 1152px) {
  .grid{
    flex-wrap: wrap; /* Items drop to next line */
    margin-top: 50px;
    height: auto; /* Allows content to expand naturally */
    row-gap: 40px; /* Vertical space between rows */
  }
  .new_item_grid{
    width: 25%;
    height:65vh;
    max-height: 400px;
    min-height: 400px;
  }
}


/* Slightly smaller tablets */
@media (max-width: 950px) {
  .new_item_grid{
    width:30%;
    height:70vh;
  }
}


/* Between tablet and mobile */
@media (max-width: 850px) {
  .item_picture {
    height: 60%; /* Reduces picture height to fit layout */
  }
}


@media (max-width: 800px) {
  .card{
    min-height: auto;
    height: 100%;
  }
  .new_items{
    min-height: 60vh;
    height:60vh;
  }
  .resp_grid_item{
    height:100%;
  }
}

/* Small mobile */
@media (max-width: 700px) {
  .new_item_grid{
    width:35%;
    height:70vh;
  }
  .new_items{
    width: 40%;
  }
}


/* Mobile layout adjustments */
@media (max-width: 600px) {
  .grid{
    width:100%;
    margin-left: 0; /* Full width on small screens */
  }
  .new_item_grid{
    padding: 3px;
    width: 43%;
  }
  .item_top{
    margin-top: 10px;
  }
  .new_item_grid{
    height:20vh;
    min-height: 320px;
  }
  .item_picture{
    width: 85%;
  }
  .item_top{
    display: none; /* Hides top section on mobile */
  }
  .item_picture{
    margin-top: 20px;
  }
  #cotainer_titre_product{
    width: 100%;
    margin-left: 0;
    padding: 10PX;
  }
}


/* Very small screens */
@media (max-width: 350px) {
  .grid_item_picture{
    height:55%;
  }
}