:root {
  --main-dark: #0E1A2B;     /* Azul marino profundo */
  --main-mid:  #1F3C59;     /* Azul petróleo */
  --accent:    #4EC3F7;     /* Azul celeste */
  --white:     #FFFFFF;
  --text-dark: #DDE7F2;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background: url(images/AR\ Zafiro.jpg) no-repeat center center fixed;
  background-size: cover;
  padding-top: 70px; /* espacio para navbar sticky */
  color: white;
  overflow-x: hidden;
}
/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(14, 26, 43, 0.7);
  backdrop-filter: blur(6px);
  padding: 8px 20px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  box-shadow: 0 4px 6px rgba(0,0,0,0.15);
  flex-wrap: wrap;
  height: 70px;
  transition: background-color 0.3s ease;
  opacity: 1;
}

.logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  gap: 15px;
  flex-wrap: nowrap;
}

.logo {
  height: 100px;
  margin-right: 20px;
  flex-shrink: 0;
  margin-top: -15px;
}

.logo-shamir {
  height: 70px;
  margin-left: 80px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  transform: scale(1.7);
}

.logo-shamir:hover {
  transform: scale(1.1);
}

/* Responsive logo */
@media (max-width: 768px) {
  .logo-area { justify-content: center; gap: 10px; }
  .logo { height: 40px; margin-right: 10px; }
  .logo-shamir {
    height: 50px;
    transform: none !important;
    margin-left: 0;
  }
}

/* Menu principal */
.menu {
  display: flex;
  list-style: none;
  gap: 20px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  transform: translateX(-40px);
}

.menu li { position: relative; }

.menu a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
  user-select: none;
  white-space: nowrap;
}

.menu a:hover,
.menu a:focus {
  background-color: var(--accent);
  color: var(--main-dark);
  outline: none;
}

/* Submenu */
.submenu {
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  background: linear-gradient(90deg, #606577 0%, #030303 100%);
  color: white;
  list-style: none;
  padding: 12px 15px;
  top: 45px;
  border-radius: 8px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  min-width: 190px;
  z-index: 10;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.submenu li { margin-bottom: 8px; }
.submenu li:last-child { margin-bottom: 0; }

.submenu a {
  color: white;
  padding: 6px 10px;
  display: block;
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.submenu a:hover,
.submenu a:focus {
  background-color: #575963;
  color: white;
  outline: none;
}

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  right: 20px;
  position: absolute;
  top: 20px;
  transition: right 0.3s ease;
}

.menu-toggle span {
  width: 28px;
  height: 3px;
  background: var(--white);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Responsive móvil */
@media (max-width: 768px) {
  .menu-toggle { display: flex; top: 20px; right: 50px; }
  .menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
    background: linear-gradient(90deg, #1F3C59 0%, #0E1A2B 100%);
    padding: 10px 20px;
    z-index: 1000;
    text-align: center;
  }
  .menu.active { display: flex; }
  .submenu { display: none; flex-direction: column; }
  .submenu.show { display: flex; }
}

/* Contenedor de producto */
.product-card {
  display: flex;
  align-items: center;
  max-width: 50vw;
  width: 100%;
  margin: 4rem 0;
  opacity: 0;
  transform: translateX(-80px);
  transition: opacity 1s ease, transform 1s ease;
  background: transparent;
  cursor: default;
  justify-content: flex-start;
}

.product-card.visible { opacity: 1; transform: translateX(0); }

.product-card:not(.reverse) .product-image {
  margin-left: 20px;
  margin-right: calc(5vw + 20px);
  max-width: 45vw;
}

.product-card.reverse {
  flex-direction: row-reverse;
  transform: translateX(850px);
  justify-content: flex-end;
}

.product-card.reverse .product-image {
  margin-right: 20px;
  margin-left: calc(5vw + 20px);
  max-width: 45vw;
}

.product-image {
  flex: 0 0 auto;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.5s ease;
}

.product-image img {
  display: block;
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image img { transform: scale(1.07); }

@media (max-width: 768px) {
  .product-card,
  .product-card.reverse {
    flex-direction: column !important;
    transform: translateY(0) !important; /* Animación vertical limpia */
    margin: 2.5rem 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .product-image {
    margin: 0 auto 2rem auto !important;
    width: 100% !important;        /* ✅ Hace que la imagen use todo el ancho */
    max-width: 100% !important;    /* ✅ Elimina la limitación de 45vw */
    border-radius: 16px;
  }

  .product-image img {
    width: 100% !important;        /* ✅ Garantiza ancho completo */
    height: auto !important;       /* ✅ Evita deformación */
    object-fit: cover;
  }
}

/* Footer */
footer {
  background-color: var(--main-dark);
  padding: 10px 0;
  color: white;
  text-align: center;
  user-select: none;
  box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.3);
  font-size: 0.9rem;
  height: auto;
  margin-top: 40px;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 998;
  opacity: 1;
}

footer p { margin: 0; font-weight: 500; transition: color 0.4s ease; }
footer p:hover { color: var(--accent); }

/* Social */
.social { margin-top: 15px; display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.social a { width: 30px; height: 30px; transition: transform 0.3s ease; cursor: pointer; filter: brightness(0) invert(1); }
.social a:hover { transform: scale(1.2); filter: brightness(0.8); }

/* Bifocales */
.bifocales-wrapper { perspective: 800px; display: flex; justify-content: center; padding: 30px 0; margin-bottom: 10px; padding-left: 20px; }
.bifocales {
  width: 90vw;
  max-width: 1200px;
  font-size: 3rem;
  font-weight: bold;
  color: white;
  background: linear-gradient(90deg, #0E1A2B 0%, #1F3C59 100%);
  padding: 15px 40px;
  border-radius: 40px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25), inset 0 0 15px rgba(255,255,255,0.5);
  text-align: center;
  transform-style: preserve-3d;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  user-select: none;
  cursor: default;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
}

.bifocales:hover {
  transform: scale(1.04) translateY(-6px);
  box-shadow: 0 14px 28px rgba(78, 195, 247, 0.4), 0 0 25px #0E1A2B;
  background: linear-gradient(90deg, var(--main-dark), var(--accent));
}

@media (max-width: 720px) {
  .bifocales { width: 90vw; font-size: 2rem; padding: 25px 20px; border-radius: 30px; }
}

@media (max-width: 768px) {
  .menu-toggle { top: 15px; right: 50px; }
}
