

/* ===== PANEL FLOTANTE PRINCIPAL - DISEÑO MEJORADO ===== */
.floating-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #cccdcd;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: none;
  border-radius: 25px 25px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15), 
              0 -4px 16px rgba(0, 0, 0, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
  padding: 12px 16px 16px 16px;
  gap: 8px;
  z-index: 999;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 100%;
  max-width: 100%;
  /* Soporte para iPhone con notch */
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.floating-panel.desktop {
  display: none;
}

.floating-panel.mobile {
  display: flex;
}

/* Panel items - Diseño mejorado */
.panel-item {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
  border: 1px solid rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08),
              0 1px 4px rgba(0, 0, 0, 0.05),
              inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.panel-item:hover {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.9), rgba(255, 107, 53, 0.8));
  border-color: rgba(255, 107, 53, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.25),
              0 4px 12px rgba(255, 107, 53, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.panel-item:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2),
              0 2px 6px rgba(255, 107, 53, 0.1);
}

.panel-item .icon {
  font-size: 20px;
  color: #4a5568;
  transition: all 0.3s ease;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.panel-item:hover .icon {
  color: white;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

/* Badge del carrito - Mejorado */
.panel-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: linear-gradient(135deg, #ff6b35, #e55a2b);
  color: white;
  border-radius: 14px;
  min-width: 22px;
  height: 22px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 3px solid white;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4),
              0 2px 6px rgba(255, 107, 53, 0.2);
  animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.panel-badge.show {
  display: flex;
}

/* Estado activo para orden */
.panel-item.active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(34, 197, 94, 0.8));
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.25),
              0 2px 8px rgba(34, 197, 94, 0.15);
}

.panel-item.active .icon {
  color: white;
}

/* Indicador de estado */
.status-indicator {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  display: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

/* Animación pulse para el carrito mejorada */
.panel-item.pulse {
  animation: pulseCart 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes pulseCart {
  0% { transform: scale(1) translateY(0); }
  30% { transform: scale(1.15) translateY(-6px); }
  100% { transform: scale(1) translateY(0); }
}

@keyframes bounceIn {
  0% { 
    transform: scale(0) rotate(-180deg); 
    opacity: 0; 
  }
  50% { 
    transform: scale(1.3) rotate(-90deg); 
    opacity: 1; 
  }
  100% { 
    transform: scale(1) rotate(0deg); 
    opacity: 1; 
  }
}

/* ===== RESPONSIVE DESIGN MEJORADO ===== */

/* Tablets */
@media (min-width: 768px) and (max-width: 1024px) {
  .floating-panel {
    padding: 14px 20px 18px 20px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    border-radius: 30px 30px 0 0;
    gap: 12px;
  }
  
  .panel-item {
    width: 56px;
    height: 56px;
    border-radius: 18px;
  }
  
  .panel-item .icon {
    font-size: 22px;
  }
  
  .panel-badge {
    min-width: 24px;
    height: 24px;
    font-size: 12px;
    top: -8px;
    right: -8px;
  }
}

/* Desktop - Tamaño reducido considerablemente */
@media (min-width: 1025px) {
  .floating-panel.desktop {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: auto;
    max-width: 400px; /* Reducido considerablemente */
    padding: 10px 20px 14px 20px; /* Reducido */
    border-radius: 24px 24px 0 0; /* Reducido */
    gap: 10px; /* Reducido */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 250, 0.95));
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12), 
                0 -3px 12px rgba(0, 0, 0, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
  
  .floating-panel.mobile {
    display: none;
  }
  
  .panel-item {
    width: 48px; /* Reducido de 64px */
    height: 48px; /* Reducido de 64px */
    border-radius: 15px; /* Reducido */
  }
  
  .panel-item .icon {
    font-size: 20px; /* Reducido de 24px */
  }
  
  .panel-item:hover {
    transform: translateY(-3px); /* Reducido */
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.25),
                0 3px 10px rgba(255, 107, 53, 0.15);
  }
  
  .panel-badge {
    min-width: 20px; /* Reducido */
    height: 20px; /* Reducido */
    font-size: 10px; /* Reducido */
    top: -5px;
    right: -5px;
    border: 2px solid white; /* Reducido */
  }
}

/* Pantallas muy pequeñas */
@media (max-width: 360px) {
  .floating-panel {
    padding: 10px 12px 0px 12px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
    gap: 6px;
    border-radius: 20px 20px 0 0;
  }
  
  .panel-item {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }
  
  .panel-item .icon {
    font-size: 18px;
  }
  
  .panel-badge {
    min-width: 18px;
    height: 18px;
    font-size: 10px;
    top: -4px;
    right: -4px;
    border: 2px solid white;
  }
}

/* Pantallas ultra grandes */
@media (min-width: 1600px) {
  .floating-panel {
    max-width: 420px; /* Ligeramente más grande en pantallas muy grandes */
    padding: 12px 22px 16px 22px;
  }
  
  .panel-item {
    width: 52px;
    height: 52px;
  }
  
  .panel-item .icon {
    font-size: 22px;
  }
}

/* Soporte para dispositivos con notch/dynamic island */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .floating-panel {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  
  @media (min-width: 768px) and (max-width: 1024px) {
    .floating-panel {
      padding-bottom: calc(18px + env(safe-area-inset-bottom));
    }
  }
  
  @media (max-width: 360px) {
    .floating-panel {
      padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }
  }
}

/* Mejoras para accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .panel-item,
  .panel-badge,
  .floating-panel {
    transition-duration: 0.1s !important;
    animation-duration: 0.1s !important;
  }
  
  .panel-item.pulse {
    animation: none !important;
    transform: scale(1.05);
  }
}

/* Estados de focus mejorados */
.panel-item:focus-visible {
  outline: 3px solid rgba(255, 107, 53, 0.6);
  outline-offset: 3px;
  transform: translateY(-2px);
}



/* Mejoras para rendimiento */
.floating-panel,
.panel-item {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Contenedor interno para centrar elementos en desktop */
@media (min-width: 1025px) {
  .floating-panel.desktop {
    justify-content: center;
    align-items: center;
  }
}



/* ===== MODAL ÚNICO ===== */
.floating-panel-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 0;
}

.floating-panel-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  position: relative;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
}

.floating-panel-modal.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #666;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.15);
  color: #333;
}

.modal-body {
  padding: 10px;
  padding-top: 50px;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== CONTENIDO DE CATEGORÍAS ===== */
.categories-content h3 {
  margin: 0 0 20px 0;
  font-size: 24px;
  font-weight: 600;
  color: #333;
  text-align: center;
}

.categories-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-item {
  display: flex;
  align-items: center;
  padding: 16px;
  border-radius: 12px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.category-item:hover {
  background: #ff6b35;
  color: white;
  border-color: #ff6b35;
}

/* ===== CORRECCIÓN PARA CATEGORÍAS CON SUBCATEGORÍAS ===== */
.category-item.has-subcategories {
  flex-direction: row; /* Cambiado de column a row */
  align-items: center; /* Alinear verticalmente */
  flex-wrap: wrap; /* Permitir que las subcategorías pasen a la siguiente línea */
}

.category-item.has-subcategories .category-main {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 100%; /* Forzar que ocupe todo el ancho */
}

.category-item.has-subcategories .subcategories-list {
  width: 100%;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: none;
}

.category-item.has-subcategories.open .subcategories-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-item.has-subcategories.open {
  background: #ff6b35;
  color: white;
  border-color: #ff6b35;
}

/* Asegurar que el icono, nombre y flecha estén en la misma línea */
.category-main {
  display: flex;
  align-items: center;
  width: 100%;
}
.category-item.open {
  background: #ff6b35;
  color: white;
  border-color: #ff6b35;
}

.category-icon {
  font-size: 20px;
  margin-right: 12px;
  min-width: 24px;
}

.category-name {
  flex: 1;
  font-weight: 500;
}

.category-arrow {
  font-size: 16px;
  transition: transform 0.2s ease;
  margin-left: auto;
}

.category-item.open .category-arrow {
  transform: rotate(90deg);
}

/* Subcategorías */
.subcategories-list {
  display: none;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.subcategories-list.open {
  display: flex;
}

.subcategory-item {
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.subcategory-item:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== CONTENIDO DEL USUARIO ===== */
.user-menu-content {
  text-align: center;
  padding: 0;
}

.user-menu-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
  object-fit: cover;
  border: 3px solid #ff6b35;
}

.user-menu-content h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.user-menu-email {
  color: #666;
  font-size: 14px;
  margin-bottom: 24px;
}

.user-menu-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.user-menu-option {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  color: #333;
}

.user-menu-option:hover {
  background: #ff6b35;
  color: white;
  border-color: #ff6b35;
}

.option-icon {
  margin-right: 12px;
  font-size: 18px;
}

.user-menu-logout {
  background: #dc3545;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.2s ease;
  width: 100%;
}

.user-menu-logout:hover {
  background: #c82333;
}

/* ===== MINI CARRITO ===== */
.mini-cart-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 70vh;
}

.mini-cart-content h3 {
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mini-cart-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
}

.mini-cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.mini-cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-cart-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e9ecef;
}

.mini-cart-item-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.mini-cart-item-info {
  flex: 1;
  min-width: 0;
}

.mini-cart-item-name {
  font-weight: 500;
  color: #333;
  font-size: 14px;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-cart-item-price {
  color: #ff6b35;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.mini-cart-item-specs {
  font-size: 12px;
  color: #666;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-cart-item-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.mini-cart-quantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border-radius: 6px;
  border: 1px solid #dee2e6;
}

.mini-cart-btn-quantity {
  background: none;
  border: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #666;
  font-weight: 600;
  transition: all 0.2s ease;
}

.mini-cart-btn-quantity:hover {
  background: #f8f9fa;
  color: #ff6b35;
}

.mini-cart-quantity {
  font-weight: 500;
  min-width: 20px;
  text-align: center;
  font-size: 14px;
}

.mini-cart-item-actions {
  display: flex;
  gap: 6px;
}

.mini-cart-btn-specs,
.mini-cart-btn-remove {
  background: none;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  color: #666;
}

.mini-cart-btn-specs:hover {
  background: #ff6b35;
  color: white;
  border-color: #ff6b35;
}

.mini-cart-btn-remove:hover {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
}

.mini-cart-footer {
  border-top: 1px solid #e9ecef;
  padding-top: 16px;
  margin-top: auto;
}

.mini-cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
}

.mini-cart-total-price {
  color: #ff6b35;
}

.mini-cart-btn-order {
  width: 100%;
  background: #ff6b35;
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.mini-cart-btn-order:hover {
  background: #e55a2b;
}

/* ===== CARRITO VACÍO ===== */
.empty-cart-content {
  text-align: center;
  padding: 40px 20px;
}

.empty-cart-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-cart-content h3 {
  margin: 0 0 12px 0;
  color: #333;
  font-size: 20px;
}

.empty-cart-message {
  color: #666;
  margin-bottom: 24px;
  font-size: 16px;
}

.empty-cart-button {
  background: #ff6b35;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s ease;
}

.empty-cart-button:hover {
  background: #e55a2b;
}

/* ===== CONTACTO ===== */
.contact-content h3 {
  margin: 0 0 24px 0;
  text-align: center;
  color: #333;
  font-size: 20px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-item {
  display: flex;
  align-items: center;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e9ecef;
}

.contact-icon {
  font-size: 20px;
  margin-right: 16px;
  color: #ff6b35;
  min-width: 24px;
}

.contact-label {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.contact-close-button {
  width: 100%;
  background: #6c757d;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s ease;
}

.contact-close-button:hover {
  background: #5a6268;
}

/* ===== ADVERTENCIAS ===== */
.restaurant-warning-content {
  text-align: center;
  padding: 20px;
}

.warning-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.restaurant-warning-content h3 {
  margin: 0 0 16px 0;
  color: #333;
  font-size: 18px;
}

.restaurant-warning-content p {
  color: #666;
  margin-bottom: 24px;
  line-height: 1.5;
}

.warning-buttons {
  display: flex;
  gap: 12px;
}

.warning-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.warning-btn-cancel {
  background: #6c757d;
  color: white;
}

.warning-btn-cancel:hover {
  background: #5a6268;
}

.warning-btn-clear {
  background: #dc3545;
  color: white;
}

.warning-btn-clear:hover {
  background: #c82333;
}

/* ===== ESPECIFICACIONES ===== */
.specs-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.specs-header {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e9ecef;
}

.specs-back-btn {
  background: none;
  border: none;
  color: #ff6b35;
  cursor: pointer;
  font-size: 16px;
  padding: 8px;
  margin-right: 12px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.specs-back-btn:hover {
  background: rgba(255, 107, 53, 0.1);
}

.specs-header h4 {
  margin: 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.specs-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.specs-product-image {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  align-self: center;
}

.specs-product-info {
  text-align: center;
}

.specs-product-info h5 {
  margin: 0 0 8px 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

.specs-product-info span {
  color: #ff6b35;
  font-weight: 600;
  font-size: 16px;
}

.specs-input-container {
  flex: 1;
}

.specs-input-container textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  transition: border-color 0.2s ease;
  background: #f8f9fa;
}

.specs-input-container textarea:focus {
  outline: none;
  border-color: #ff6b35;
  background: white;
}

.specs-counter {
  text-align: right;
  font-size: 12px;
  color: #999;
}

.specs-save-btn {
  background: #ff6b35;
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.2s ease;
  margin-top: auto;
}

.specs-save-btn:hover {
  background: #e55a2b;
}

/* ===== GLASSMORPHISM BACKDROP ===== */
.glassmorphism-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.glassmorphism-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* ===== NOTIFICACIONES ===== */
.notificacion {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  max-width: 80vw;
  text-align: center;
}

.notificacion.mostrar {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== RESPONSIVE DESIGN ===== */



/* Desktop */
@media (min-width: 1025px) {

  .modal-content {
    max-width: 500px;
    border-radius: 20px;
    max-height: 80vh;
  }
  
  .floating-panel-modal {
    align-items: center;
  }
  
  .floating-panel-modal.active .modal-content {
    transform: translateY(0) scale(1);
  }
  
  .modal-content {
    transform: translateY(30px) scale(0.95);
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  
  .panel-item:hover {
    transform: translateY(-3px);
  }
}




/* Ajustes para header fijo */
body.has-fixed-header .floating-panel {
  bottom: 5px;
}

@media (min-width: 768px) {
  body.has-fixed-header .floating-panel {
    bottom: 30px;
  }
}

@media (min-width: 1025px) {
  body.has-fixed-header .floating-panel {
    bottom: 40px;
  }
}

/* ===== SCROLLBAR PERSONALIZADO ===== */
.modal-body::-webkit-scrollbar {
  width: 4px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* ===== ANIMACIONES ADICIONALES ===== */
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

.floating-panel-modal.active .modal-content {
  animation: slideUp 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== ACCESSIBILITY ===== */


/* Focus states para accesibilidad */
.panel-item:focus-visible,
.modal-close:focus-visible,
.category-item:focus-visible,
.user-menu-option:focus-visible,
.mini-cart-btn-quantity:focus-visible,
.mini-cart-btn-specs:focus-visible,
.mini-cart-btn-remove:focus-visible {
  outline: 2px solid #ff6b35;
  outline-offset: 2px;
}

/* ===== MEJORAS PARA SCROLL DE CATEGORÍAS ===== */
.categories-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 60vh;
}

.categories-content h3 {
  margin: 0 0 20px 0;
  font-size: 24px;
  font-weight: 600;
  color: #333;
  text-align: center;
  flex-shrink: 0;
}

.categories-scroll-container {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.categories-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 5px;
  margin-right: -5px;
}

/* Scrollbar personalizado para categorías */
.categories-list::-webkit-scrollbar {
  width: 6px;
}

.categories-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.categories-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.categories-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Indicador de scroll para móviles */
.categories-scroll-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.9));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.categories-list.scrolling ~ .categories-scroll-indicator {
  opacity: 1;
}

/* Botones de navegación para categorías (solo en desktop) */
.categories-nav-buttons {
  display: none;
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 5;
}

.categories-nav-btn {
  pointer-events: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  opacity: 0;
}

.categories-nav-btn:hover {
  background: #ff6b35;
  color: white;
  border-color: #ff6b35;
}

.categories-scroll-container:hover .categories-nav-btn {
  opacity: 1;
}

/* Estados para los botones de navegación */
.categories-nav-btn.prev {
  transform: translateX(-10px);
}

.categories-nav-btn.next {
  transform: translateX(10px);
}

.categories-scroll-container:hover .categories-nav-btn.prev {
  transform: translateX(-15px);
}

.categories-scroll-container:hover .categories-nav-btn.next {
  transform: translateX(15px);
}

/* ===== RESPONSIVE DESIGN MEJORADO ===== */

/* Tablets */
@media (min-width: 768px) and (max-width: 1024px) {
  .categories-content {
    max-height: 65vh;
  }
  
  .categories-nav-buttons {
    display: flex;
  }
}

/* Desktop */
@media (min-width: 1025px) {
  .categories-content {
    max-height: 70vh;
  }
  
  .categories-nav-buttons {
    display: flex;
  }
  
  .categories-list {
    gap: 10px;
  }
  
  .category-item {
    padding: 18px;
  }
}

/* Pantallas muy pequeñas */
@media (max-width: 360px) {
  .categories-content {
    max-height: 55vh;
  }
  
  .categories-content h3 {
    font-size: 20px;
    margin-bottom: 15px;
  }
  
  .category-item {
    padding: 14px;
  }
  
  .category-icon {
    font-size: 18px;
    margin-right: 10px;
  }
}


/* ===== MEJORAS PARA SCROLL DE CATEGORÍAS ===== */
.categories-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 60vh;
}

.categories-content h3 {
  margin: 0 0 20px 0;
  font-size: 24px;
  font-weight: 600;
  color: #333;
  text-align: center;
  flex-shrink: 0;
}

.categories-scroll-container {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.categories-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 5px;
  margin-right: -5px;
}

/* Scrollbar personalizado para categorías */
.categories-list::-webkit-scrollbar {
  width: 6px;
}

.categories-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.categories-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.categories-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Ajustes específicos para desktop */
@media (min-width: 1025px) {
  .categories-content {
    max-height: 70vh; /* Mayor altura en desktop */
  }
  
  .categories-list {
    gap: 10px;
    max-height: none; /* Permitir que el contenido determine la altura */
    overflow-y: visible; /* Quitar scroll interno */
  }
  
  .categories-scroll-container {
    overflow-y: auto; /* Scroll en el contenedor principal */
    max-height: 100%;
  }
  
  .category-item {
    padding: 18px;
  }
  
  /* Mejorar scrollbar en desktop */
  .categories-scroll-container::-webkit-scrollbar {
    width: 8px;
  }
  
  .categories-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
  }
  
  .modal-content {
    max-height: 85vh; /* Mayor altura para el modal en desktop */
  }
}

/* Pantallas muy grandes */
@media (min-width: 1400px) {
  .categories-content {
    max-height: 75vh;
  }
  
  .modal-content {
    max-height: 90vh;
  }
}



/* ===== MODAL DE LOGIN ----------------------------------------------CUANDO NO ESTOY LOGEADO===== */
.login-modal-content {
  text-align: center;
  padding: 20px;
}

.login-header {
  margin-bottom: 5px;
}

.login-logo {
  font-size: 48px;
  margin-bottom: 5px;
}

.login-header h3 {
  margin: 0 0 8px 0;
  color: #333;
  font-size: 22px;
  font-weight: 600;
}

.login-header p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.login-benefits {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 10px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #555;
  font-size: 14px;
}

.benefit-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

/* ===== MODAL DE LOGIN - ICONO DE GOOGLE CORREGIDO ===== */
.google-login-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  background: #4285f4;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 5px;
  position: relative;
}

.google-login-btn:hover {
  background: #357ae8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.google-icon {
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
}

/* Reemplazar el pseudo-elemento con una máscara SVG */
.google-icon::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  background: #357ae8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Fallback para navegadores que no soportan mask */
@supports not (mask: none) {
  .google-icon::before {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234285f4' d='M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z'/%3E%3C/svg%3E") center/contain no-repeat;
  }
}

.login-footer {
  border-top: 1px solid #e9ecef;
  padding-top: 15px;
}

.login-footer p {
  margin: 0;
  color: #666;
  font-size: 12px;
}

.login-footer a {
  color: #ff6b35;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* Animación de entrada para el modal de login */
@keyframes slideInLogin {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-modal-content {
  animation: slideInLogin 0.3s ease;
}



/* Que el contenido del modal pueda hacer scroll sin mover el body */
.floating-panel-modal .modal-content{
  max-height: 90dvh;          /* limite vertical del modal */
  display: flex;
  flex-direction: column;
}

/* Solo el cuerpo del modal (contenido) scrollea */
.floating-panel-modal .modal-body{
  overflow-y: auto;
  max-height: calc(90dvh - 48px); /* deja espacio a la X de cerrar/título */
  -webkit-overflow-scrolling: touch; /* scroll suave en iOS */
  overscroll-behavior: contain;      /* evita arrastrar el body */
}

/* El contenedor de categorías también con scroll propio */
.categories-scroll-container{
  max-height: 70dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}



@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== PREVENIR ZOOM EN INPUTS MÓVILES ===== */
@media (max-width: 768px) {
  #specs-textarea {
    font-size: 16px; /* Tamaño mínimo para evitar zoom en iOS */
    transform-origin: center;
  }
  
  /* Asegurar que todos los inputs tengan al menos 16px en móviles */
  .specs-input-container textarea,
  .specs-input-container input {
    font-size: 16px !important;
  }
}

/* Deshabilitar zoom en iOS específicamente */
@supports (-webkit-touch-callout: none) {
  #specs-textarea {
    font-size: 16px;
  }
}


.loading-cart {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
  color: #666;
  font-size: 16px;
}

.loading-cart::after {
  content: "";
  width: 20px;
  height: 20px;
  margin-left: 10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #ff6b35;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}