.carrito-item {
  position: relative;
}

.cart-count {
    position: absolute; /* Ahora se posicionará en relación a #nav-cart */
    background-color: red;
    width: 20px;
    height: 20px;
    color: white;
    font-weight: bold;
    border-radius: 50%;
    margin-top: -50px;
    margin-left: 40px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 10; /* Asegura que quede sobre otros elementos */
}

.carrito-marcador {
    background-color: #f0c14b;
    color: #111;
    border: 1px solid #a88734;
    border-radius: 50%;
    padding: 5px 10px;
    font-size: 14px;
    position: absolute;
    top: -10px;
    right: -10px;
    font-weight: bold;
    display: none; /* Oculto inicialmente */
    z-index: 1;
}

.cart { 
    list-style: none;
} 
.cart a { 
    text-decoration: none; 
    color: #333333; /* Verde oscuro */
    font-weight: 700;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.cart a:hover{
    background-color: #00796B;
    color: white;
    transform: translateY(-3px);
}
.cart a i{
    font-size: 20px;
    transition: transform 0.3s ease-in-out;
}

.cart a :hover i{
    transform: scale(1.2);
}

#nav-cart { 
    border-radius: 8px;
    width: 85%;
    max-width: 1200px;
    margin: 5px auto;
    margin-left: 20px;
    display: flex; 
    padding: 8px;
    align-items: 
    center; 
    gap: 5px; 
} 
#nav-cart i {
     font-size: 24px; 
}

/*-------------------------------
--------Seccion del carrito--------------*/
#carrito {
    background-color: #ffffff; /* Fondo blanco */
    border-radius: 12px; /* Bordes ligeramente redondeados */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Sombra sutil */
    padding: 30px 40px;
    width: 100%;
    max-width: 900px; /* Máximo tamaño */
    margin-left: 20px; /* Alineado al lado izquierdo */
    margin-top: 50px; /* Espacio superior */
    background: #fafafa; /* Fondo claro */
    text-align: left; /* Alineación de texto */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Título del carrito */
#cart-title {
    text-align: left;
    color: #212121; /* Gris oscuro */
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Botón de regresar */
#regresar {
    background-color: transparent;
    color: #212121;
    border: 2px solid #212121;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 12px 24px;
    border-radius: 30px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    display: inline-block;
}

#regresar:hover {
    background-color: #212121;
    color: white;
    border-color: #1b1b1b;
}

/* Contenedor de los productos */
#carrito-container {
    margin-bottom: 30px;
}

/* Carrito vacío */
#carrito-vacio {
    text-align: center;
    margin-top: 30px;
}

#carrito-vacio img {
    width: 150px;
    margin-bottom: 20px;
}

#cart-empty-text {
    font-size: 18px;
    color: #757575;
    font-weight: 400;
}

/* Total del carrito */
.carrito_total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #ddd;
}

/* Estilo de la línea de separación entre Total y precio */
.carrito_total::before {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background-color: #ddd;
    margin-bottom: 15px;
}

/* Estilos de Total */
#total {
    font-size: 28px;
    color: #212121;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Estilo para cart-total */
#cart-total {
    font-size: 36px;
    color: #212121;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Botón de checkout */
.checkout-button {
    background-color: #00796b94;
    color: white;
    border: 2px solid #00796B;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    text-align: left;
    margin-top: 20px;
    display: inline-block;
    width: auto;
}

.checkout-button:hover {
    background-color: #1b1b1b;
    border-color: #121212;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Separadores sutiles */
hr {
    border: 0;
    height: 1px;
    background-color: #e0e0e0;
    margin: 20px 0;
}

/*-------------------- Producto individual del Carrito------------------------------
----------------------------------------------------------------------- */
.carrito-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 15px;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    gap: 15px;
}

.carrito-item:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

/* Imagen del producto */
.carrito-imagen {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid #dcdcdc;
}

/* Contenedor de detalles */
.carrito-detalles {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 8px;
}

.carrito-nombre {
    font-size: 18px;
    font-weight: bold;
    color: #333333;
    margin: 0;
    text-transform: capitalize;
}

.carrito-precio {
    font-size: 16px;
    font-weight: bold;
    color: #2c7a7b; /* Color verde profesional */
    margin: 0;
}

/* Botones de cantidad */
.carrito-cantidad {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
}

.carrito-cantidad button {
    background-color: #f9f9f9;
    color: #000;
    border: 1px solid #cccccc;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.carrito-cantidad button:hover {
    background-color: #eaeaea;
    transform: scale(1.1);
}

/* Botón de eliminar */
.eliminar-producto {
    background-color: #e63946; /* Rojo profesional */
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-left: auto;
}

.eliminar-producto:hover {
    background-color: #d62828;
    transform: scale(1.05);
}
/*-----------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------*/

.carrito-producto-info {
    flex-grow: 1;
}

.carrito-producto-info h3 {
    font-size: 1.2em;
    margin: 0 0 10px;
    color: #2f4632; /* Verde oscuro */
}

.carrito-producto-info p {
    font-size: 0.9em;
    margin: 0;
    color: #6d7d6d; /* Verde grisáceo */
}

.carrito-producto-precio {
    font-size: 1em;
    font-weight: bold;
    color: #e76f51; /* Naranja pastel */
    margin-left: 15px;
    white-space: nowrap;
}

@keyframes agregarAlCarrito {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.5) translateY(-20px);
        opacity: 0;
    }
}

.animacion-carrito {
    animation: agregarAlCarrito 0.5s forwards;
}

.producto {
    position: relative;
    overflow: hidden;
}

.hidden {
    display: none;
}

.carrito-producto.combo {
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.carrito-combo-detalles ul {
    margin: 10px 0 0 20px;
    padding: 0;
    list-style-type: disc;
    font-size: 0.9em;
    color: #555;
}

.carrito-combo-detalles ul li {
    margin-bottom: 5px;
}

/* Identificador visual de combo */
.combo-badge {
    background-color: #ffd700; /* Color verde */
    color: #000;  /* Color de texto blanco */
    padding: 0.3rem 0.6rem; /* Espaciado interno */
    border-radius: 0.5rem; /* Bordes redondeados */
    font-size: 0.9rem; /* Tamaño de fuente */
    position: absolute;
    top: 10px;
    left: 10px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.carrito-item.combo {
    border: 2px solid #4CAF50; /* Borde verde */
    background-color: #f0fff4; /* Fondo claro para combos */
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carrito-item.combo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.carrito-detalles {
    flex: 1;
}

.carrito-combo-detalles {
    margin-top: 8px;
}

.carrito-cantidad span {
    font-size: 20px; /* Tamaño de fuente normal */
    font-weight: bold; /* Negrita para destacar */
    color: #333; /* Gris oscuro, sutil */
    letter-spacing: 0.5px; /* Espaciado entre letras para mayor claridad */
}

.combo-contenedor .btn-carrito{
    font-size: 17px;
    padding: 3px 6px;
}
.carrito-section {
  margin-bottom: 30px;
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
}

.carrito-section h3 {
  color: #333;
  font-size: 18px;
  margin-bottom: 15px;
  padding-bottom: 5px;
  border-bottom: 2px solid #eee;
}

.carrito-section.no-disponibles h3 {
  color: #999;
  border-bottom-color: #ff6b6b;
}

.carrito-producto.no-disponible .eliminar-producto {
  background-color: #999;
}

.carrito-producto.no-disponible .eliminar-producto:hover {
  background-color: #777;
}

.carrito-cantidad span {
  display: inline-block;
  min-width: 20px;
  text-align: center;
}