/* ==========================================================================
   PÁGINA: HISTORIAL DE COTIZACIONES (Estilos Base y Banner)
   ========================================================================== */

/* Contenedor principal de la página (fuera del banner) */
.historial-page-wrapper {
    padding: 60px 0;
    background-color: #f8f9fa; /* Un fondo gris muy claro para resaltar las futuras tarjetas */
    min-height: 400px; /* Asegura que el footer no se pegue arriba si no hay contenido */
}

/* Contenedor estándar para el contenido (alineado a 1440px como el resto de la web) */
.container-historial {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

/* ==========================================================================
   BANER DE CABECERA (Figma Specs)
   ========================================================================== */
.banner-historial {
    width: 100%;
    height: 256px; /* Alto fijo exacto para Desktop y Móvil */
    background-color: #DEF1DE; /* Color de fondo exacto */
    display: flex;
    align-items: center; /* Centrado vertical */
    justify-content: center; /* Centrado horizontal */
    padding: 0 20px; /* Padding de seguridad lateral */
    box-sizing: border-box;
}

.banner-historial-title {
    font-family: inherit; /* Hereda la fuente principal de la web */
    font-size: 72px; /* Tamaño Desktop */
    font-weight: 600; /* Semibold */
    color: #004E01; /* Color de texto exacto */
    margin: 0;
    text-align: center;
    line-height: 1.1;
    letter-spacing: -2px; /* Ajuste típico de Figma para títulos grandes */
}

/* ==========================================================================
   RESPONSIVE (Móvil)
   ========================================================================== */
@media screen and (max-width: 991px) {
    .container-historial {
        padding: 0 20px; /* Reducimos padding en móvil */
    }

    .banner-historial-title {
        font-size: 56px; /* Tamaño Móvil exacto */
        letter-spacing: -1px;
    }
}

/* ==========================================================================
   LISTADO Y TARJETAS DE COTIZACIÓN (Figma Specs)
   ========================================================================== */

/* Contenedor principal de la lista (fuera del banner) */
.historial-list-section {
    padding: 60px 0;
    background-color: #f8f9fa; /* Fondo gris muy claro para resaltar las tarjetas */
}

/* Cabecera de la lista */
.historial-list-header {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 40px;
    max-width: 713px; /* Alineamos la cabecera al ancho de las tarjetas */
    margin-left: auto;
    margin-right: auto;
}

.historial-list-title {
    font-size: 32px; /* Figma: 32px */
    font-weight: 600; /* Figma: Semibold */
    color: #111;
    margin: 0;
    letter-spacing: -1px;
}

.historial-list-count {
    font-size: 14px; /* Figma: 14px */
    font-weight: 400; /* Figma: Regular */
    color: #707070; /* Figma: #707070 */
}

/* Contenedor que centra y apila las tarjetas */
.historial-cards-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra las tarjetas horizontalmente */
    gap: 20px; /* Espacio entre tarjetas */
}

/* ==========================================================================
   LA TARJETA INDIVIDUAL (Figma Exacto)
   ========================================================================== */
.quotation-card {
    background-color: #ffffff;
    width: 713px; /* Ancho Desktop */
    min-height: 135px; /* Alto Desktop */
    border-radius: 16px; 
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02); /* Sombra súper sutil */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quotation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

/* Lado izquierdo (ID + Detalles) */
.q-card-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.q-card-id {
    font-size: 16px;
    font-weight: 600; /* Semibold */
    color: #111;
}

.q-card-details {
    display: flex;
    gap: 40px; /* Separación entre Fecha y Productos */
}

.q-detail-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.q-label {
    font-size: 13px;
    color: #a3a3a3; /* Gris claro Figma */
}

.q-value {
    font-size: 15px;
    font-weight: 600;
    color: #111;
}

/* El Botón (Diseño Delineado Figma) */
.btn-descargar-pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: transparent;
    color: #555;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #e0e0e0; /* Borde gris sutil */
    cursor: pointer;
    transition: all 0.3s;
}

.btn-descargar-pdf:hover {
    border-color: #111;
    color: #111;
}

/* ==========================================================================
   RESPONSIVE (Móvil)
   ========================================================================== */
@media screen and (max-width: 991px) {
    
    .historial-list-header {
        max-width: 353px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 0 20px;
    }

    .historial-list-title {
        font-size: 24px;
    }

    /* La Tarjeta Móvil (353x160) */
    .quotation-card {
        width: 353px;
        min-height: 160px;
        padding: 24px;
        flex-direction: column; /* Apilamos contenido y botón */
        align-items: flex-start;
        gap: 20px;
    }

    .q-card-content {
        width: 100%;
        gap: 15px;
    }

    /* En móvil, Fecha y Productos ocupan el 50% cada uno para alinearse bonito */
    .q-card-details {
        width: 100%;
        justify-content: flex-start;
        gap: 50px;
    }

    .q-card-action {
        width: 100%;
    }

    .btn-descargar-pdf {
        width: 100%; /* Botón ocupa el 100% en móvil */
        padding: 14px;
    }
}