/* ======== ESTILOS GENERALES Y ENCABEZADO ======== */
:root {
    --primary-color: #006d3b;
    --secondary-color: #ffcc00;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
}

.menu-header {
    background-color: var(--primary-color);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.menu-link,
.login-link {
    text-decoration: none;
    font-weight: 600;
    color: #fff;
    transition: all 0.3s ease;
}

.menu-link:hover,
.login-link:hover {
    color: var(--secondary-color);
}

/* ======== CONTENEDOR PRINCIPAL DEL CARRITO ======== */
.cart-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.cart-container h1 {
    text-align: center;
    font-size: 3rem;
    color: #333;
    margin-bottom: 3rem;
}

.cart-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: flex-start;
}

/* ======== LISTA DE PRODUCTOS (COLUMNA IZQUIERDA) ======== */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-item {
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 1.5rem;
}

.item-details {
    flex-grow: 1;
}

.item-details h2 {
    font-size: 1.2rem;
    color: #333;
    margin: 0 0 0.5rem;
}

.item-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.remove-btn {
    background: none;
    border: none;
    color: #c62828;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.quantity-btn {
    background-color: #f0f0f0;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
}

.quantity {
    font-size: 1.2rem;
    font-weight: 600;
}

/* ======== RESUMEN DEL PEDIDO (COLUMNA DERECHA) ======== */
.order-summary {
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 120px;
    /* Para que se quede fijo al hacer scroll */
}

.order-summary h2 {
    font-size: 1.5rem;
    margin: 0 0 1.5rem;
    text-align: center;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
    font-size: 1.3rem;
    font-weight: 700;
}

.checkout-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    background-color: #005a2e;
    transform: translateY(-3px);
}

.continue-shopping {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: #666;
    text-decoration: none;
}

/* ======== RESPONSIVO PARA MÓVILES ======== */
@media (max-width: 900px) {
    .cart-wrapper {
        grid-template-columns: 1fr;
        /* Apila las columnas */
    }

    .order-summary {
        position: static;
        /* Desactiva el efecto 'sticky' */
    }
}