
.catalogo {
   background: var(--bg);
   text-align: center;

   h2 {
      color: var(--primary-color);
      font-size: 2.5rem;
      margin-bottom: 40px;
   }
}

.cards-grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
   gap: 30px;
   justify-content: center;

   .card {
      border-radius: 10px;
      box-shadow: var(--shadow);
      overflow: hidden;
      cursor: pointer;
      transition: transform 0.3s, box-shadow 0.3s;

      width: 100%;

      &:hover {
         transform: translateY(-8px);
      }

      img {
         width: 100%;
         height: 180px;
         object-fit: cover;
      }

      .card-image-placeholder {
         width: 100%;
         height: 180px;
         background: var(--secondary-bg);
         display: flex;
         align-items: center;
         justify-content: center;
         color: var(--text-color);
         font-size: 3rem;
      }

      h3 {
         margin: 15px;
         color: var(--main-text);
         font-weight: 600;
      }
   }
}

.modal {
   display: none;
   position: fixed;
   z-index: 3000;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
   background: rgba(0, 0, 0, 0.6);
   backdrop-filter: blur(5px);
   justify-content: center;
   align-items: center;
   animation: fadeIn 0.3s ease;
}

.modal-box {
   background: var(--bg);
   border-radius: 10px;
   width: 80%;
   height: auto;
   animation: slideUp 0.4s ease;
   display: flex;
   align-items: start;
   justify-content: center;
   position: relative;
   overflow: hidden;

   .img {
      width: 50%;
      min-height: 400px;
      background-size: cover;
      background-position: center;
      box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
   }

   .image-carousel {
      position: relative;
      width: 50%;
      min-height: 400px;
      overflow: hidden;
      box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
   }

   .carousel-images {
      display: flex;
      transition: transform 0.3s ease;
   }

   .carousel-image {
      min-width: 100%;
      height: 400px;
      background-size: cover;
      background-position: center;
   }

   .carousel-image-empty {
      background: var(--secondary-bg);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-color);
      font-size: 4rem;
   }

   .carousel-video {
      min-width: 100%;
      height: 400px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: black;
   }

   .carousel-video video {
      width: 100%;
      height: 100%;
      object-fit: cover;
   }

   .carousel-btn {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      background: rgba(0, 0, 0, 0.5);
      color: white;
      border: none;
      padding: 10px;
      cursor: pointer;
      z-index: 1;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
   }

   .carousel-btn.prev {
      left: 10px;
   }

   .carousel-btn.next {
      right: 10px;
   }

   .carousel-indicators {
      position: absolute;
      bottom: 10px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      gap: 5px;
   }

   .indicator {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.5);
      cursor: pointer;
   }

   .indicator.active {
      background: white;
   }

   .text-box {
      display: flex;
      width: 50%;
      padding: 20px;
      flex-direction: column;
      justify-content: start;
      align-items: start;
      text-align: justify;
      gap: 20px;

      h2 {
         color: var(--main-text);
         text-transform: uppercase;
         align-self: start;
      }

      p {
         color: var(--text-color);
      }

      .info-tags {
         width: 100%;
         display: flex;
         flex-wrap: wrap;
         font-size: 1.2rem;
         gap: 10px;
         transition: 0.3s;

         .tag {
            background: var(--primary-color);
            color: var(--text-light);
            padding: 8px;
            width: auto;
            border-radius: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: 0.2s;

            i {
               font-size: 1.2rem;
               width: 20px;
            }

            &:hover {
               background-color: var(--dark-color);
               transform: translateY(-5px);
            }
         }

         .insta {
            background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
            text-decoration: none;
         }
      }
   }
}

.close {
   position: absolute;
   top: 5px;
   right: 20px;
   font-size: 2rem;
   cursor: pointer;
   color: var(--dark-color);
   transition: 0.3s;

   &:hover {
      color: var(--accent-color);
   }
}

@keyframes fadeIn {
   from {
      opacity: 0;
   }

   to {
      opacity: 1;
   }
}

@keyframes slideUp {
   from {
      transform: translateY(50px);
      opacity: 0;
   }

   to {
      transform: translateY(0);
      opacity: 1;
   }
}

@media (max-width: 480px) {
   .modal-box {
      flex-direction: column;
      max-width: 100%;
      max-height: 100vh;
      overflow-y: auto;
      padding: 10px;
      padding-top: 50px;
      justify-content: flex-start;
   }

   .modal-box .image-carousel {
      width: 100%;
      min-height: 200px;
      position: relative;
      border-radius: 10px;
      overflow: hidden;
   }

   .carousel-image {
      height: 200px;
   }

   .carousel-btn {
      width: 30px !important;
      height: 30px !important;
      font-size: 1rem;
   }

   .carousel-btn.prev {
      left: 5px;
   }

   .carousel-btn.next {
      right: 5px;
   }

   .carousel-indicators {
      bottom: 5px;
   }

   .modal-box .text-box {
      width: 100%;

      h2 {
         font-size: 1.2rem;
      }

      p {
         font-size: 0.95rem;
      }

      .info-tags .tag {
         font-size: 1rem;
         max-width: 90%;
      }
   }

   .close {
      top: 10px;
      right: 15px;
      font-size: 1.5rem;
   }
}

body.dark {
   .cards-grid {
      .card {
         background: var(--secondary-bg);
         border: 1px solid rgba(255, 255, 255, 0.08);
      }
   }

   .modal-box {
      background: var(--secondary-bg);
      border: 1px solid rgba(255, 255, 255, 0.08);
   }

   .close {
      color: var(--text-light);
   }
}


@media (max-width: 1024px) and (orientation: landscape) and (max-height: 600px) {
   .modal-box {
      flex-direction: row;
      width: 95%;
      height: 90vh;
      max-height: 90vh;
      overflow: hidden;
   }

   .modal-box .image-carousel {
      width: 60%;
      min-height: 100%;
      position: relative;
   }

   .carousel-image {
      height: 100%;
   }

   .modal-box .text-box {
      width: 40%;
      overflow-y: auto;
      padding: 20px;

      h2 {
         font-size: 1.4rem;
      }

      p {
         font-size: 1rem;
      }
   }

   .carousel-btn {
      width: 40px !important;
      height: 40px !important;
      font-size: 1.2rem;
   }

   .close {
      top: 15px;
      right: 20px;
      font-size: 1.8rem;
   }
}

@media (max-width: 768px) {
   .cards-grid {
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 20px;
   }

   .card {
      img {
         height: 150px;
      }

      h3 {
         font-size: 1rem;
         margin: 10px;
      }
   }

   .modal-box {
      width: 90%;
   }
}
