/* ==== Reset ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  background: rgba(245, 245, 245, 0);
  color: #333;
}

main {
  flex: 1;
}

/* ==== Header ==== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.01);
  color: white;
  padding: 15px 20px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

header img {
  height: 40px;
  margin-right: 10px;
}

.menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
}

.bar {
  height: 3px;
  width: 100%;
  background-color: white;
  border-radius: 5px;
  transition: all 0.3s ease;
}

/* Estado "X" */
.menu.open .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu.open .bar:nth-child(2) {
  opacity: 0;
}
.menu.open .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ==== Nav Menu ==== */
.nav {
  display: flex;
  align-items: center;
}

.nav ul {
  display: flex;
  flex-direction: row;
  gap: 35px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav li a {
  text-decoration: none;
  color: rgb(0, 0, 0);
}

.nav li a:hover {
  color: #929292;
}

header h1 {
  font-size: 1.3rem;
}

.contact a {
  color: white;
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  border-style: solid;
  border-width: 2px;
  font-weight: bold;
  transition: background 0.3s;
  transition: all 0.5s ease;
}

.contact a:hover {
  color: white;
  box-shadow: rgb(148, 148, 148) 0px 7px 29px 0px;
}

/* ==== Modal ==== */
/* ==== Carrusel ==== */
.carousel {
  position: relative;
  width: 100%;
  max-height: 250px;
  margin-bottom: 15px;
  overflow: hidden;
  border-radius: 8px;
}

.carousel-images {
  display: flex;
  transition: transform 0.4s ease;
}

.carousel-images img {
  width: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

.carousel button.prev,
.carousel button.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 50%;
  font-size: 1.2rem;
}

.carousel button.prev { left: 10px; }
.carousel button.next { right: 10px; }

.expand-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 15px;
}

.expand-btn:hover {
  background: #0056b3;
}

/* Lightbox fullscreen */
.lightbox {
  display: none;               /* oculto por defecto */
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.9); /* fondo oscuro */
  justify-content: center;
  align-items: center;
  z-index: 10000;               /* encima de todo */
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.7);
}

/* Botón cerrar */
#close-lightbox {
  position: absolute;
  top: 20px; 
  right: 30px;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  z-index: 10000;
}

/* Botones de navegación prev/next */
.lightbox button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  padding: 14px 20px;
  font-size: 2.5rem;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s;
  z-index: 10000;
}

.lightbox button:hover {
  background: rgba(255, 0, 0, 0.4);
}

.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

.modal {
  display: none; /* Oculto por defecto */
  position: fixed;
  z-index: 2999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  max-height: 100%;
  overflow-y: auto;
}

.modal-content {
  background: #fff;
  padding: 20px;
  max-width: 400px;
  width: 90%;
  border-radius: 10px;
  text-align: center;
  position: relative;
  animation: fadeIn 0.3s ease;
}

.modal-content img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.modal-content h3 {
  margin-bottom: 10px;
}

.modal-content p {
  margin-bottom: 15px;
}

.modal-content button {
  background-color: white;
  border: none;
  border-style: solid;
  color: black;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
  transition: all 0.5s ease;
}

.modal-content button:hover {
  box-shadow: rgb(148, 148, 148) 0px 7px 29px 0px;
  background-color: #979797;
  color: black;
}

.modal-content a{
    color: black;
    text-decoration: none;
}

.close {
  position: absolute;
  background-color: red;
  color: white;
  border-color: black;
  border-radius: 30px;
  top: -20px;
  right: -20px;
  padding: 0 12px;
  font-size: 1.5rem;
  border-style: solid;
  cursor: pointer;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9);}
  to { opacity: 1; transform: scale(1);}
}

/* Info extra en el modal */
.extra-info {
  font-size: 0.9rem;
  color: #444;
  background: #f5f5f5;
  padding: 10px;
  border-left: 4px solid #007bff;
  border-radius: 6px;
  margin-top: 10px;
}

/* ==== Catálogo ==== */
.catalog {
  padding: 120px 40px 60px;
  background-color: #fafafa;
  text-align: center;
}

.catalog h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: #222;
}

.personalization {
    background-color: white;
    display: flex;                     /* activa flexbox */
    justify-content: space-between;    /* separa los elementos */
    align-items: center;               /* centra verticalmente */
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.personalization h3 {
    font-size: 2em;
}

.personalization p {
    font-size: 1.7em;
}

#arrow {
    margin: 10px;
}

.personalization h3,
.personalization p {
    text-align: left;
    margin: 0;
}

.btn-about {
  display: inline-block;
  padding: 12px 28px;
  width: 400px;
  border-style: solid;
  border-width: 2px;
  color: rgb(53, 230, 18);
  border-radius: 30px;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s, transform 0.3s;
}
.btn-about:hover {
  color: white;
  background: #13db13;
  transform: scale(1.05);
}

/* Grid de productos */
.grid {
  display: grid;
  padding: 60px 40px;
  border-radius: 10px;
  background-color: white;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.product-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
  text-align: center;
  padding: 15px;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 15px;
  border-radius: 8px;
}

.product-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.product-card .price {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: #444;
}

.product-card button {
  border-color: black;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.product-card button:hover {
  background: #929292;
  color: white;
}

/* ==== Footer ==== */
footer {
  background: #0e0d0d;
  color: #bbb;
  padding: 40px 20px 20px;
  font-size: 0.95rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-bottom: 20px;
}

.footer-col h3, 
.footer-col3 h4,
.footer-col h4 {
  color: #fff;
  margin-bottom: 15px;
}

.footer-col3 ul {
  display: grid;
}

.footer-col3 a {
  color: #b1b1b1;
  text-decoration: none;
  padding-bottom: 10px;
  line-height: 1.5;
}

.footer-col3 a:hover {
  color: white;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #bbb;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-col ul li a:hover {
  color: white;
}

.socials a {
  display: inline-block;
  margin-right: 15px;
  color: #b1b1b1;
  font-size: 1.3rem;
  transition: color 0.3s, transform 0.2s;
}

.socials a:hover {
  color: white;
  transform: scale(1.2);
}

.footer-col p i {
  margin-right: 8px;
  color: #b1b1b1;
}

.footer-bottom {
  text-align: center;
  padding-top: 15px;
  border-top: 1px solid #444;
  font-size: 0.85rem;
}

/* ==== Responsive ==== */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
  header {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
  }

  .nav ul {
    gap: 20px;
    flex-wrap: wrap;
  }

  .hero h2 {
    font-size: 3rem;
  }

  .modal-content {
    max-width: 450px;
    max-height: 90%;
    padding: 18px;
  }

  .modal-content img {
    max-height: 220px;
  }

  #modal-add {
    padding: 2px;
    height: 30px;
  }

  .btn {
    width: auto; /* evita que el botón se estire demasiado */
    padding: 12px 24px;
  }
}

/* Móviles */
@media (max-width: 768px) {
  header {
    align-items: center;
    flex-direction: row;
    text-align: center;
  }

  .nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: left 0.3s ease;
    z-index: 1000;
  }

  .nav ul {
    flex-direction: column;
    gap: 25px;
    text-align: center;
  }

  .nav li a {
  text-decoration: none;
  color: white;
}

    .nav.active {
    left: 0;
    }

    .menu.open .bar{
        background-color: white;
    }

    .bar {
        background-color: black;
    }

    .contact a {
    background: rgba(0, 0, 0, 0);
    color: black;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    border-style: solid;
    border-width: 2px;
    font-weight: bold;
    transition: background 0.3s;
    animation:shadow-pop-br .3s cubic-bezier(.47,0.000,.745,.715) both;
    -webkit-animation: shadow-pop-br .3s cubic-bezier(.47,0.000,.745,.715) both;
    }

    .contact a:hover {
    color: white;
    }

  .menu {
    display: flex;
  }

  header {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .contact {
    margin-top: 10px;
    width: 100%;
    text-align: center;
  }

  .contact {
    margin-top: 10px;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    padding: 12px 20px;
  }

  .modal-content {
    width: 85%;
    max-width: 380px;
    height: auto;
    padding: 15px;
  }

  .modal-content img {
    max-height: 200px;
  }

  .modal-content h3 {
    font-size: 1rem;
  }

  .modal-content p {
    font-size: 0.9rem;
  }

  #modal-add {
    height: 50px;
  }

    .personalization {
        display: block;                     /* activa flexbox */
        justify-content: space-between;    /* separa los elementos */
        padding: 20px;
        border-radius: 10px;
        margin-bottom: 20px;
    }

    .personalization #arrow {
        display: none;
    }

    .personalization h3, .personalization p {
        text-align: center;
    }

    .personalization a {
        margin-top: 20px;
        width: 200px;
    }

  .catalog {
    padding: 100px 15px;
  }

  .catalog h2 {
    font-size: 2rem;
  }

  .product-card img {
    height: 180px;
  }

  footer {
    text-align: center;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .socials a {
    margin: 0 10px;
  }
}

/* Pantallas muy pequeñas (<=480px) */
@media (max-width: 480px) {
  header h1 {
    font-size: 1rem;
  }

  .hero h2 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .btn {
    font-size: 0.9rem;
    padding: 10px 18px;
  }

  .product-card h3 {
    font-size: 1rem;
  }
  
  .modal-content {
    width: 95%;
    max-width: 320px;
    padding: 12px;
    border-radius: 8px;
  }

  .modal-content img {
    max-height: 180px;
  }

  .modal-content h3 {
    font-size: 0.9rem;
  }

  .modal-content p {
    font-size: 0.8rem;
  }

  #modal-add {
    padding: 1px;
    height: 30px;
  }

  .footer-col h3, 
  .footer-col h4 {
    font-size: 1rem;
  }
}