:root {
    --color-texto:      #1a1c2c;
    --color-rojo:       #e31b23;
    --color-rojo-hover: #b3141a;
    --color-verde:      #3b6d11;
    --gris-fondo:       #f6f8fb;
    --gap-lateral:      clamp(1rem, 3vw, 2rem);
}

body {
    background: #f6f8fb;
    color: var(--color-texto);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

h1 {
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 700;
    margin: var(--gap-lateral) var(--gap-lateral) 4px;
}

h2 {
    font-size: 0.95rem;
    font-weight: 400;
    color: #595959;
    margin: 0 0 12px;
}

hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 0 0 24px;
}

.carrito-layout {
    display: flex;
    flex: 1;
    gap: 24px;
    align-items: flex-start;
    padding: 0 var(--gap-lateral) var(--gap-lateral);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

main {
    flex: 1;
    min-width: 0;
}

main h2 {
    margin-top: 24px;
    color: #57606a;
    letter-spacing: 0.03em;
}

main h2:first-child {
    margin-top: 0;
}
.aviso-ok-reservas{
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.lista-reservas {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.item-reserva {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 0.5px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px;
    transition: background .15s;
}

.item-reserva:hover {
    background: #fafafa;
}

.item-reserva img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    background: #ebebeb;
    flex-shrink: 0;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-info .nombre {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-texto);
    margin: 0 0 3px;
}

.item-info .descripcion {
    font-size: 12px;
    color: #595959;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.item-accion {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.item-accion .precio {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-texto);
    margin: 0;
    white-space: nowrap;
}

.contador {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-eliminar {
    background: var(--color-rojo);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 7px 12px;
    transition: background .2s;
    margin-right: 16px;
}

.btn-eliminar:hover {
    background: var(--color-rojo-hover);
}

.btn-grupo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-cantidad {
    width: 32px;
    height: 32px;
    background: #1a1c2c;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-cantidad:hover {
    background: var(--color-rojo);
}

.cantidad {
    font-size: 1.1rem;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
    color: var(--color-texto);
}
.contador-peso {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-peso {
    width: 65px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    color: #1a1c2c;
    background: #fafafa;
    transition: border-color .2s;
}

.input-peso:focus {
    outline: none;
    border-color: #1a1c2c;
    background: #fff;
}

.input-peso::-webkit-outer-spin-button,
.input-peso::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-peso[type=number] {
    -moz-appearance: textfield;
}

.unidad-peso {
    font-size: 13px;
    color: #595959;
}

/* Resumen */
.resumen {
    width: 260px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid rgba(70, 95, 150, 0.15);
    border-radius: 16px;
    padding: 1.4rem;
    position: sticky;
    top: 1.1rem;
    align-self: flex-start;
    box-shadow: 0 5px 22px rgba(16, 28, 62, 0.12);
}

.resumen-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-texto);
    margin: 0 0 16px;
}

.resumen-seccion {
    font-size: 12px;
    font-weight: 500;
    color: #595959;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 8px;
}

.resumen-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.resumen-nombre {
    font-size: 13px;
    color: var(--color-texto);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    flex: 1;
}

.resumen-precio {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-texto);
    white-space: nowrap;
}

.resumen-hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 10px 0;
}

.resumen-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #595959;
    margin-bottom: 10px;
}

.resumen-separador {
    height: 1px;
    background: #e0e0e0;
    margin: 20px 0;
}

.resumen-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.resumen-total span:first-child {
    font-size: 14px;
    color: #595959;
}

.resumen-total span:last-child {
    font-size: 20px;
    font-weight: 500;
    color: var(--color-texto);
}

.btn-confirmar {
    width: 100%;
    background: var(--color-rojo);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s;
    margin-bottom: 0;
}

.btn-confirmar:hover {
    background: var(--color-rojo-hover);
}
.aviso-ok-pedidos{
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.btn-confirmar-pedidos {
   background: var(--color-rojo);
}

.btn-confirmar-pedidos:hover {
     background: var(--color-rojo-hover);
}

.sin-items {
    color: #5d6680;
    font-size: 0.9rem;
    margin: 0 0 8px;
}

.vacio {
    font-size: 1rem;
    color: #767676;
    text-align: center;
    padding: 40px 0;
}

@media (max-width: 700px) {
    .carrito-layout {
        flex-direction: column;
    }
    .resumen {
        width: 100%;
        position: static;
    }
}