/* =======================
   ESTILOS GENERALES
======================= */
body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f4f6f9;
  scroll-behavior: smooth;
}

/* =======================
   NAVBAR — ANCHO COMPLETO
======================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: linear-gradient(90deg, #021d33, #032c4a);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 1000;
  box-sizing: border-box;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  border-bottom: 1px solid rgba(56,189,248,0.15);
}

/* IZQUIERDA */
.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 2;
  flex: 1;
}

.menu-toggle {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* LOGO */
.logo {
  height: 48px;
  object-fit: contain;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.logo:hover { transform: scale(1.05); }

/* CENTRO */
.nav-center {
  display: flex;
  align-items: center;
  gap: 30px;
}

/* DERECHA */
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 2;
  margin-left: auto;
}

/* LINKS */
.nav-center a,
.nav-right a {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  position: relative;
  transition: color 0.25s;
}

/* underline animado */
.nav-center a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background: #38bdf8;
  border-radius: 2px;
  transition: width 0.28s ease;
}

.nav-center a:hover::after { width: 100%; }
.nav-center a:hover,
.nav-right a:hover { color: #38bdf8; }

/* =======================
   CARRITO
======================= */
.carrito-icono {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 10px;
}

.carrito-icono img {
  width: 22px;
  height: 22px;
  transition: transform 0.25s ease;
}

.carrito-icono:hover img { transform: scale(1.15); }

#contadorCarrito {
  position: absolute;
  top: -7px;
  right: -9px;
  background: #38bdf8;
  color: #021d33;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 50%;
  font-weight: 700;
  display: none;
}

/* LINK USUARIO — pill con gradiente */
.user-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  border-radius: 24px;
  color: white !important;
  font-size: 12px !important;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: all 0.28s ease;
  text-decoration: none;
}

.user-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56,189,248,0.45);
  color: white !important;
}

/* =======================
   USER DROPDOWN
======================= */
.user-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding-bottom: 15px;
  margin-bottom: -15px;
}

.user-dropdown span {
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: color 0.25s;
}

.user-dropdown span:hover {
  color: #38bdf8;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  background: #021d33;
  border: 1px solid rgba(56,189,248,0.18);
  border-radius: 12px;
  display: none;
  flex-direction: column;
  min-width: 160px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: 0.25s ease;
}

.dropdown-menu a {
  padding: 11px 16px;
  color: rgba(255,255,255,0.8) !important;
  text-decoration: none;
  font-size: 13px !important;
  transition: 0.2s;
}

.dropdown-menu a:hover {
  background: rgba(56,189,248,0.12);
  color: #38bdf8 !important;
}

.user-dropdown:hover .dropdown-menu {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* puente invisible que cubre el gap entre el nombre y el menú */
.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 20px;
  background: transparent;
}

/* =======================
   ESTADO INVITADO
======================= */
.navbar.invitado .user-dropdown { display: none; }

/* =======================
   MOBILE MENU
======================= */
.mobile-menu {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  height: calc(100vh - 70px);
  background: linear-gradient(180deg, #021d33, #041e3a);
  transform: translateX(-100%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  display: flex;
  flex-direction: column;
  z-index: 999;
}

.mobile-menu.active {
  transform: translateX(0);
  opacity: 1;
}

.mobile-menu a {
  padding: 15px 24px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: 0.2s;
}

.mobile-menu a:hover {
  background: rgba(56,189,248,0.08);
  color: #38bdf8;
  padding-left: 32px;
}

.mobile-menu .logout { color: #ff6b6b; }

/* =======================
   HERO
======================= */
.hero {
  padding-top: 70px;
  height: 100vh;
  min-height: 560px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 80px;
  color: white;
}

.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.hero-slide.active { opacity: 1; }

.mover-abajo  { object-position: center 25%; }
.mover-abajo1 { object-position: center 40%; }
.mover-abajo2 { object-position: center 77%; }
.mover-abajo3 { object-position: center 52%; }

/* overlay degradado lateral */
.hero-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(0,0,0,0.80) 0%,
    rgba(0,0,0,0.45) 50%,
    transparent 100%
  );
  z-index: 1;
}

.hero h1,
.hero h2,
.hero p,
.hero .hero-buttons {
  position: relative;
  z-index: 2;
}

/* === HERO TÍTULO === */

/* "SOMOS" — liviano, espaciado, ocupa el ancho del nombre */
.hero h1 {
  font-size: 32px;
  font-weight: 200;
  letter-spacing: 28px;
  margin: 0 0 -4px 4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  display: block;
  line-height: 1;
  opacity: 1;
}

.hero h1::before { display: none; }

/* "BLUEMOTORS" — enorme, domina el hero */
.hero h2 {
  font-size: clamp(58px, 9vw, 115px);
  font-weight: 900;
  letter-spacing: 1px;
  margin: 0 0 28px -4px;
  line-height: 1;
  text-transform: uppercase;
  color: white;
  text-shadow: 0 4px 50px rgba(0,0,0,0.55);
  position: relative;
}

.hero h2::before { display: none; }
.hero h2::after { display: none; }

.hero p {
  font-size: 13px;
  letter-spacing: 5px;
  margin-bottom: 38px;
  opacity: 0.7;
  text-transform: uppercase;
}

/* separador decorativo */
.hero p::before {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: #38bdf8;
  margin-bottom: 14px;
}

.hero-buttons { display: flex; gap: 16px; }

.btn {
  padding: 14px 30px;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: 2px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  transition: all 0.28s ease;
  border: 2px solid transparent;
}

.btn:first-child {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: white;
}

.btn:last-child {
  background: transparent;
  border-color: rgba(255,255,255,0.55);
  color: white;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.4);
  background: white;
  color: #021d33;
  border-color: white;
}

/* =======================
   CATEGORY SECTION
======================= */
.category-section {
  display: flex;
  align-items: center;
  gap: 50px;
  padding: 50px 60px;
  max-width: 1200px;
  margin: 50px auto;
  background: white;
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.category-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(56,189,248,0.06), transparent);
  opacity: 0;
  transition: 0.4s;
  pointer-events: none;
}

.category-section:hover::before { opacity: 1; }

.category-section:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,0.1);
}

.category-section:nth-child(even) { flex-direction: row-reverse; }

/* IMÁGENES */
.category-img {
  width: 45%;
  height: 300px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.category-section:hover .category-img { transform: scale(1.02); }

/* TEXTO */
.category-info {
  width: 55%;
  position: relative;
  z-index: 2;
}

.category-info h2 {
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #0f172a;
  letter-spacing: 3px;
}

.category-info p {
  font-size: 16px;
  color: #475569;
  line-height: 1.75;
}

/* BOTONES */
.category-btn {
  display: inline-block;
  margin-top: 22px;
  padding: 12px 28px;
  background: linear-gradient(90deg, #021d33, #032c4a);
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.28s ease;
}

.category-btn:hover {
  background: #38bdf8;
  color: #021d33;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(56,189,248,0.35);
}

.category-btn:active { transform: scale(0.97); }

/* =======================
   SCROLL ANIMATION
======================= */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0) !important;
}

.reveal-left  { transform: translateX(-80px); }
.reveal-right { transform: translateX(80px); }

.reveal-left.active,
.reveal-right.active {
  transform: translateX(0) !important;
}

/* hover sin transform para no romper el reveal */
.category-section:hover {
  box-shadow: 0 20px 50px rgba(0,0,0,0.13);
}

.category-section.reveal.active:hover {
  transform: translateY(-5px) !important;
}

/* =======================
   FOOTER
======================= */
.footer {
  background: linear-gradient(160deg, #020e1c, #021d33);
  color: white;
  margin-top: 80px;
  border-top: 1px solid rgba(56,189,248,0.12);
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  padding: 60px 60px 40px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h3 {
  letter-spacing: 2px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #38bdf8;
  text-transform: uppercase;
}

.footer-logo {
  height: 38px;
  width: 60px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid rgba(56,189,248,0.4);
  box-shadow: 0 0 12px rgba(56,189,248,0.25);
  transition: 0.3s;
  margin-bottom: 6px;
}

.footer-logo:hover {
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(56,189,248,0.7);
}

.footer-title { font-weight: 600; font-size: 13px; letter-spacing: 1px; }
.footer-text  { color: #94a3b8; line-height: 1.6; font-size: 14px; }
.footer-mail  { color: #64748b; font-size: 13px; }

.footer-col a {
  text-decoration: none;
  color: #94a3b8;
  font-size: 14px;
  transition: 0.22s;
}

.footer-col a:hover {
  color: #38bdf8;
  transform: translateX(4px);
}

.footer-link-blue {
  color: #38bdf8 !important;
  font-weight: 600;
  font-size: 13px;
}

.footer-news p    { margin: 0; font-size: 13px; color: #cbd5e1; }
.footer-news span { font-size: 11px; color: #475569; }

.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.footer-social {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  transition: all 0.3s ease;
}

.footer-social:hover {
  background: #38bdf8;
  border-color: #38bdf8;
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(56,189,248,0.3);
}

.footer-social img { width: 20px; }
.footer-social:hover img { transform: scale(1.15); }

.footer-bottom {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  background: rgba(0,0,0,0.25);
  color: #475569;
  letter-spacing: 1px;
}

/* =======================
   CART DRAWER
======================= */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  height: 100vh;
  background: linear-gradient(180deg, #041c33, #0b355c);
  color: #fff;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s ease;
}

.cart-drawer.active { transform: translateX(0); }

.cart-drawer h3 {
  padding: 20px;
  margin: 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  letter-spacing: 2px;
}

.cart-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 26px;
  color: #fff;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.cart-items .item {
  display: flex;
  gap: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}

.cart-items img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
}

.cart-total {
  padding: 16px;
  text-align: center;
  font-weight: bold;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.cart-btn {
  margin: 12px;
  padding: 14px;
  background: #38bdf8;
  color: #021d33;
  font-weight: bold;
  text-align: center;
  border-radius: 10px;
  text-decoration: none;
  transition: 0.3s;
}

.cart-btn:hover { background: white; }

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
}

.cart-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.cart-empty { text-align: center; opacity: 0.6; padding: 20px; }

/* =======================
   SECCIONES EXTRA
======================= */
.section { padding: 60px; }

.section h3 {
  font-size: 28px;
  margin-bottom: 12px;
  color: #0f172a;
  letter-spacing: 2px;
}

.section p {
  max-width: 600px;
  color: #475569;
  font-size: 16px;
  line-height: 1.65;
}

/* =======================
   RESPONSIVE
======================= */
@media (max-width: 900px) {

  .navbar {
    height: 64px;
    padding: 0 16px;
  }

  .nav-center { display: none; }
  .menu-toggle { display: block; }
  .logo { height: 36px; }

  .mobile-menu {
    top: 64px;
    height: calc(100vh - 64px);
  }

  .hero {
    padding-left: 24px;
    padding-right: 24px;
    text-align: center;
    align-items: center;
  }

  .hero h1 { font-size: 54px; letter-spacing: 8px; }
  .hero h2 { font-size: 34px; letter-spacing: 10px; }
  .hero p  { font-size: 11px; letter-spacing: 4px; }
  .hero p::before { margin: 0 auto 14px; }

  .hero-buttons { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 260px; text-align: center; }

  .category-section {
    flex-direction: column !important;
    padding: 30px 20px;
    margin: 24px 16px;
  }

  .category-img { width: 100%; height: 220px; }
  .category-info { width: 100%; text-align: center; }

  .footer-container { padding: 40px 24px; text-align: center; }
  .footer-socials { justify-content: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 38px; letter-spacing: 5px; }
  .hero h2 { font-size: 26px; letter-spacing: 7px; }
}