:root {
  --primary: #8696ff;
  --secondary: #040404;
  --accent: #e74c3c;
  --light: #ecf0f1;
  --dark: #1a252f;
  --shadow: 0 8px 20px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: var(--dark);
  line-height: 1.6;
}

/* ===== HEADER MODERNO ESTILO SHOPIFY/WOOCOMMERCE ===== */

.header-modern {
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Barra superior de anuncios */
.header-top {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 0;
  font-size: 0.75rem;
}

.announcement-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.announcement-bar span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.announcement-bar i {
  font-size: 0.9rem;
}

/* Contenedor principal */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header principal */
.header-main {
  padding: 5px 0;
  border-bottom: 1px solid #f0f0f0;
}

.header-content {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 20px;
  align-items: center;
  min-height: 50px;
}

/* Logo moderno */
.logo-modern a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--dark);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.tpb-logo { width: 40px; height: 40px; display: inline-block; }
.tpb-wordmark { display: inline-flex; align-items: baseline; gap: 4px; }
.tpb-tech {
  background: linear-gradient(180deg, #32b3ff 0%, #6ad3ff 50%, #bfe9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(0,0,0,0.08);
  -webkit-text-stroke: 0.6px rgba(0,0,0,0.85);
}
.tpb-open {
  background: linear-gradient(180deg, #66e0a3 0%, #32c77d 50%, #13a768 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(0,0,0,0.08);
  -webkit-text-stroke: 0.6px rgba(0,0,0,0.85);
}
.tpb-parts {
  background: linear-gradient(180deg, #cfd3d7 0%, #aeb4bb 50%, #8c939c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(0,0,0,0.08);
  -webkit-text-stroke: 0.6px rgba(0,0,0,0.85);
}
.tpb-box {
  background: linear-gradient(180deg, #9b59ff 0%, #7b3cff 60%, #5e2fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(0,0,0,0.08);
  -webkit-text-stroke: 0.6px rgba(0,0,0,0.85);
}
/* Tagline */
.tpb-tagline {
  margin: -6px 0 0 50px;
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: #6b6f76;
}
@media (max-width: 480px) {
  .tpb-logo { width: 28px; height: 28px; }
  .logo-modern a { font-size: 1.3rem; }
}

/* Búsqueda moderna */
.search-modern {
  display: flex;
  justify-content: center;
}

.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
}

#search-input {
  width: 100%;
  padding: 6px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

#search-input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(134, 150, 255, 0.1);
}

.search-btn {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: none;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  background: #6b7cff;
}

/* Acciones del header */
.header-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--dark);
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.3s ease;
  background: none;
  border: none;
  cursor: pointer;
}

.action-btn:hover {
  background: #f8f9fa;
  color: var(--primary);
}

.action-icon {
  position: relative;
  font-size: 1.1rem;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.action-text {
  font-size: 0.7rem;
  font-weight: 500;
}

/* Menú de usuario */
.user-menu {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.user-btn:hover {
  background: #f8f9fa;
}

.user-btn i:last-child {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.user-menu:hover .user-btn i:last-child,
.user-menu.active .user-btn i:last-child {
  transform: scale(1.2);
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 6px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.user-menu:hover .user-dropdown,
.user-menu.active .user-dropdown,
.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--dark);
  transition: all 0.3s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
}

.dropdown-item:hover {
  background: #f8f9fa;
  color: var(--primary);
}

.dropdown-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 8px 0;
}

/* Navegación moderna - REMOVIDA */
.nav-modern {
  display: none;
}

/* Botón hamburguesa para móvil */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--dark);
  cursor: pointer;
  padding: 10px;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
}

/* Botón hamburguesa para usuario móvil */
.mobile-user-toggle {
  display: none;
}

.mobile-menu-toggle:hover {
  color: var(--primary);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 20px;
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(134, 150, 255, 0.1);
}

.nav-link:hover i,
.nav-link.active i {
  color: var(--primary);
}

/* Estado activo para dropdowns */
.dropdown .nav-link.active {
  background: rgba(134, 150, 255, 0.15);
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.nav-link i:first-child {
  font-size: 1.2rem;
  color: var(--dark);
}

/* Dropdown de categorías */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  padding: 8px 0;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Estilos para los items del dropdown */
.dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  text-decoration: none;
  color: var(--dark);
  transition: all 0.3s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
}

.dropdown-menu .dropdown-item:hover {
  background: #f8f9fa;
  color: var(--primary);
  padding-left: 25px;
}

.dropdown-menu .dropdown-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

/* Indicador visual para dropdowns */
.dropdown .nav-link i:last-child {
  transition: transform 0.3s ease;
  margin-left: 4px;
  font-size: 0.8rem;
  opacity: 0.7;
}

.dropdown-menu.show + .nav-link i:last-child,
.dropdown:hover .nav-link i:last-child {
  transform: rotate(180deg);
  opacity: 1;
}

/* Hacer más visible que es un dropdown */
.dropdown .nav-link {
  position: relative;
}

.dropdown .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.dropdown:hover .nav-link::after,
.dropdown-menu.show + .nav-link::after {
  width: 80%;
}

/* Tooltip para indicar dropdowns */
.dropdown .nav-link {
  cursor: pointer;
}

.dropdown .nav-link:hover {
  background: rgba(134, 150, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: center;
  }
  
  /* Ocultar búsqueda en móvil */
  .search-modern {
    display: none;
  }
  
  /* Mostrar botones móviles */
  .mobile-search-btn,
  .mobile-categories-toggle {
    display: flex !important;
  }
  
  /* Ocultar chips de categorías en móvil */
  .category-chips {
    display: none !important;
  }
  
  /* Mantener acciones del header en la parte superior */
  .header-actions {
    justify-content: flex-end;
    gap: 10px;
    order: 2;
  }
  
  /* Mostrar menú de usuario en móvil */
  .user-menu {
    display: flex !important;
  }
  
  /* Ocultar botón hamburguesa móvil */
  .mobile-user-toggle {
    display: none !important;
  }
  
  .announcement-bar {
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }
  
  /* Navegación móvil compacta - REMOVIDA */
  .nav-modern {
    display: none;
  }
  
  /* Mostrar botón hamburguesa en móvil */
  .mobile-menu-toggle {
    display: block;
  }
  
  /* Mostrar menú siempre en móvil pero de forma compacta */
  .nav-menu {
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    position: static;
    box-shadow: none;
  }
  
  /* Ocultar botón hamburguesa en móvil - mostrar menú siempre */
  .mobile-menu-toggle {
    display: none;
  }
  
  .nav-item {
    border-bottom: 1px solid #e0e0e0;
  }
  
  .nav-item:last-child {
    border-bottom: none;
  }
  
  .nav-link {
    padding: 8px 12px;
    color: var(--dark) !important;
    background: transparent;
    border-bottom: none !important;
    font-size: 0.8rem;
    min-height: 32px;
    display: flex;
    align-items: center;
    margin: 4px 0;
  }
  
  .nav-link:hover,
  .nav-link.active {
    background: var(--primary) !important;
    color: white !important;
  }
  
  .nav-link i {
    color: var(--dark);
    margin-right: 6px;
    width: 14px;
    text-align: center;
    font-size: 1rem;
  }
  
  /* Dropdown móvil */
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-top: 1px solid #e0e0e0;
    display: none;
    background: #f8f9fa;
  }
  
  .dropdown-menu.show {
    display: block;
  }
  
  .dropdown-menu .dropdown-item {
    padding: 6px 16px;
    color: var(--dark);
    background: white;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.75rem;
    min-height: 28px;
  }
  
  .dropdown-menu .dropdown-item:hover {
    background: var(--primary);
    color: white;
    padding-left: 25px;
  }
  
  /* Indicador visual para dropdown en móvil */
  .dropdown .nav-link i:last-child {
    margin-left: auto;
    font-size: 0.7rem;
  }
  
  .user-dropdown {
    position: absolute;
    right: 0;
    min-width: 180px;
    max-width: 200px;
  }
  
  /* Ajustes específicos para móvil del menú de usuario */
  .user-btn {
    padding: 6px;
    gap: 4px;
    /* Mejorar área táctil en móvil */
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .user-btn i:first-child {
    font-size: 1.1rem;
  }
  
  .user-btn i:last-child {
    font-size: 0.7rem;
  }
  
  .dropdown-item {
    padding: 12px 16px;
    font-size: 0.9rem;
    /* Mejorar área táctil para items del dropdown en móvil */
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  /* Asegurar que el contenido principal sea visible */
  main {
    padding: 1rem 5%;
    min-height: calc(100vh - 200px);
  }
  
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }
}

/* Responsive para pantallas muy pequeñas */
@media (max-width: 480px) {
  .header-content {
    gap: 8px;
    padding: 0 10px;
    min-height: 40px;
    grid-template-columns: 1fr 1fr;
  }
  
  .logo-modern a {
    font-size: 1.2rem;
  }
  
  .logo-modern i {
    font-size: 1.4rem;
  }
  
  /* Ocultar texto del carrito en móvil muy pequeño */
  .action-text {
    display: none;
  }
  
  /* Hacer el botón del carrito más compacto */
  .action-btn {
    padding: 3px 4px;
  }
  
  .action-icon {
    font-size: 1.1rem;
  }
  
  /* Botón hamburguesa móvil más compacto */
  .mobile-user-toggle {
    padding: 3px 4px !important;
  }
  
  /* Navegación móvil ultra compacta - REMOVIDA */
  .nav-modern {
    display: none;
  }
  
  .nav-menu {
    background: #f8f9fa;
  }
  
  .nav-link {
    padding: 6px 8px;
    font-size: 0.75rem;
    color: var(--dark) !important;
    background: transparent;
    border-bottom: none;
    min-height: 28px;
    display: flex;
    align-items: center;
    margin: 3px 0;
  }
  
  .nav-link:hover,
  .nav-link.active {
    background: var(--primary) !important;
    color: white !important;
  }
  
  .dropdown-menu .dropdown-item {
    padding: 4px 12px;
    font-size: 0.7rem;
    min-height: 24px;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  main {
    padding: 0.5rem 3%;
  }
  
  /* Mejorar experiencia táctil */
  .action-btn {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  /* Ajustes adicionales para menú de usuario en móvil muy pequeño */
  .user-btn {
    padding: 4px;
    gap: 2px;
    /* Mejorar área táctil */
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .user-btn span {
    font-size: 0.8rem;
  }
  
  .user-dropdown {
    min-width: 160px;
    max-width: 180px;
  }
  
  .dropdown-item {
    padding: 10px 12px;
    font-size: 0.85rem;
    /* Mejorar área táctil para items del dropdown */
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* Mantener estilos originales para compatibilidad */
.header {
  background: var(--primary);
  color: white;
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--secondary);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: var(--secondary);
  transition: var(--transition);
}

.nav-link:hover::after {
  width: 100%;
}

.badge {
  background: var(--accent);
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.7rem;
  margin-left: 5px;
}

.search-container {
  margin-left: auto;
  margin-right: 1rem;
}

#search-input {
  padding: 0.5rem 1rem;
  width: 220px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s ease;
}

#search-input:focus {
  width: 260px;
  box-shadow: 0 0 0 2px var(--secondary);
}

main {
  padding: 2rem 5%;
  min-height: calc(100vh - 120px);
  overflow-x: hidden;
}

section {
  margin-bottom: 3rem;
}

/* Animación del ícono del carrito */
.cart-icon-animated {
  animation: cartBounce 0.6s ease, cartShake 0.6s 0.6s ease;
  display: inline-block;
}

.cart-badge {
  animation: badgePulse 0.3s ease;
}

@keyframes cartBounce {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(0.9); }
  75% { transform: scale(1.1); }
}

@keyframes cartShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px) rotate(-5deg); }
  75% { transform: translateX(5px) rotate(5deg); }
}

@keyframes badgePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}


/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: scale 0.3s ease;
}

.card:hover img {
  scale: 1.05;
}

.card-body {
  padding: 1.2rem;
}

.card-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.card-desc {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-price {
  font-weight: 700;
  color: var(--secondary);
}

.btn {
  background: var(--secondary);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.btn:hover {
  background: #2980b9;
  transform: scale(1.05);
}

.btn-danger {
  background: var(--accent);
}

.btn-danger:hover {
  background: #c0392b;
}

/* Header de categorías con búsqueda móvil */
.categories-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.categories-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mobile-search-btn,
.mobile-categories-toggle {
  display: none;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.mobile-search-btn:hover,
.mobile-categories-toggle:hover {
  background: #6b7cff;
  transform: scale(1.05);
}

/* Modal de búsqueda móvil */
.mobile-search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 2000;
  padding-top: 20vh;
}

.mobile-search-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease;
}

/* Modal de categorías móvil */
.mobile-categories-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 2000;
  padding-top: 15vh;
}

.mobile-categories-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 350px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease;
  max-height: 70vh;
  overflow-y: auto;
}

.mobile-categories-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 15px 20px;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  background: white;
  border-radius: 12px 12px 0 0;
}

.mobile-categories-header h3 {
  margin: 0;
  color: var(--dark);
  font-size: 1.1rem;
}

.close-categories-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #666;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-categories-btn:hover {
  background: #f0f0f0;
  color: var(--dark);
}

.mobile-categories-list {
  padding: 10px 0;
}

.mobile-category-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 1rem;
  color: var(--dark);
}

.mobile-category-item:hover {
  background: #f8f9fa;
}

.mobile-category-item.active {
  background: var(--primary);
  color: white;
}

.mobile-category-item i {
  font-size: 1.2rem;
  width: 20px;
  text-align: center;
}

.mobile-category-item span {
  font-weight: 500;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 10px 20px;
  border-bottom: 1px solid #e0e0e0;
}

.mobile-search-header h3 {
  margin: 0;
  color: var(--dark);
  font-size: 1.1rem;
}

.close-search-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #666;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-search-btn:hover {
  background: #f0f0f0;
  color: var(--dark);
}

.mobile-search-input-wrapper {
  position: relative;
  padding: 20px;
}

#mobile-search-input {
  width: 100%;
  padding: 12px 50px 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

#mobile-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(134, 150, 255, 0.1);
}

.mobile-search-submit {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-search-submit:hover {
  background: #6b7cff;
  transform: translateY(-50%) scale(1.05);
}

/* Chips de Categorías */
.category-chips {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.chip {
  background: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: var(--transition);
}

.chip:hover, .chip.active {
  background: var(--secondary);
  color: white;
}

/* Paginación */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.page-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
}

.page-btn:hover, .page-btn.active {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
}


/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 300px;
}

.toast {
  padding: 12px 16px;
  border-radius: 8px;
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: slideInToast 0.3s ease-out, fadeOutToast 0.5s 2.5s forwards;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toast.success { background: #27ae60; }
.toast.error { background: #e74c3c; }
.toast.info { background: #3498db; }

.toast::before {
  content: attr(data-icon);
  margin-right: 8px;
  font-size: 1.2em;
}

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOutToast {
  to { opacity: 0; transform: translateY(-10px); }
}
/* Menú desplegable de perfil */
.profile-dropdown {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item:hover {
  background-color: #f8f9fa;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

/* Animación: Carrito se anima al agregar producto */
@keyframes cartBounce {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(2.3); }
  50% { transform: scale(0.9); }
  75% { transform: scale(1.1); }
}

@keyframes cartShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px) rotate(-5deg); }
  75% { transform: translateX(5px) rotate(5deg); }
}

.cart-icon-animated {
  animation: cartBounce 0.6s ease, cartShake 0.6s 0.6s ease;
  display: inline-block;
}

/* === Página de Detalle de Producto === */
.product-detail-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.product-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-info h1 {
  font-size: 2rem;
  color: var(--dark);
  margin: 0 0 0.5rem 0;
}

.product-category {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 500;
}

.product-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent);
  margin: 0.5rem 0;
}

.product-stock {
  margin: 1rem 0;
  font-size: 0.95rem;
}

.product-description h3 {
  margin-top: 1.5rem;
  color: var(--dark);
  font-size: 1.1rem;
}

.product-description p {
  color: #555;
  line-height: 1.6;
}

.product-actions {
  margin-top: 2rem;
}

.product-actions .btn {
  width: 100%;
  padding: 0.8rem;
  font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
  }

  .product-info h1 {
    font-size: 1.5rem;
  }
}

.cart-icon-animated {
  animation: cartBounce 0.6s ease, cartShake 0.6s 0.6s ease;
  display: inline-block;
}

@keyframes cartBounce {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(0.9); }
  75% { transform: scale(1.1); }
}

@keyframes cartShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px) rotate(-5deg); }
  75% { transform: translateX(5px) rotate(5deg); }
}

#imagenPreview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}


/* Responsive */
@media (max-width: 768px) {
  .nav { flex-direction: column; gap: 1rem; }
  .header { flex-direction: column; }
  .card-grid { grid-template-columns: 1fr; }
  #search-input { width: 180px; }
}



