* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: white;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER ===== */
header {
    padding: 20px 5%;
    border-bottom: 1px solid #f0f0f0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 70px;
    width: auto;
}

.logo a {
    text-decoration: none;
    color: #000;
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.logo a:focus {
    outline: 2px solid #ff4d4d;
    outline-offset: 2px;
}

.menu-central {
    display: flex;
    gap: 15px;
    list-style: none;
}

.menu-central li a {
    text-decoration: none;
    color: black;
    font-weight: 500;
    padding: 10px 25px;
    border: 2px solid black;
    border-radius: 30px;
    display: inline-block;
    transition: all 0.3s ease;
}

.menu-central li a:hover,
.menu-central li a:focus {
    background-color: black;
    color: white;
    outline: 2px solid #ff4d4d;
    outline-offset: 2px;
}

.iconos-derecha {
    display: flex;
    gap: 20px;
    list-style: none;
    align-items: center;
}

.iconos-derecha li a {
    text-decoration: none;
    color: black;
    font-size: 1.3rem;
    transition: transform 0.2s;
    position: relative;
    display: inline-block;
}

.iconos-derecha li a:hover,
.iconos-derecha li a:focus {
    transform: scale(1.1);
    outline: 2px solid #ff4d4d;
    outline-offset: 4px;
}

.icono-nav {
    width: 24px;
    height: 24px;
    display: block;
    pointer-events: none;
}

/* Badge */
.icono-con-badge {
    position: relative;
}

.badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: #ff4d4d;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    pointer-events: none;
}

/* ===== SECCIÓN CARRITO CON PRODUCTOS ===== */
.carrito-contenido {
    flex: 1;
    padding: 60px 5%;
    text-align: center;
}

.carrito-contenido h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.carrito-subtitulo {
    color: #666;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.carrito-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

/* Lista de productos */
.productos-lista {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.carrito-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 20px;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
    align-items: center;
}

.item-img {
    width: 100px;
    height: 120px;
    background-size: cover;
    background-position: center;
}

.item-detalles h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.item-precio {
    color: #666;
    margin-bottom: 10px;
}

.item-cantidad {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
}

.cantidad-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.cantidad-btn:hover,
.cantidad-btn:focus {
    background: black;
    color: white;
    border-color: black;
    outline: 2px solid #ff4d4d;
    outline-offset: 2px;
}

.cantidad-num {
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

.item-eliminar {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 0.8rem;
    text-decoration: underline;
    margin-top: 5px;
}

.item-eliminar:hover,
.item-eliminar:focus {
    color: #ff4d4d;
    outline: 2px solid #ff4d4d;
    outline-offset: 2px;
}

.item-subtotal {
    font-weight: bold;
    font-size: 1.1rem;
    white-space: nowrap;
}

/* Order Summary */
.order-summary {
    background: #f9f9f9;
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.order-summary h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 1rem;
}

.summary-row.total {
    border-top: 2px solid #ddd;
    margin-top: 10px;
    padding-top: 15px;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Medios de pago */
.metodos-pago {
    margin: 25px 0;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.metodos-pago p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
}

.pago-iconos {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.pago-iconos span {
    font-size: 0.85rem;
    background: white;
    padding: 5px 12px;
    border: 1px solid #ddd;
}

/* Botones del carrito */
.carrito-botones {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.btn-volver {
    background: transparent;
    color: black;
    border: 2px solid black;
    padding: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-volver:hover,
.btn-volver:focus {
    background: black;
    color: white;
    outline: 2px solid #ff4d4d;
    outline-offset: 2px;
}

.btn-proceder {
    background: black;
    color: white;
    border: none;
    padding: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-proceder:hover,
.btn-proceder:focus {
    background: #333;
    transform: translateY(-2px);
    outline: 2px solid #ff4d4d;
    outline-offset: 2px;
}

/* ===== FOOTER ===== */
footer {
    background-color: #1a1a1a;
    color: white;
    padding: 50px 5% 20px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover,
.footer-col a:focus {
    color: white;
    outline: 2px solid #ff4d4d;
    outline-offset: 2px;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    color: #666;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .carrito-grid {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 20px;
    }
    
    .menu-central {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .carrito-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .item-img {
        width: 100%;
        height: 200px;
        margin: 0 auto;
    }
    
    .item-subtotal {
        text-align: center;
        padding-top: 10px;
        border-top: 1px solid #eee;
    }
    
    .item-cantidad {
        justify-content: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .carrito-contenido h1 {
        font-size: 2rem;
    }
}
