:root {
    --primary-color: #2c3e50;    
    --secondary-color: #e67e22;  
    --bg-color: #f4f7f6;
    --text-color: #333;
    --white: #ffffff;
    --rojo: #c0392b;
    --verde: #27ae60;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 10px;
}
nav h1 {
    font-size: 2rem;
    flex: 1;
    min-width: 200px;
}

button {
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 10px 15px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.8rem;
}

#btn-carrito {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s;
}

#btn-carrito:hover {
    transform: scale(1.05);
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

#hero {
    text-align: center;
    margin-bottom: 2rem;
}


#filtros {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-filtro {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--primary-color);
    background: transparent;
    cursor: pointer;
    border-radius: 20px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-filtro:hover, .btn-filtro.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.producto-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}
.producto-card img{
    width: 100%;
    height: 200px;
    object-fit: contain;
}

.producto-card:hover {
    transform: translateY(-5px);
}

.producto-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.info-prod {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.precio {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.btn-agregar {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.8rem;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

.btn-agregar:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow);
    opacity: 0.9;
}

.modal-hidden {
    display: none; 
}

.item-presupuesto {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 5px solid var(--secondary-color);
    box-shadow: var(--shadow);
}

.item-presupuesto p {
    margin: 0;
    font-size: 0.9rem;
}
.item-presupuesto p:last-of-type {
    margin-left: auto;
    margin-right: 20px;
    font-weight: bold;
}

.btn-eliminar {
    background: var(--rojo);
    color: var(--white);
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}

.btn-eliminar:hover {
    background-color: #a93226;
    transform: scale(1.01);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#vaciar-carrito, #finalizar-compra {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background-color: var(--rojo); 
    color: var(--white);
    padding: 12px 25px;
    font-size: 0.9rem;
    margin-right: 10px;
    border-radius: 30px;
}

#finalizar-compra {
    background-color: var(--verde); 
}

#finalizar-compra:hover, #vaciar-carrito:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

select {
    padding: 5px 10px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    background-color: var(--white);
    font-family: inherit;
    cursor: pointer;
    outline: none;
    margin-bottom: 10px;
}

#modal-carrito {
    margin-top: 30px;
    padding: 30px; 
}

#modal-carrito h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.controles-cantidad {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 20px;
}

.controles-cantidad button {
    background: var(--primary-color);
    color: var(--white);
    padding: 2px 10px;
    border-radius: 50%;
    line-height: 1;
}

.controles-cantidad button:hover {
    background: #ddd;
}

.resumen-presupuesto {
    text-align: right; 
    margin-top: 20px;
    padding: 20px;
    border-top: 2px solid #eee;
}

.resumen-presupuesto p {
    margin: 5px 0;
    font-size: 1rem;
}

.carrito-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.columna-productos {
    flex: 2; 
}

.columna-resumen {
    flex: 1; 
    position: sticky;
    top: 100px;
}

.resumen-caja {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.resumen-linea {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1rem;
}

.total-destacado {
    font-weight: bold;
    font-size: 1.2rem;
    color: #2c3e50;
    margin-top: 10px;
}

.acciones-verticales {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 968px) {
    html {
        font-size: 95%;
    }
    #filtros {
        flex-wrap: wrap;
    }
    .carrito-layout {
        flex-direction: column;
        gap: 20px;
    }
    .columna-productos, .columna-resumen {
        width: 100%;
        flex: none;
    }
    .columna-resumen {
        position: static;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 90%;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 85%;
    }
    header {
        padding: 1rem;
    }
    nav {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    #btn-carrito {
        width: 100%;
        margin-top: 10px;
    }
}