:root {
  --red-solid: #030e3a;
  --red-light: #324eca;
  --red-bg: #fdecea;
  --white: #fff;
  --text-dark: #102561;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background: url(images/FondoEssilor.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: #030e3a;
  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;
  backdrop-filter: none;
}

.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(--red-solid);
  color: var(--white);
  outline: none;
}

/* Submenu base */
.submenu {
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  background: linear-gradient(90deg, #1d46ce 0%, #030e3a 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: #223996; color: rgb(13, 155, 190); 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; position: absolute; top: 20px; right: 50px; }
  .menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
    background: linear-gradient(90deg, #1c52b7 0%, #030e3a 100%);
    padding: 10px 20px;
    z-index: 1000;
    text-align: center;
  }
  .menu.active { display: flex; }
  .has-submenu > a::after { content: " ▼"; font-size: 0.7rem; margin-left: 6px; color: white; }
  .menu li.has-submenu { position: relative; }
  .submenu {
    display: none;
    flex-direction: column;
    background: linear-gradient(90deg, #1c52b7 0%, #030e3a 100%);
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    position: relative;
    margin: 10px auto;
    width: 85%;
    max-width: 300px;
    min-width: 200px;
    box-sizing: border-box;
    z-index: 10;
    text-align: center;
  }
  .submenu.show { display: flex; opacity: 1; transform: translateY(0); }
  .submenu li { padding: 10px 0; }
  .has-submenu.active > .submenu { display: flex; }
  .submenu a { text-align: center; }
  .submenu a:hover, .submenu a:focus { background-color: var(--red-light); color: var(--white); }
}

/* Contenedor de producto */
.product-card {
  display: flex;
  align-items: center;
  max-width: 50vw;
  width: 100%;
  margin: 4rem 0;
  padding: 0;
  opacity: 0;
  transform: translateX(-80px);
  transition: opacity 1s ease, transform 1s ease;
  background: transparent;
  cursor: default;
  justify-content: flex-start;
  will-change: opacity, transform;
}

/* Animación visible */
.product-card.visible { opacity: 1; transform: translateX(0); }

/* Imagen lado izquierdo */
.product-card:not(.reverse) .product-image {
  margin-left: 20px;
  margin-right: calc(5vw + 20px);
  max-width: 45vw;
}

/* Imagen lado derecho */
.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;
}

/* Imagen general */
.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%;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.5s ease;
}

/* Hover zoom */
.product-card:hover .product-image img { transform: scale(1.07); }

/* Responsive móviles: imágenes más grandes y centradas */
@media (max-width: 768px) {
  .product-card, .product-card.reverse {
    flex-direction: column !important;
    transform: translateY(50px) !important;
    margin: 3rem 0 !important;
  }
  .product-card.visible, .product-card.reverse.visible {
    transform: translateY(0) !important;
  }
  .product-image {
    margin: 0 auto 2rem auto !important;
    width: 98vw !important;
    max-width: none !important;
    border-radius: 16px;
  }
}

/* Footer */
footer {
  background-color: var(--red-solid);
  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;
}
footer p { margin: 0; font-weight: 500; transition: color 0.4s ease; }
footer p:hover { color: #5aa8e7; }

.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, #313de0 0%, #030e3a 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(38, 69, 209, 0.3), 0 0 25px rgba(126, 114, 229, 0.5);
  background: linear-gradient(90deg, #6cbce0, var(--red-bg));
}
@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; /* alejado de la esquina */
  }
}