/* Estilos para el carrito deslizante */
.cart-panel {
    position: fixed;
    top: 0;
    right: -400px; /* Inicialmente fuera de la pantalla */
    width: 380px;
    height: 100%;
    background-color: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
    padding: 20px;
  }
  
  .cart-panel.open {
    right: 0; /* Cuando está abierto */
  }
  
  .cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
  }
  
  .cart-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
  }
  
  .close-cart {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #777;
  }
  
  .cart-items {
    margin-bottom: 20px;
  }
  
  .cart-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
  }
  
  .cart-item-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    margin-right: 15px;
  }
  
  .cart-item-details {
    flex-grow: 1;
  }
  
  .cart-item-title {
    margin: 0 0 5px 0;
    font-size: 1rem;
  }
  
  .cart-item-price {
    color: #e63946;
    font-weight: bold;
    margin: 0 0 5px 0;
  }
  
  .cart-item-quantity {
    display: flex;
    align-items: center;
  }
  
  .quantity-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    width: 25px;
    height: 25px;
    font-size: 1rem;
    cursor: pointer;
  }
  
  .quantity-input {
    width: 40px;
    height: 25px;
    text-align: center;
    border: 1px solid #ddd;
    margin: 0 5px;
  }
  
  .remove-item {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    margin-left: auto;
  }
  
  .cart-footer {
    border-top: 1px solid #eee;
    padding-top: 15px;
  }
  
  .cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
  }
  
  .checkout-btn,
  .clear-cart-btn {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
  }
  
  .checkout-btn {
    background-color: #adba5e;
    color: white;
  }
  
  .clear-cart-btn {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
  }
  
  .cart-login-message {
    text-align: center;
    padding: 20px;
  }
  
  .btn-login {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
  }
  
  /* Botón flotante del carrito */
  .cart-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #adba5e;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
  }
  
  .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e63946;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
  }
  
  /* Overlay para cuando el carrito está abierto */
  .cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
  }
  
  .cart-overlay.open {
    display: block;
  }
  
  /* Estilos responsivos */
  @media (max-width: 480px) {
    .cart-panel {
      width: 100%;
      right: -100%;
    }
  }
  