/* EPIC LOADING SCREEN */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  overflow: hidden;
}

.loading-content {
  text-align: center;
  position: relative;
}

.loading-logo {
  width: 220px;
  filter: drop-shadow(0 0 40px #ff0033);
  animation: logoPulse 2s infinite alternate ease-in-out;
}

@keyframes logoPulse {
  from { transform: scale(0.85) rotate(-8deg); }
  to   { transform: scale(1.05) rotate(8deg); }
}

.loading-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 4.5rem;
  margin: 30px 0 20px;
  letter-spacing: 8px;
  opacity: 0;
  animation: titleAppear 1.2s forwards 0.8s;
}

.loading-title span {
  color: #ff0033;
  text-shadow: 0 0 30px #ff0033;
}

.loading-bar-container {
  width: 380px;
  height: 8px;
  background: #222;
  border-radius: 50px;
  margin: 30px auto;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(255, 0, 51, 0.3);
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff0033, #ff6699);
  animation: loadingProgress 3.2s forwards;
  box-shadow: 0 0 20px #ff0033;
}

@keyframes loadingProgress {
  to { width: 100%; }
}

.loading-text {
  color: #aaa;
  font-size: 1.1rem;
  letter-spacing: 3px;
  animation: textFade 1.5s forwards 2.5s;
  opacity: 0;
}

@keyframes titleAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes textFade {
  to { opacity: 1; }
}

.loading-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,0,51,0.08) 0%, transparent 70%);
  animation: pulseBg 4s infinite;
  pointer-events: none;
}

@keyframes pulseBg {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0a0a0a;
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  overflow-x: hidden;
}

.navbar {
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid #ff0033;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
  font-family: 'Orbitron', sans-serif;
}

.logo h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 2px;
}

.logo span {
  color: #ff0033;
}

.search-bar {
  flex: 1;
  max-width: 500px;
  margin: 0 30px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid #333;
  background: #1a1a1a;
  color: #fff;
  border-radius: 50px;
  font-size: 1.1rem;
  transition: all 0.3s;
}

.search-bar input:focus {
  border-color: #ff0033;
  box-shadow: 0 0 15px rgba(255, 0, 51, 0.5);
  outline: none;
}

.search-bar button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #ff0033;
  border: none;
  padding: 10px 18px;
  border-radius: 50%;
  color: white;
  cursor: pointer;
}

.hero {
  height: 70vh;
  background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.8)), url('https://images.unsplash.com/photo-1616588589676-62b3bd4ff6d2') center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.hero-content h1 {
  font-size: 4.5rem;
  font-family: 'Orbitron', sans-serif;
  margin-bottom: 20px;
}

.neon-text {
  color: #ff0033;
  text-shadow: 0 0 20px #ff0033, 0 0 40px #ff0033;
}

.cta-button {
  padding: 16px 40px;
  font-size: 1.3rem;
  background: #ff0033;
  border: none;
  border-radius: 50px;
  color: white;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s;
}

.cta-button:hover {
  background: #ff3366;
  transform: scale(1.05);
  box-shadow: 0 0 30px #ff0033;
}

.categories, .products {
  padding: 60px 5%;
}

h2 {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 40px;
  font-family: 'Orbitron', sans-serif;
}

.cat-grid, .products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.card {
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s;
  border: 1px solid #222;
}

.card:hover {
  transform: translateY(-15px);
  box-shadow: 0 0 30px rgba(255, 0, 51, 0.6);
  border-color: #ff0033;
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card-body {
  padding: 20px;
}

.card h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.price {
  color: #00ff9d;
  font-size: 1.5rem;
  font-weight: bold;
}

.add-to-cart {
  width: 100%;
  padding: 12px;
  background: #ff0033;
  border: none;
  border-radius: 8px;
  color: white;
  margin-top: 15px;
  cursor: pointer;
  font-weight: 600;
}

.cart {
  position: relative;
  font-size: 1.8rem;
  cursor: pointer;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff0033;
  color: white;
  font-size: 0.9rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* ═══════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════ */
nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  min-height: 60px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.75rem var(--container-padding);
}

@media (min-width: 992px) {
  .nav-inner {
    flex-wrap: nowrap;
    padding: 0 var(--container-padding);
    height: 70px;
  }
}

.topbar {
  background: var(--black);
  padding: 0.5rem 0;
  font-size: 0.75rem;
  color: var(--gray);
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--red);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ====================== TOP BAR ====================== */
.topbar {
  background: linear-gradient(90deg, #0f0f0f, #1a1a1a);
  border-bottom: 2px solid #ff0033;
  padding: 10px 0;
  font-size: 0.95rem;
  position: sticky;
  top: 0;
  z-index: 9998;
  box-shadow: 0 2px 10px rgba(255, 0, 51, 0.2);
}

.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Alineado a la izquierda */
  gap: 18px;
  flex-wrap: wrap;
}

.topbar a {
  color: #ddd;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.topbar a:hover {
  color: #ff0033;
  transform: translateY(-2px);
}

.topbar-dot {
  width: 5px;
  height: 5px;
  background-color: #ff0033;
  border-radius: 50%;
  opacity: 0.7;
}

/* Animación de entrada desde la izquierda */
.topbar {
  animation: topbarSlideIn 0.8s ease-out forwards;
}

@keyframes topbarSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Efecto neon sutil en hover */
.topbar a:hover {
  text-shadow: 0 0 8px rgba(255, 0, 51, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
  .topbar-inner {
    justify-content: center;
    gap: 12px;
    font-size: 0.9rem;
  }
  
  .topbar-dot {
    display: none;
  }
}