/* pedidos.css */
/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background: linear-gradient(135deg, #f7f3ef 0%, #e8ddd4 100%);
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
}

/* Header y navegación */
header {
  background: linear-gradient(135deg, #231a11 0%, #2e2113 50%, #3d2f1e 100%);
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  backdrop-filter: blur(10px);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #DAA520;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.logo:hover {
  transform: scale(1.05);
  text-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a,
.nav-links button {
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: 30px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.nav-links a:hover,
.nav-links button:hover {
  background: rgba(255, 215, 0, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.nav-links .auth-btn {
  background: linear-gradient(135deg, #DAA520, #DAA520);
  color: #2e2113;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.nav-links .auth-btn:hover {
  background: linear-gradient(135deg, #DAA520, #DAA520);
  color: #231a11;
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.nav-links .cart-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #DAA520;
  backdrop-filter: blur(10px);
}

.nav-links .cart-btn:hover {
  background: linear-gradient(135deg, #DAA520, #DAA520);
  color: #231a11;
  border-color: #DAA520;
}

/* Menú hamburguesa */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.hamburger:hover {
  background: rgba(255, 215, 0, 0.15);
  transform: scale(1.1);
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: linear-gradient(90deg, #DAA520, #DAA520);
  margin: 3px 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Menú móvil */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, #231a11, #2e2113);
  backdrop-filter: blur(15px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  border-radius: 0 0 20px 20px;
}

.mobile-menu.active {
  display: block;
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu ul {
  list-style: none;
  padding: 1.5rem;
}

.mobile-menu li {
  margin: 0.75rem 0;
}

.mobile-menu a,
.mobile-menu button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  color: white;
  text-decoration: none;
  border-radius: 15px;
  transition: all 0.3s ease;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  width: 100%;
  text-align: left;
  font-weight: 500;
}

.mobile-menu a:hover,
.mobile-menu button:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 237, 78, 0.1));
  transform: translateX(10px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Contenido principal */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.user-info {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 237, 78, 0.1));
  padding: 1.25rem 2rem;
  border-radius: 25px;
  border: 2px solid rgba(255, 215, 0, 0.3);
  display: inline-block;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
  animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-info p {
  margin: 0;
  font-weight: bold;
  color: #231a11;
  font-size: 1.1rem;
}

/* Sección de pedidos mejorada */
.pedidos-section {
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
  border-radius: 25px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  padding: 3rem;
  margin-bottom: 3rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}

.pedidos-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #231a11, #DAA520, #231a11);
  border-radius: 25px 25px 0 0;
}

.pedidos-section h2 {
  color: #231a11;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
}

.pedidos-section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, #DAA520, #DAA520);
  border-radius: 2px;
}

/* Estados de carga */
.loading {
  text-align: center;
  padding: 4rem;
  color: #666;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-direction: column;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #DAA520;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Sin pedidos mejorado */
.no-pedidos {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
  animation: fadeInUp 0.6s ease;
}

.no-pedidos-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  display: block;
}

.no-pedidos h3 {
  color: #231a11;
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.no-pedidos p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

/* Grid de pedidos mejorado */
.pedidos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

/* Cards de pedidos mejoradas */
.pedido-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(247, 243, 239, 0.9));
  border-radius: 25px;
  padding: 2.5rem;
  border: 2px solid transparent;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.6s ease;
  animation-fill-mode: both;
}

.pedido-card:nth-child(2) { animation-delay: 0.1s; }
.pedido-card:nth-child(3) { animation-delay: 0.2s; }
.pedido-card:nth-child(4) { animation-delay: 0.3s; }

.pedido-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #231a11, #DAA520, #231a11);
  border-radius: 25px 25px 0 0;
}

.pedido-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  border-color: #DAA520;
}

/* Header del pedido */
.pedido-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pedido-id {
  font-size: 1.3rem;
  font-weight: bold;
  color: #231a11;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pedido-fecha {
  color: #666;
  font-size: 0.95rem;
  background: rgba(255, 215, 0, 0.15);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  font-weight: 500;
}

/* Total del pedido */
.pedido-total {
  font-size: 1.6rem;
  font-weight: bold;
  color: #22c55e;
  text-align: center;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.1));
  border-radius: 20px;
  border: 2px solid rgba(34, 197, 94, 0.3);
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.2);
}

/* Lista de productos */
.productos-list {
  margin: 1.5rem 0;
}

.productos-list h4 {
  color: #231a11;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.productos-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.producto-item {
  background: rgba(255, 255, 255, 0.8);
  padding: 1rem 1.5rem;
  border-radius: 15px;
  border-left: 4px solid #DAA520;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.producto-item:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.producto-nombre {
  font-weight: bold;
  color: #231a11;
  font-size: 1rem;
}

.producto-cantidad {
  color: #666;
  font-size: 0.9rem;
  background: rgba(35, 26, 17, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-weight: 600;
}

/* Estado del pedido */
.pedido-status {
  margin-top: 1.5rem;
  text-align: center;
}

.status-badge {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pendiente {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 235, 59, 0.1));
  color: #f57c00;
  border: 2px solid rgba(255, 193, 7, 0.3);
}

.status-en-proceso {
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(100, 181, 246, 0.1));
  color: #1976d2;
  border: 2px solid rgba(33, 150, 243, 0.3);
}

.status-completado {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(129, 199, 132, 0.1));
  color: #388e3c;
  border: 2px solid rgba(76, 175, 80, 0.3);
}

/* Botón principal */
.btn-primary {
  background: linear-gradient(135deg, #231a11, #2e2113);
  color: white;
  border: none;
  padding: 1.25rem 2.5rem;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(35, 26, 17, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2e2113, #3d2f1e);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(35, 26, 17, 0.4);
}

/* ============================================
   CARRITO LATERAL CORREGIDO Y MEJORADO
   ============================================ */

.carrito-sidebar {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  max-width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(247, 243, 239, 0.95));
  box-shadow: -15px 0 50px rgba(0,0,0,0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2000;
  overflow-y: auto;
  backdrop-filter: blur(20px);
  border-left: 3px solid #DAA520;
}

.carrito-sidebar.active {
  right: 0;
}

/* Header del carrito */
.carrito-header {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, rgba(35, 26, 17, 0.95), rgba(46, 33, 19, 0.9));
  color: white;
  padding: 2rem;
  border-bottom: 3px solid #DAA520;
  backdrop-filter: blur(15px);
  z-index: 10;
}

.carrito-header h2 {
  color: white;
  margin: 0;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.carrito-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.carrito-close:hover {
  background: rgba(255, 215, 0, 0.3);
  transform: scale(1.1);
}

/* Contenido del carrito */
.carrito-contenido {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Items del carrito */
.carrito-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.carrito-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
  border: 2px solid rgba(255, 215, 0, 0.2);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.carrito-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #231a11, #DAA520, #231a11);
}

.carrito-item:hover {
  border-color: #DAA520;
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.2);
  transform: translateY(-2px);
}

.item-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.item-nombre {
  font-weight: bold;
  color: #231a11;
  font-size: 1.1rem;
  flex: 1;
}

.item-precio {
  font-weight: bold;
  color: #22c55e;
  font-size: 1.1rem;
  background: rgba(34, 197, 94, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.item-subtotal {
  font-weight: bold;
  color: #22c55e;
  font-size: 1.2rem;
  text-align: right;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.1));
  border-radius: 15px;
  border: 2px solid rgba(34, 197, 94, 0.3);
}

/* Controles de cantidad CORREGIDOS */
.controles-cantidad {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(35, 26, 17, 0.1), rgba(46, 33, 19, 0.05));
  padding: 1rem;
  border-radius: 15px;
  border: 2px solid rgba(255, 215, 0, 0.3);
  gap: 1rem;
}

.controles-cantidad-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.4);
}

.controles-cantidad button {
  background: linear-gradient(135deg, #231a11, #2e2113);
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(35, 26, 17, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.controles-cantidad button:hover {
  background: linear-gradient(135deg, #2e2113, #3d2f1e);
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(35, 26, 17, 0.4);
}

.controles-cantidad button:active {
  transform: scale(0.95);
}

.cantidad-display {
  font-weight: bold;
  color: #231a11;
  font-size: 1.2rem;
  min-width: 50px;
  text-align: center;
  background: rgba(255, 215, 0, 0.2);
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.5);
}

.btn-eliminar {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.3);
}

.btn-eliminar:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
}

/* Carrito vacío */
.carrito-vacio {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
}

.carrito-vacio-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.carrito-vacio h3 {
  color: #231a11;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.carrito-vacio p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Total del carrito */
.carrito-total {
  position: sticky;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 243, 239, 0.95));
  padding: 2rem;
  border-top: 3px solid #DAA520;
  backdrop-filter: blur(20px);
  box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
}

.total-display {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
  padding: 1.5rem 2rem;
  border-radius: 20px;
  border: 3px solid rgba(34, 197, 94, 0.4);
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.2);
}

.total-display h3 {
  color: #231a11;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.total-precio {
  font-size: 2rem;
  font-weight: bold;
  color: #22c55e;
  text-shadow: 0 2px 4px rgba(34, 197, 94, 0.3);
}

.btn-finalizar {
  width: 100%;
  background: linear-gradient(135deg, #231a11, #2e2113);
  color: white;
  border: none;
  padding: 1.25rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(35, 26, 17, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-finalizar:hover {
  background: linear-gradient(135deg, #2e2113, #3d2f1e);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(35, 26, 17, 0.4);
}

/* Overlay del carrito */
.carrito-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.carrito-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Responsive para carrito */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .logo {
    font-size: 1.2rem;
  }

  .carrito-sidebar {
    width: 100vw;
    right: -100vw;
  }

  .carrito-header {
    padding: 1.5rem;
  }

  .carrito-header h2 {
    font-size: 1.5rem;
  }

  .carrito-contenido {
    padding: 1.5rem;
  }

  .carrito-item {
    padding: 1.25rem;
  }

  .item-info {
    flex-direction: column;
    gap: 0.75rem;
  }

  .controles-cantidad {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .controles-cantidad-buttons {
    justify-content: center;
  }

  .btn-eliminar {
    width: 100%;
    text-align: center;
  }
}

/* Responsive mejorado */
@media (max-width: 768px) {
  main {
    padding: 1.5rem;
  }

  .pedidos-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .pedido-card {
    padding: 2rem;
  }

  .pedidos-section {
    padding: 2rem;
  }

  .pedidos-section h2 {
    font-size: 2rem;
  }

  .pedido-header {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .pedido-total {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  main {
    padding: 1rem;
  }

  .pedidos-section {
    padding: 1.5rem;
    margin: 1rem 0;
  }

  .pedidos-section h2 {
    font-size: 1.8rem;
  }

  .pedido-card {
    padding: 1.5rem;
  }

  .pedido-total {
    font-size: 1.3rem;
    padding: 1rem;
  }

  .producto-item {
    padding: 0.75rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .no-pedidos {
    padding: 3rem 1rem;
  }

  .no-pedidos h3 {
    font-size: 1.6rem;
  }

  .no-pedidos p {
    font-size: 1rem;
  }

  /* Ajustes específicos para móvil */
  .carrito-total {
    padding: 1.5rem;
  }

  .total-display {
    padding: 1.25rem;
  }

  .total-precio {
    font-size: 1.75rem;
  }

  .btn-finalizar {
    padding: 1.25rem;
    font-size: 1.1rem;
  }
}

/* Utilidades */
.oculto {
  display: none !important;
}

/* Scrollbar personalizado */
.carrito-sidebar::-webkit-scrollbar {
  width: 8px;
}

.carrito-sidebar::-webkit-scrollbar-track {
  background: rgba(255, 215, 0, 0.1);
  border-radius: 4px;
}

.carrito-sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #DAA520, #DAA520);
  border-radius: 4px;
}

.carrito-sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #DAA520, #DAA520);
}

/* Animaciones adicionales */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.carrito-item {
  animation: slideInRight 0.4s ease;
}

.carrito-item:nth-child(2) { animation-delay: 0.1s; }
.carrito-item:nth-child(3) { animation-delay: 0.2s; }
.carrito-item:nth-child(4) { animation-delay: 0.3s; }

/* Estados de los botones */
.btn-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-loading {
  position: relative;
  color: transparent;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Efectos de hover mejorados */
.carrito-item:hover .item-nombre {
  color: #DAA520;
  transition: color 0.3s ease;
}

.carrito-item:hover .controles-cantidad {
  border-color: #DAA520;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 237, 78, 0.1));
}

/* Mensaje de éxito/error (para futuras implementaciones) */
.mensaje {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 1.5rem 2rem;
  border-radius: 15px;
  color: white;
  font-weight: bold;
  z-index: 3000;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  backdrop-filter: blur(15px);
  animation: fadeInUp 0.4s ease;
}

.mensaje-exito {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: 2px solid rgba(34, 197, 94, 0.5);
}

.mensaje-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: 2px solid rgba(239, 68, 68, 0.5);
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus states para accesibilidad */
button:focus,
.btn-primary:focus,
.btn-finalizar:focus {
  outline: 3px solid rgba(255, 215, 0, 0.5);
  outline-offset: 2px;
}

/* Estilos para impresión */
@media print {
  .carrito-sidebar,
  .carrito-overlay,
  .hamburger,
  .nav-links .cart-btn {
    display: none !important;
  }
}