/* Comparador Layout CSS */

.cptje-comparator {
    font-family: inherit;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
}

.cptje-comparator__header {
    display: grid;
    grid-template-columns: 200px 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: end;
}

.cptje-comparator__header-label {
    font-size: 24px;
    font-weight: bold;
    color: #111;
}

.cptje-comparator__slot {
    position: relative;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid #eee;
}

.cptje-comparator__search-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.cptje-comparator__dropdown {
    display: none;
    position: absolute;
    top: calc(100% - 10px);
    left: 20px;
    right: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.cptje-comparator__dropdown.is-open {
    display: block;
}

.cptje-comparator__dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.cptje-comparator__dropdown-item:last-child {
    border-bottom: none;
}

.cptje-comparator__dropdown-item:hover,
.cptje-comparator__dropdown-item.is-active {
    background-color: #f5f5f5;
}

.cptje-comparator__dropdown-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
}

.cptje-comparator__dropdown-item-nothumb {
    width: 40px;
    height: 40px;
    background: #eee;
    border-radius: 4px;
    margin-right: 10px;
    display: inline-block;
}

.cptje-comparator__dropdown-item-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
}

.cptje-comparator__dropdown-item-category {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

.cptje-comparator__dropdown-loading,
.cptje-comparator__dropdown-empty {
    padding: 15px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.cptje-comparator__product-info {
    text-align: center;
}

.cptje-comparator__image {
    max-width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
}

.cptje-comparator__title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.cptje-comparator__change-btn {
    background: transparent;
    border: 1px solid #ccc;
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    color: #555;
    transition: all 0.2s;
}

.cptje-comparator__change-btn:hover {
    background: #eee;
    color: #111;
}

/* Tabela */
.cptje-table {
    width: 100%;
    border-collapse: collapse;
}

.cptje-table__group-header td {
    background: #f1f1f1;
    padding: 15px 20px;
    font-weight: bold;
    font-size: 16px;
    border-top: 2px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.cptje-table__row:nth-child(even) {
    background-color: #fafafa;
}

.cptje-table__cell {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.cptje-table__cell--label {
    width: 200px;
    font-weight: 600;
    color: #555;
}

.cptje-table__cell--p1,
.cptje-table__cell--p2 {
    width: calc(50% - 100px);
}

.cptje-bool--yes { color: green; font-weight: bold; }
.cptje-bool--no { color: red; }
.cptje-val-image { max-width: 100px; height: auto; border-radius: 4px; }
.cptje-table__empty-state td { text-align: center; padding: 40px; color: #777; }

/* Responsivo */
@media (max-width: 768px) {
    .cptje-comparator__header {
        grid-template-columns: 1fr;
    }
    
    .cptje-comparator__header-label {
        display: none;
    }
    
    .cptje-table,
    .cptje-table tbody,
    .cptje-table tr,
    .cptje-table td {
        display: block;
        width: 100%;
    }
    
    .cptje-table__cell--label {
        width: 100%;
        background: #f9f9f9;
        font-size: 12px;
        text-transform: uppercase;
        padding: 10px 20px 5px;
        border-bottom: none;
    }
    
    .cptje-table__cell--p1,
    .cptje-table__cell--p2 {
        width: 100%;
        padding: 5px 20px 10px;
    }
    
    .cptje-table__cell--p1 {
        border-bottom: 1px dashed #eee;
    }
}
