body {
    font-family: "Inter", sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    box-sizing: border-box;
    color: #333;
}

main {
    display: flex;
    justify-content: center;
    padding: 60px;
}

.formulario {
    display: flex;
    flex-direction: column;    
    align-items: center;        
    width: 100%;
    max-width: 1250px;    
    padding: 0;
    box-sizing: border-box;
}

.formulario h1 {
    font-size: 5em;    
    color: #195043;
    text-align: center;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 30px;    
    width: 100%;
}

.main-content-wrapper-for-vertical-stack {    
    display: flex;
    flex-direction: column; 
    align-items: center; 
    gap: 30px; 
    width: 100%;
    /* Define el ancho máximo del contenedor principal al ancho de la Tabla 1 */
    max-width: 879px; 
    box-sizing: border-box;
}

.form-container {
    background-color: #e0eae8;
    padding: 25px;
    border-radius: 8px;
    box-sizing: border-box;
    width: max-content; 
    max-width: 1060px; 
    margin: 0; 
}

.form-container table {
    width: 100%;
    border-collapse: collapse;    
}

.form-container thead th {
    text-align: center; 
    padding: 30px 5px;
    color: #000000;
    font-weight: 600;
    font-size: 1em;
}

.form-container tbody td {
    padding: 10px 5px;
    vertical-align: middle;
    border-bottom: 1px solid #eee;    
    text-align: center; 
}

.form-container tbody tr:last-child td {
    border-bottom: none;    
}

/* Ajuste de anchos para las columnas */
.form-container thead th:nth-child(1), /* Columna del ícono de borrar */
.form-container tbody td:nth-child(1) {
    width: 100px; 
}

.form-container thead th:nth-child(2), /* Columna de Cantidad */
.form-container tbody td:nth-child(2) {
    width: 140px; 
}

.form-container thead th:nth-child(3) { /* Columna de Equipo */
    width: 250px; 
}
.form-container tbody td:nth-child(3) {
    width: 250px; 
}

.form-container thead th:nth-child(4) { /* Columna de Precio unitario */
    width: 180px; 
}
.form-container tbody td:nth-child(4) {
    width: 180px; 
}

.form-container thead th:nth-child(5) { /* Columna de Precio sub total */
    width: 180px; 
}
.form-container tbody td:nth-child(5) {
    width: 180px; 
}

.quantity-input {
    width: 122.07px; 
    height: 42px;
    padding: 8px; 
    border: none; 
    border-radius: 10px;
    box-sizing: border-box; 
    color: #555;
    text-align: center; 
    display: inline-block; 
    margin: 0 auto; 
    background-color: white; 
}

.days-input{
    width: 122.07px; 
    height: 42px;
    padding: 8px; 
    border: none; 
    border-radius: 10px;
    box-sizing: border-box; 
    color: #555;
    text-align: center; 
    display: inline-block; 
    margin: 0 auto; 
    background-color: white; 

}

.delete-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease-in-out;
}
.delete-icon {
    color: #195043;
    font-size: 1.5em; 
}

.delete-button:hover .delete-icon { 
    transform: scale(1.1);
    color: #3E9984; 
}

.product-image-placeholder {
    width: 60px;    
    height: 60px;
    background-color: #195043; 
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin: 0 auto;    
}
.product-image-placeholder img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;    
}

.total-row td {
    padding-top: 15px;
    font-weight: 700;
}
.total-label {
    font-size: 1.1em;
    color: #195043;
}
.total-input {
    /* Medidas exactas para el input de total */
    width: 122.07px; 
    height: 42px;    
    padding: 8px;    
    border: none;    
    border-radius: 20px;
    box-sizing: border-box; 
    font-size: 1em;
    font-weight: 700;
    color: #195043;
    text-align: right; 
    display: inline-block;
    margin-left: auto; 
}
.order-summary-container {
    background-color: #e0eae8;
    padding: 25px;    
    border-radius: 8px;
    box-sizing: border-box;
    width: 100%; 
    max-width: 341px; 
    margin-top: 0;    
    position: relative;    
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    
    /* ALINEAR TABLAS */
    align-self: flex-end; 
    margin-right: 0; 
    margin-left: auto; 
}

.order-summary-container table {
    width: 100%;
    border-collapse: collapse;
}

.order-summary-container tbody tr:last-child {
    border-bottom: none;    
}

.order-summary-container .summary-item td {
    padding: 10px 0;
    color: #4a4a4a;
    font-size: 0.95em;
}

.order-summary-container .summary-value {
    text-align: right;
    font-weight: 500;
}

.order-summary-container .total-summary td {
    font-weight: 700;
    font-size: 1.1em;
    padding-top: 15px;
    border-top: 2px solid #ccc;    
    margin-top: 10px;
    color: #195043;
}

.order-summary-title {
    font-size: 1.5em;
    color: #3E9984;
    text-align: center;
    margin-bottom: 20px;    
    padding: 0;
}

.continue-button-cell {
    padding-top: 20px;    
    text-align: center;    
}

.continue-button {
    background-color: #1e5a4f;
    color: white;
    padding: 12px 40px;    
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
    max-width: 250px;    
    box-sizing: border-box;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.continue-button:hover {
    background-color: #1a4a41;
}

.form-container table,
.order-summary-container table{
    table-layout: fixed;
    width: 100%;
}

.form-container td,
.form-container th,
.order-summary-container td,
.order-summary-container th{
    width: 150px;
    max-width: 150px;
}

.estilo-contenedor{
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    width: 1000px;
}


@media (max-width: 1024px) {    
    .main-content-wrapper-for-vertical-stack {
        max-width: 90%; 
        align-items: center; 
    }
    .form-container {
        width: 100%; 
        max-width: 879px; 
        margin: 0 auto; 
    }
    /* Centra el resumen en pantallas pequeñas */
    .order-summary-container {
        width: 100%;
        max-width: 400px; 
        align-self: center; 
        margin: 0 auto; 
    }
}

@media (max-width: 768px) {
    main {
        padding: 20px;
    }
    .formulario h1 {
        font-size: 2.5em;
        margin-bottom: 25px;
    }
    .main-content-wrapper-for-vertical-stack {
        max-width: 95%; 
    }
    .form-container {
        padding: 15px;
    }
    .form-container thead th,
    .form-container tbody td {
        padding: 8px 3px;    
        font-size: 0.85em;
    }
    .quantity-input { 
        padding: 6px; 
        font-size: 0.8em;
    }
    .total-input { 
        width: 120px; /* Se ajusta el ancho para móvil */
        font-size: 0.9em;
        height: auto; /* Se deja que la altura se adapte o se define una nueva */
    }
    .delete-button {
        font-size: 1em;
    }
    .product-image-placeholder {
        width: 50px;
        height: 50px;
    }
    .order-summary-container {
        padding: 20px;
    }
    .order-summary-title {
        font-size: 1.3em;
        margin-bottom: 15px;
    }
    .continue-button {
        padding: 10px 30px;
        font-size: 0.9em;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    main {
        padding: 10px;
    }
    .formulario h1 {
        font-size: 2em;
        margin-bottom: 20px;
    }
    .main-content-wrapper-for-vertical-stack {
        max-width: 98%; 
    }
    .form-container {
        padding: 10px;
    }
    .form-container thead th,
    .form-container tbody td {
        padding: 5px 2px;
        font-size: 0.75em;    
    }
    .form-container thead th:nth-child(2), /* Columna de Cantidad */
    .form-container tbody td:nth-child(2) {
        display: none; /* Oculta la columna de Cantidad en móvil */
    }
    .form-container thead th:nth-child(5), /* Columna de Precio sub total */
    .form-container tbody td:nth-child(5) {
        display: none; /* Oculta la columna de Precio sub total en móvil */
    }
    .quantity-input { 
        padding: 4px; 
        font-size: 0.7em;
    }
    .total-input {
        width: 80px; 
        height: auto; 
    }

    .order-summary-container {
        padding: 15px;
    }
    .order-summary-title {
        font-size: 1.2em;
        margin-bottom: 10px;
    }
    .continue-button {
        padding: 8px 20px;
        font-size: 0.8em;
        max-width: 180px;
    }
}