/* Product list container */
#productList {
    max-height: 600px;
    overflow-y: auto;
    padding: 10px;
}

/* List item styles */
.list-item {
    border: 1px solid #ddd;
    margin: 16px 0;
    padding: 10px;
    min-height: 60px;
    border-radius: 4px;
    background: white;
    transition: box-shadow 0.3s ease;
    cursor: pointer;
}

.list-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.list-item-title {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    background: #f8f8f8;
}

.product-name {
    flex: 1;
}

.potential-savings {
    color: #28a745;
    font-size: 0.9em;
    font-weight: bold;
    white-space: nowrap;
}

.savings-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    font-size: 0.9em;
    white-space: nowrap;
}


.list-item-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 15px;
    border-top: none;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.list-item.expanded .list-item-details {
    max-height: 500px;
    opacity: 1;
    padding: 15px;
    border-top: 1px solid #eee;
}

/* Table styles */
.list-item-details table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
}

.list-item-details th,
.list-item-details td {
    padding: 8px;
    text-align: left !important;
    border-bottom: 1px solid #eee;
}

.list-item-details th {
    font-weight: bold;
    color: #666;
    background: #f9f9f9;
}

.list-item-details tr:last-child td {
    border-bottom: none;
}

/* Savings Summary styles */
.savings-summary {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    justify-content: space-around;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.summary-item {
    text-align: center;
    padding: 0 20px;
}

.summary-label {
    display: block;
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.summary-value {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #28a745;
}