/* Keyframe animation for flying in */
    @keyframes flyInCenter {
      0% {
        opacity: 0;
        transform: scale(0.5) translate(var(--start-x), var(--start-y));
      }
      100% {
        opacity: 1;
        transform: scale(1) translate(0, 0);
      }
    }

    @keyframes fade-in {
      from {
        opacity: 0;
      }
      to {
        opacity: 1;
      }
    }

    /* General animation setup */
    .animate-in {
      animation: flyInCenter 1.2s ease-out forwards;
    }

    body {
      font-family: Arial, sans-serif;
      background-image: url('background.jpg');
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }

    h1 {
      text-align: left;
      margin-left: 300px;
      color: #000000;
      margin-top: 210px;

      z-index: 2000;
      animation-delay: 0.2s;
      animation: fade-in 3s ease-in-out forwards;
    }

    p {
      color: #000000;
      font-family: Georgia, 'Times New Roman', Times, serif;

      z-index: 2000;
      animation-delay: 0.2s;
      animation: fade-in 3s ease-in-out forwards;
    }

    .header-container {
      align-items: center;
      justify-content: center;

      margin-top: 330px;
      margin-left: 50px;
    }

    .headphones {
      width: 300px;
      cursor: pointer;
      position: absolute;
      top: 0px;
      left: 900px;
      z-index: 1000;

      --start-x: 100px;
      --start-y: -300px;
      animation-delay: 0.2s;
    }

    .camera {
      width: 200px;
      cursor: pointer;
      position: absolute;
      left: 450px;
      z-index: 1000;
      top: 260px;

      --start-x: -400px;
      --start-y: 100px;
      animation-delay: 0.2s;
    }

    .shavings {
      --start-x: -300px;
      --start-y: -300px;
      animation-delay: 0.2s;

      width: 200px;
      cursor: pointer;
      position: absolute;
      top: 0px;
      left: 300px;

    }

    .pencil {
      width: 200px;
      cursor: pointer;
      position: absolute;
      top: 20px;
      left: 400px;

      --start-x: -200px;
      --start-y: 100px;
      animation-delay: 0.2s;
    }

    .laptop {
      width: 500px;
      cursor: pointer;
      position: fixed;
      top: 100px;
      left: 500px;
      
      --start-x: 500px;
      --start-y: 200px;
      animation-delay: 0.2s;
    }

    .matcha {
      width: 250px;
      cursor: pointer;
      position: absolute;
      top: 250px;
      left: 300px;

      --start-x: -250px;
      --start-y: 100px;
      animation-delay: 0.2s;
    }

  /* Keep your previous positioning and sizing */
    .headphones,
    .camera,
    .shavings,
    .pencil,
    .laptop,
    .matcha {
      position: absolute;
      cursor: pointer;
      opacity: 0;
      animation-fill-mode: forwards;
    }

    .headphones { width: 300px; top: 0px; left: 900px; }
    .camera     { width: 200px; top: 260px; left: 450px; }
    .shavings   { width: 200px; top: 0px; left: 300px; }
    .pencil     { width: 200px; top: 20px; left: 400px; }
    .laptop     { width: 500px; top: 100px; left: 500px; }
    .matcha     { width: 250px; top: 250px; left: 300px; }

    .nav-menu {
    position: fixed;
    top: 1000px;
    right: 1060px;
    z-index:1000;
    }

    .nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    }

    .nav-menu li a {
    text-decoration: none;
    color: #000000;
    font-weight: bold;
    transition: color 0.3s;
    }

    .nav-menu {
    position: fixed;
    top: 560px;
    right: 1000px;
    z-index:1000;
    }

    .close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 32px; /* bigger */
  cursor: pointer;
  color: #888;
  background: #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  transition: background 0.2s, color 0.2s;
  z-index: 10;
}
.close-btn:hover {
  background: #eee;
  color: #000;
}

    /* Navigation buttons */
    .nav-btn {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      font-size: 24px;
      cursor: pointer;
      color: white;
    }
    

    /* Modal base */
    #popup {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100vw; height: 100vh;
      background-color: rgba(0,0,0,0.5);
      justify-content: center;
      align-items: center;
      z-index: 1000;
    }

    .popup-box {
      background: white;
      width: 320px;
      max-width: 90vw;
      border-radius: 15px;
      padding: 20px;
      text-align: center;
      position: relative;
      box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    }

    .popup-box img {
      width: 100%;
      border-radius: 10px;
      margin-bottom: 10px;
    }

    .popup-box h3 {
      margin: 0 0 10px;
    }

    .popup-box p {
      font-size: 14px;
      color: #000000;
    }

    .close-btn {
      position: absolute;
      top: 10px;
      right: 15px;
      font-size: 32px; /* bigger */
      cursor: pointer;
      color: #888;
      background: #fff;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      line-height: 40px;
      text-align: center;
      transition: background 0.2s, color 0.2s;
      z-index: 10;
    }
    .close-btn:hover {
      background: #eee;
      color: #000;
    }

    /* Navigation buttons */
    .nav-btn {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      font-size: 24px;
      cursor: pointer;
      color: white;
    }

    .carousel-container {
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 15px;
      position: relative;
    }

    .carousel-image {
      width: 280px;
      max-width: 100%;
      height: auto;
      border-radius: 10px;
      object-fit: contain;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .carousel-btn {
      background: none;
      border: none;
      font-size: 30px;
      color: #333;
      cursor: pointer;
      padding: 10px;
      user-select: none;
    }

    .carousel-btn:hover {
      color: #000;
    }

    .carousel-media {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

  .carousel-image, .carousel-video {
    max-width: 90%;
    max-height: 300px;
    border-radius: 10px;
    object-fit: contain;
}

.carousel-image.fade, .carousel-video.fade {
    transition: opacity 0.3s;
    opacity: 1;
}
.carousel-image, .carousel-video {
    opacity: 0.7;
}
.carousel-image.fade, .carousel-video.fade {
    opacity: 1;
}



    #prevCard { left: 10px; }
    #nextCard { right: 10px; }

/* Responsive layout for clickable images */
@media (max-width: 900px) {
  .headphones, .camera, .shavings, .pencil, .laptop, .matcha {
    position: static;
    display: block;
    margin: 20px auto;
    width: 80vw !important;
    max-width: 350px;
    min-width: 120px;
    top: unset !important;
    left: unset !important;
  }
  h1 {
    margin-left: 0;
    margin-top: 40px;
    text-align: center;
  }
  .nav-menu {
    position: static;
    margin: 20px auto;
    right: unset;
    top: unset;
    text-align: center;
  }
}

/* Responsive popup */
@media (max-width: 600px) {
  .popup-box {
    width: 95vw;
    padding: 10px;
  }
  .carousel-image, .carousel-video {
    max-width: 95vw;
    max-height: 40vh;
  }
  .carousel-btn {
    font-size: 24px;
    padding: 5px;
  }
}