/* PANEL DEL CARRITO */
#carrito {
  position: fixed;
  right: 0;
  top: 0;
  width: 400px;
  max-width: 92%;
  height: 100vh;
  background: #ffffff;
  padding: 10px;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  z-index: 9999;
  overflow: visible;
  border-radius: 12px 0 0 12px;
  background: #ffffff;
  border-left: 1px solid #dfe3e8;
  box-shadow: -4px 0 14px rgba(0,0,0,0.05);
  padding-bottom: 16px;       /* pequeño colchón interno */
  margin-bottom: env(safe-area-inset-bottom, 20px); /* espacio contra barra de tareas */
}

#carrito.abierto {
  transform: translateX(0);
}

#carrito.minimizado {
  transform: translateX(calc(100% - 40px));
}

/* CONTENIDO INTERNO */

.carrito-contenido {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* TÍTULO */
#carrito h2 {
  font-size: 20px;
  font-weight: 600;
  color: #1b1c24;
  margin-bottom: 16px;
  margin-left: 20px;
}

/* LISTA */

.lista-carrito {
  flex: 1;
  overflow-y: auto;
  gap: 16px;
  margin-bottom: 20px;
  margin-left: 30px;
}

.carrito-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 15px;
  border-bottom: 1px solid #eeeeee;

  align-items: flex-start;
  gap: 10px;
}

.carrito-item span:first-child {
  flex: 1;
}

.carrito-item:last-child {
  border-bottom: none;
}

.precio {
  white-space: nowrap;
  margin-left: 10px;
}

/* TOTAL */

.carrito-total {
   /* position: sticky;*/
    background: #fff;
    padding: 24px 16px;
    border-top: 1px solid #e5e5e5;
    border-color: #1b1c24;
    border: 5px;
    z-index: 10;
    margin-bottom: 60px;   /* ← ESTO LO SALVA EN WINDOWS */
    box-shadow: 0 -6px 12px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(6px);
}

.carrito-total p {
  font-size: 1.2rem;
  color: #1b1c24;
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;

}

/* ABRIR Y CERRAR CARRITO */
#carrito-min {
  background: white;
  border-radius: 12px;
  width: 30px;
  border: none;
  left: 0px;
}

#carrito-min:hover {
  background: #fdf8e8;   
}

/* Botones neutros */
.carrito-total button {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 12px;
    background: #f7f7f7;
    border: 1px solid #e3e3e3;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #1b1c24;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.carrito-total button:hover {
    background: #fdf8e8; /* dorado muy suave */
    border-color: #f4d58d;
    box-shadow: 0 3px 6px rgba(0,0,0,0.12);
}

/* Botón del carrito en el header */
#btn-carrito {
    position: fixed;
    top: 10px;
    right: 75px;
    z-index: 9999;
    background: #ffffff;
    border: 1px solid #e3e3e3;
    padding: 10px 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #1b1c24;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
}

#btn-carrito:hover {
    background: #fdf8e8;   /* dorado muy suave */
    border-color: #f4d58d;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

#btn-carrito svg {
    width: 22px;
    height: 22px;
    stroke: #1b1c24;
}

/* Badge (contador) */
#contador-carrito {
    background: #1b1c24;       
    color: white;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -6px;
    right: -6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}


