.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
}

.explanation {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    text-align: center;
}

.explanation h1 {
    margin-top: 0;
    font-size: 28px;
    color: #333;
}

.explanation p {
    margin: 10px 0 0;
    color: #666;
}

.summary-products {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex: 1;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.summary {
    flex: 1;
    padding-right: 20px;
    border-right: 1px solid #e0e0e0;
}

.summary h2 {
    margin-top: 0;
    font-size: 24px;
    color: #333;
}

.summary ul {
    list-style: none;
    padding: 0;
}

.summary li {
    margin-bottom: 10px;
}

.summary a {
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
}

.summary a:hover {
    text-decoration: underline;
}

.products {
    flex: 2;
    padding-left: 20px;
}

.products h2 {
    margin-top: 0;
    font-size: 24px;
    color: #333;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-height: 450px;
    overflow-y: auto;
}

.product-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 349px !important;
}

.product-item img {
    max-width: 70px;
    border-radius: 8px;
}

.product-info {
    flex: 1;
    margin-left: 20px;
}

.price {
    color: #ff0000;
    font-weight: bold;
}

.actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: white;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    width: 100%;
    border-radius: 8px;
    flex-wrap: wrap;
}

.button {
    padding: 10px 20px;
    background-color: #ff0000;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.button.disabled {
    background-color: grey;
}

.button:hover {
    background-color: #cc0000;
}

.checkbox {
    margin-right: 10px;
}

.category-link {
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
    display: block;
    padding: 10px;
    border-radius: 4px;
    text-decoration: none;
    color: black;
}

.category-link:hover {
    background-color: #e0e0e0;
}

.category-link.selected {
    background-color: rgb(10, 165, 10);
    color: white;
}

.categories-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.categories-header h2 {
    margin-top: 0;
    font-size: 24px;
    color: #333;
}

.action-button {
    display: flex;
    justify-content: space-between;
}

.selected-product {
    display: none;
    align-items: center;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    /* Esto hace que el contenedor parezca clickeable */
    position: relative;
    /* Permite el posicionamiento absoluto del título */
}

.selected-product-title {
    position: absolute;
    top: -20px;
    /* Ajusta la posición del título para que quede pegado al contenedor */
    left: 10px;
    /* Ajusta el margen izquierdo si es necesario */
    background: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    color: #333;
    border: 1px solid #ccc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.selected-product img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.selected-product .product-info {
    display: flex;
    flex-direction: column;
}


/* Media Queries */

@media (max-width: 768px) {
    .summary-products {
        flex-direction: column;
    }

    .summary {
        border-right: none;
        padding-right: 0;
    }

    .products {
        padding-left: 0;
    }

    .product-list {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .action-button a {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .explanation h1 {
        font-size: 24px;
    }

    .product-item img {
        max-width: 50px;
    }

    .product-info {
        margin-left: 10px;
    }
}