﻿body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #f0f4f8;
}

header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.botones-header button {
    background-color: #ff9f43;
    color: white;
    border: none;
    padding: 10px 15px;
    margin-left: 10px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

    .botones-header button:hover {
        background-color: #f39c12;
    }

.container {
    display: flex;
    max-width: 1600px;
    margin: 20px auto;
    gap: 20px;
    padding: 0 20px;
}

.productos-seccion {
    flex: 3;
}

.carrito-seccion {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    height: fit-content;
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    padding: 15px;
}

    .card img {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }

.btn-add {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

.btn-comprar {
    width: 100%;
    background-color: #007bff;
    color: white;
    padding: 15px;
    border: none;
    font-size: 1.1em;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
}

/* CAPA FLOTANTE / MODALES */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    width: 450px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

    .modal-content input {
        width: 95%;
        padding: 10px;
        margin-bottom: 10px;
        border: 1px solid #ccc;
        border-radius: 4px;
    }

.modal-largo {
    width: 85% !important;
    max-width: 950px;
}

.tabla-contenedor {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #2a5298;
    color: white;
}

tr:hover {
    background-color: #f1f1f1;
}

.btn-cerrar {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 10px;
}

/* CONTROL DE HOJA DE IMPRESIÓN */
@media print {
    body * {
        display: none;
    }

    #seccion-impresion, #seccion-impresion * {
        display: block;
    }

    #seccion-impresion {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

.solo-imprimir {
    display: none;
    padding: 30px;
    border: 2px dashed #000;
}
