@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap');

/* Estilos Generales */

body 
{
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 20px;
    background-image: url('../img/fondo1.jpg'); /* Asegúrate de que la ruta sea correcta */
    background-repeat: no-repeat; /* ¡No repetir! */
    background-position: center center; /* Centrar la imagen */
    background-size: cover; /* Escalar la imagen para que cubra todo el fondo */
    background-attachment: fixed; /* La imagen se queda fija al hacer scroll */
    background-color: #fce4ec; /* Color de respaldo si la imagen no carga */
}
    /* ------------------------------------------- */
}

.container {
    width: 794px;
    max-width: 100%;
    margin: 0 auto;
    padding: 40px; 
    background-color: transparent; /* Mantenemos el contenedor principal transparente */
    box-shadow: none; 
}

/* Encabezado y Logo */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0f7f5;
}

.header h1 {
    font-family: 'Dancing Script', cursive;
    font-size: 75px;
    color: #DD7BDF;
    margin: 0;
    padding-top: 5px;
}

.logo {
    border: none;
    width: 110px;
    height: 110px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;
    cursor: pointer; /* 👈 Para que se vea clickeable */
}

.logo img {
    width: 120%;
    height: 120%;
    object-fit: cover;
    object-position: center;
}



/* Disposición de Secciones */
.flex-group {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.info-col-50 {
    width: 50%;
}

.info-col-33 {
    width: 33.33%;
}

/* Campos de Formulario y Secciones */
.form-section {
    margin-bottom: 20px;
}

h2 
{
    font-size: 16px;
    font-weight: 700;
    color: #DD7BDF;
    padding-bottom: 5px;
    border-bottom: 2px solid #e0f7f5;
    margin-top: 0;
}

.form-group {
    display: flex;
    align-items: flex-end;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px dashed #cccccc;
}

.form-group label {
    display: inline-block;
    width: 120px;
    margin-bottom: 0;
    font-weight: 600;
    font-size: 13px;
    color: #555;
}

/* ESTILO AÑADIDO/MODIFICADO PARA LOS INPUTS ESTÁNDAR */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"] {
    flex-grow: 1;
    padding: 2px 5px;
    border: none;
    border-radius: 3px; 
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.5;
    background-color: #fff8f8; 
    border: 1px solid #f0e0e0; 
}

/* Estilo para los inputs de Fecha y N° de Pedido, que no tienen la línea de abajo */
.flex-group .form-group input[type="text"] {
    border-bottom: 1px solid #f0e0e0;
}


/* Checkboxes y Secciones con Borde */
.border-section {
    border: 2px solid #d4ebf9;
    background-color: #f7faff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.border-section h3 {
    text-align: center;
    margin: -25px auto 10px;
    width: fit-content;
    padding: 2px 12px;
    background-color: #ffffff;
    border: 1px solid #d4ebf9;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 700;
    color: #4a6fa5;
    text-transform: uppercase;
}

.checkbox-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 400;
    color: #333;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 5px;
    accent-color: #4a6fa5;
}

/* Input de "OTROS" dentro de checkboxes */
.checkbox-group input[type="text"] {
    border: none;
    border-bottom: 1px solid #999;
    width: 120px;
    margin-left: 10px;
    padding: 2px;
    background-color: #ffffff; 
}

/* Tabla de Detalles del Pedido */
.table-container {
    overflow-x: auto; 
    margin-top: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #ffffff;
}

table {
    min-width: 600px;
    width: 100%;
    border-collapse: collapse;
}

thead tr {
    background: linear-gradient(to right, #f8d7da 0%, #f1e4e4 25%, #e0f7f5 50%, #d4ebf9 75%, #a5d8f3 100%);
    color: #333;
    font-weight: 800;
}

th, td {
    border: 1px solid #ccc;
    padding: 6px;
    text-align: center;
    font-size: 13px;
}

/* ESTILO AÑADIDO PARA INPUTS DENTRO DE LA TABLA */
table input[type="number"],
table input[type="text"] {
    width: 90%;
    border: 1px solid #e0e0e0;
    padding: 3px;
    background-color: #fcfcfc; 
    border-radius: 3px;
    box-sizing: border-box;
}

/* Sección de Totales */
.totals-section {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.totals {
    width: 250px;
}

.totals-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.totals-item label {
    display: block;
    width: 100px;
    text-align: right;
    font-weight: 700;
    color: #fff;
    padding-right: 10px;
    box-sizing: border-box;
    padding: 7px 10px;
    margin-right: -1px;
    border: 1px solid transparent;
    border-radius: 5px 0 0 5px;
}

.totals-item.valor_total label {
    background-color: #f7a9b3;
    border-color: #f7a9b3;
}

.totals-item.impuestos label {
    background-color: #92bce9;
    border-color: #92bce9;
}

.totals-item.total label {
    background-color: #79d08e;
    border-color: #79d08e;
}

/* ESTILO AÑADIDO/MODIFICADO PARA INPUTS DE TOTALES */
.totals-item input {
    flex-grow: 1;
    padding: 7px;
    border: 2px solid #ccc;
    box-sizing: border-box;
    text-align: right;
    border-radius: 0 5px 5px 0;
    background-color: #fffff0; 
}

.totals-item.total input {
    border-color: #79d08e; 
}

/* Estilos de Líneas Largas (Notas) */
.large-line-section {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 5px;
    background-color: #fdfdfd;
}

/* ESTILO AÑADIDO PARA INPUTS DE NOTAS/OBSERVACIONES */
.large-line-section input {
    width: 100%;
    padding: 2px 0;
    border: none;
    border-bottom: 1px dashed #4a6fa5;
    margin-bottom: 10px;
    background-color: #f7faff; 
}

/* ======================================= */
/* 🦶 ESTILOS DEL PIE DE PÁGINA */
/* ======================================= */
.footer {
    margin-top: 50px;
    padding: 15px 20px;
    border-top: 2px solid #a5d8f3; 
    text-align: center; 
    font-size: 12px;
    color: #4a6fa5; 
    background-color: #f7faff; 
    border-radius: 5px;
    width: 100%; 
    box-sizing: border-box;
}

.footer-info {
    width: 100%;
    max-width: 700px; 
    margin: 0 auto;
}

.footer p {
    margin: 3px 0;
    font-weight: 600;
}

.footer .copyright {
    margin-top: 10px;
    font-size: 11px;
    font-weight: 400;
    color: #777;
}

.footer-link {
    color: #4a6fa5; 
    text-decoration: none; 
    border-bottom: 1px dashed #4a6fa5; 
    padding-bottom: 1px;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #f7a9b3; 
    border-bottom-color: #f7a9b3;
}

/* ======================================= */
/* 📱 MEDIA QUERIES (PARA CELULARES) */
/* ======================================= */
@media (max-width: 768px) {
    
    .container {
        padding: 20px 15px; 
    }

    .header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 25px;
    }

    .header h1 {
        font-size: 55px;
        margin-bottom: 15px;
    }
    
    .flex-group {
        flex-direction: column; 
        gap: 0;
        margin-bottom: 10px; 
    }
    
    .info-col-50, 
    .info-col-33 {
        width: 100%;
        margin-bottom: 5px; 
    }

    h2 {
        margin-bottom: 15px;
    }
    
    .form-group label {
        width: 100px;
        font-size: 14px;
    }
    
    .border-section {
        margin-bottom: 15px; 
        padding: 10px;
    }

    .flex-group:nth-child(2) > .info-col-50:last-child > .border-section {
        margin-top: 0; 
        margin-bottom: 20px;
    }

    .flex-group:nth-child(4) {
        flex-direction: column;
        gap: 15px; 
    }

    .large-line-section {
        margin-bottom: 25px;
    }

    .totals-section {
        justify-content: center;
        margin-top: 10px;
        margin-bottom: 20px;
    }
    
    .totals {
        width: 100%;
        max-width: 350px;
    }

    table {
        min-width: 500px;
    }

    .footer {
        margin-top: 30px;
        padding: 15px 10px;
        font-size: 11px;
    }
    
    .footer p {
        margin: 5px 0;
    }
    
    .footer .copyright {
        font-size: 10px;
    }
}