@media screen and (max-width: 900px) {
  /* --- VIEW 3D PAGE --- */

  .viewer {
    display: flex;
    flex-direction: column; /* stacked */
    height: auto;
  }

  .view-3d {
    display: block;
    width: 100%;
    height: calc(100dvh - 80px);
    background-color: rgba(255, 255, 255, 0);
  }

  .view_3d_panel {
    display: block;
    position: relative;
    float: none;
    width: 100%;
    height: auto;
    overflow-y: visible;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    background-color: rgb(250, 250, 250);
    border: none;
  }

  .view_3d_scroll {
    display: block;
    position: relative;
    height: auto;
    overflow-y: visible;
    background-color: var(--background6);
  }

  .view_3d_title {
    color: rgb(0, 0, 0);
    display: flex;
    justify-items: center;
    align-items: center;
    width: 100%;
    gap: 10px;
  }

  .view_3d_drag {
    display: block;
    position: absolute;
    width: 30px;
    height: 5px;
    background-color: var(--background2);
    top: 10px;
    border-radius: 10px;
  }

  .view_3d_label {
    font-size: 0.7rem;
    font-weight: 300;
    color: rgb(100, 100, 100);
  }

  .view_3d_value {
    font-size: 1.2rem;
    font-weight: 500;
    color: rgb(0, 0, 0);
  }

  .view_3d_information {
    border-top: 1px solid rgb(230, 230, 230);
  }

  .view_3d_information:first-child {
    border-top: 0px solid rgb(230, 230, 230);
  }

  #ar-button {
    display: block;
  }

  .models {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0);
    padding-bottom: 10px;
    color: rgb(255, 255, 255);
    position: absolute;
    right: -25px;
    top: 5px;
    transform: translateX(-50%);
    font-size: 16px;
    font-weight: 500;
    width: 50px;
    height: auto;
    border-radius: 100px;
    margin: 10px;
    padding: 5px;
    border: 1px solid rgba(237, 237, 237, 0);
  }

  .models img {
    display: block;
    position: relative;
    width: 40px;
    height: 40px;
    margin: 5px;
    margin-top: 5px;
    margin-bottom: 20px;
    transform: translate(0px, 0px);
    border: 1px solid rgba(237, 237, 237, 1);
  }

  .models img:last-child {
    margin-bottom: 5px;
  }

  .containerMaterials {
    position: absolute;
    top: auto;
    bottom: 55px;
    transform: none;
    left: auto;
    right: 0px;
    padding-right: 0px;
    height: 100%;
    width: auto;
    padding-left: auto;
  }

  .materials {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    width: auto;
    left: auto;
    height: auto;
    right: 0px; /* Keep the right offset */
    bottom: 40px; /* Add the bottom offset */
    z-index: 5;
    background-color: #ffffff00;
    border-radius: 50px;
    border: 1px solid rgba(237, 237, 237, 0);
    transform: translateX(-5px);
    padding-top: 5px;
    padding-left: 0px;
    padding-right: 0px;
    padding-bottom: 5px;
  }

  .materialBtn {
    display: inline-block;
    position: relative;
    top: auto;
    border: 1px solid var(--background5);
  }

  .materialBtn img {
    height: 55px;
    width: 55px;
    margin: 0px;
    border-radius: 50px;
    padding: 3px;
    border: 0px solid var(--bordergray);
  }

  .materials .materialBtn img:hover {
    height: 55px;
    width: 55px;
    border: 0px solid var(--bordergray);
    padding: 3px;
  }

  .materials .materialBtn img:active {
    height: 55px;
    width: 55px;
    border: 0px solid var(--bordergray);
    padding: 3px;
  }

  .container_model_title {
    display: flex;
    justify-content: left;
    align-items: center;
    margin-left: 45px;
    width: 100%;
  }

  .material_title {
    display: inline-block;
    position: absolute;
    text-align: left;
    bottom: -1px;
    top: auto;
    white-space: nowrap;
    line-height: 30px;
    font-size: 16px;
    font-weight: 500;
    color: rgb(132, 159, 175);
    background-color: rgb(255, 255, 255);
    z-index: 51;
    padding-top: 8px;
    padding-bottom: 10px;
    padding-left: 33px;
    padding-right: 20px;
    border-top-left-radius: 0px;
    border-bottom-left-radius: 0px;
    border-top-right-radius: 100px;
    border-bottom-right-radius: 100px;
    border: 1px solid rgba(237, 237, 237, 1);
    border-left: 0px;
  }

  .variant-name {
    margin-top: 5px; /* Adjust as needed for spacing */
    height: 30px; /* Adjust as needed */
    width: 100px;
    color: rgb(0, 0, 0);
    text-align: center;
  }

  .view_3d_share {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
    width: 100%;
    background-color: var(--background6);
  }

  .view_3d_button {
    background-color: var(--button3);
    font-size: 1.4rem;
    border: none;
  }

  .view_3d_button:hover {
    background-color: var(--button3_hover);
  }

  .view_3d_button:active {
    background-color: var(--button3_active);
  }

  .modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 10%; /* Start at 10% of the screen */
    max-height: 80%; /* Max height is 80% of the screen */
    background-color: transparent;
    transition: height 0s ease;
    z-index: 90;
    background-color: rgb(255, 255, 255);
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
  }

  .view-3d_settings.collapsed {
    height: auto;
  }

  .view-3d_settings {
    height: auto;
  }

  .scroll-container {
    overflow-y: auto;
    max-height: 100%;
    flex-grow: 1;
    padding: 0px;
    background-color: rgb(255, 255, 255);
  }

  .modal-container {
    overflow-y: auto;
    max-height: 100%;
    flex-grow: 1;
    padding: 10px;
    background-color: rgb(255, 255, 255);
    height: 700px;
  }

  .share_buttons {
  }

  .modals {
    display: block;
  }

  .modal-header {
    display: flex;
    height: 80px;
    min-height: 80px;
    background-color: rgb(255, 255, 255);
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
  }

  .modal-header_upload {
    display: none;
    height: 80px;
    min-height: 80px;
    background-color: rgb(255, 255, 255);
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
  }

  .toggle_viewer_information {
    display: flex;
  }

  .project_title_container {
    font-size: 1.5rem;
  }

  .view_3d_share_modal_sharing_button_card button {
    font-size: 0.9rem;
  }

  /* --- FETCHED MODELS FROM MONGODB --- */

  #models_loaded {
    grid-template-columns: repeat(auto-fit, minmax(200px, 2fr));
    margin-top: 0px;
  }

  /* --- QR CODE --- */

  .qrcode_container {
  }

  /* SCROLLEBLE GRID */

  .scroll_grid {
    justify-content: flex-start;
  }

}
