* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  body, html {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100%;
    cursor: none;
    font-family: 'IBM Plex Mono', monospace;
  }

  .grid1 {
    display: grid;
    grid-template-rows: repeat(5, auto);
    grid-auto-flow: column;
    gap: 3vw 3vw;
    position: absolute;
    top: 1.7vw;
    left: 17vw;
    width: max-content;
    height: max-content;
    transition: transform 0.1s linear;
  }
  
  .project-container {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
    padding-right: 17vw;
    padding-bottom: 8vh;
    box-sizing: border-box;
  }
  
  .image-block1 {
    width: 12vw;
    margin-right: 3vw;
    font-size: 0.7vw;
  }
  .image-block1 img {
    width: 100%;
    display: block;
  }

  
 .image-block1 p:first-child {
     text-align: center;
    margin: 0 0 0.5vw 0;
    }

    .footer-text {
        position: fixed;
        left: 0vw;
        bottom: 1.3vw;
        font-size: 0.7vw;
        font-family: 'IBM Plex Mono', monospace;
        color: #000000;
        padding: 0.5vw 1vw;
        max-width: 40vw;
        user-select: none;
        z-index: 1000;
      }
      
   
  header {
    position: fixed;
    top: 0;
    left: 0;
    width: 12vw;
    height: 100vh;
    padding: 2vw 1vw;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 10;
  }
  
  nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.7vw;
    font-size: 0.7vw;
  }
  
  nav ul li a {
    text-decoration: none;
    color: #000;
    position: relative;
    padding-bottom: 0.2vw;
  }
  
  nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 1px;
    width: 100%;
    background-color: #000;
  }

  /*2 страница*/
  
  #background-im {
    margin-top: 2vw;
    margin-left: 12vw;
    height: 93%;
    width: auto;
    position: absolute;
    z-index: 0;
    display: block;
  }
  
  .overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 80vw;
    max-height: 80vh;
    cursor: pointer;
    z-index: 1;
  }
  
   /*3 страница*/

   .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5vw;
    margin-bottom: 1.7vw;
    margin-top: 1.7vw;
  }
  
  .image-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 16vw;
    width: 16vw;
    gap: 0vw;
  }
  
  .image-block img {
    width: 100%;
    height: auto;
    display: block;
  }
  
  .caption {
    font-size: 0.7vw;
    line-height: 1.4;
    color: #000000;
    width: 100%;
    text-align: left;
    min-height: 5em;
  }

  /*4 страница*/

  .containerm {
    display: flex;
    height: 100vh;
    gap: 0;
  }
  
  .preview {
    width: 50%;
    padding: 2vw;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .preview-content.hidden {
    display: none;
  }
  
  
  .caption-topm,
  .caption-bottomm {
    font-size:  0.7vw;
    margin: 1vw 0;
    color: #000000;
  }

  .buy-button {
   margin-top: 1.5vw;
    font-size: 0.7vw;
    color: rgb(0, 0, 0);
    text-decoration: underline;
    cursor: pointer;
  } 
  
  .gridm {
    width: 50%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    gap: 0.3vw;
    padding: 1vw;
  }
  
  .grid-captionm {
    font-size: 0.7vw;
    margin-bottom: 0.5vw;
    text-align: center;
  }

  .gridm .grid-itemm img {
    width: 8vw;
    height: auto;
    cursor: pointer;
    border: 1px solid #ccc;
    display: block;
    margin: 0 auto 1px;
    transition: transform 0.3s;
  }

.gridm {
    display: grid;
    grid-template-columns: repeat(3, min-content);
    gap: 0.3vw;
    padding: 0.3vw;
    justify-content: center;
  }
  
  .grid-itemm {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2.3vw;
    padding: 0;
  }
  
  .grid-itemm img {
    width: 8vw;
    height: auto;
    margin: 0;
    padding: 0;
  }

  #previewImage {
    width: 50%;
    max-width: none;
    height: auto;
    border: 1px solid #ccc;
    margin-bottom: 1vw;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
  .preview-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
  
  #previewImage {
    display: block;
    margin: 1vw auto;
    width: 30vw;
    height: auto;
    border: 1px solid #ccc;
    transition: all 0.3s ease;
  }
  
  .caption-topm,
  .caption-bottomm {
    text-align: left;
    width: 100%;
    align-items: flex-start
  }
  .buy-button {
    position: relative;
    z-index: 1000;
  }

/*5 страница*/

.screen {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3vw;
    min-height: 100vh;
    font-size: 0.7vw;
    box-sizing: border-box;
    position: relative;
  }
  
  .hidden {
    display: none;
  }
  
  .button-row {
    position: absolute;
    bottom: 1.7vw;
    left: 1vw;
    right: 1vw;
    display: flex;
    justify-content: space-between;
    font-size: 0.7vw;
    
  }
 
  .button-row.only-next {
    justify-content: flex-end;
    z-index: 10000;
  }
  
  .next-btn,
  .back-btn {
    background: none;
    color: black;
    border: none;
    border-bottom: 1px solid black;
    font-size: 0.7vw;
    cursor: pointer;
    transition: border-color 0.2s ease;
    left: 1vw;
    right: 0vw;
    z-index: 10000;
    font-family:'IBM Plex Mono', monospace; ;
  }
  
  .image-strip {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2vw 2vw;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2em;
    box-sizing: border-box;
    z-index: 1;
  }
  
  .image-strip div {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7vw;
    text-align: center;
  }
  
  .image-strip span {
    margin-bottom: 0.7vw;
  }
  
  .image-strip img {
    height: 5vw;
    object-fit: cover;
  }

  .text-block {
    position: absolute;
    top: 3vw;
    left: 70vw;
    width: 45vw;
    display: flex;
    flex-direction: column;
    gap: 0.7vw;
    font-size: 0.7vw;
    z-index: 2;
    overflow-y: auto;
    max-height: 70vh;
  }

  #screen-4 {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 3vw;
    min-height: 100vh;
    font-size: 0.7vw;
  }
  
  #screen-4 h2 {
    font-size: 0.7vw;
    margin: 0 0 1vw 6vw;
    text-align: left;
    margin-top: 0.65vw;
  }
  
  #summary-table {
    border-collapse: collapse;
    width: calc(100% - 12vw);
    margin: 0 6vw;
    line-height: 3;
    font-size: 0.7vw;
  }
  
  #summary-table tr:not(:last-child) {
    border-bottom: 1px solid black;
  }
  
  #summary-table td {
    border: none;
    padding: 0.3vw 0.5vw;
    vertical-align: top;
  }

  /*страница 404*/

.wrapper {
    position: relative;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .imageb {
    max-height: 93vh;
    width: auto;
    display: block;
    z-index: 0;
    user-select: none;
  }
  
  .overlay-content {
    position: absolute;
    top: 47%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    text-align: center;
    color: #000;
    pointer-events: none;
  }
  
  .overlay-content a {
    pointer-events: auto;
    display: inline-block;
    margin-top: 0.7vw;
  }
  
  .text-404 {
    font-size: 0.7vw;
    margin: 0;
    user-select: none;
  }
  
  .btn-home {
    font-size: 0.7vw;
    text-decoration: underline;
    color: #000000;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  
  
  
  
  
  
  
  