/* =========================================================
   LISTA DE PRODUTOS
   Baseada no EDX DESIGN SYSTEM
========================================================= */

/* =========================================================
   CONTAINER GERAL
========================================================= */

.edx-product-list-directory {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--edx-space-5) var(--edx-space-7);
    box-sizing: border-box;
}

/* =========================================================
   TOOLBAR
========================================================= */

.edx-product-list-toolbar {
    width: 100%;
}

.edx-product-list-toolbar-top {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}

.edx-product-list-toolbar-bottom {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

/* =========================================================
   INPUTS / SELECT
========================================================= */

.edx-product-list-search,
.edx-product-list-select {
    width: 100%;
    height: 46px;
    border: 1px solid #dcdcdc;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 14px;
    font-family: var(--edx-font-family);
    background: #fff;
    color: var(--edx-text-color);
    box-sizing: border-box;
}

.edx-product-list-search:focus,
.edx-product-list-select:focus {
    outline: none;
    border-color: var(--edx-primary-color);
}

/* =========================================================
   ALFABETO
========================================================= */

.edx-product-list-letters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--edx-space-1);
    align-items: center;
    width: 100%;
}

.edx-product-letter-btn {
    height: 38px;
    min-width: max-content;
    padding: 0 12px;
    border: 1px solid #dcdcdc;
    border-radius: 999px;
    background: #fff;
    color: var(--edx-text-color);
    font-size: var(--edx-font-sm);
    font-weight: 600;
    font-family: var(--edx-font-family);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.edx-product-letter-btn:hover,
.edx-product-letter-btn.is-active {
    background: var(--edx-primary-color);
    border-color: var(--edx-primary-color);
    color: #fff;
}

/* =========================================================
   AÇÕES
========================================================= */

.edx-product-list-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.edx-product-list-view-toggle {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--edx-space-1);
}

.edx-product-view-btn,
.edx-product-clear-filters-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 16px;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    background: #fff;
    color: var(--edx-text-color);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--edx-font-family);
    line-height: 1;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-sizing: border-box;
}

.edx-product-view-btn:hover,
.edx-product-view-btn.is-active {
    background: var(--edx-primary-color);
    border-color: var(--edx-primary-color);
    color: #fff;
}

.edx-product-clear-filters-btn:hover {
    background: var(--edx-secondary-color, #666666);
    border-color: var(--edx-secondary-color, #666666);
    color: #fff;
}

/* =========================================================
   CONTADOR
========================================================= */

.edx-product-list-count {
    margin-bottom: var(--edx-space-4);
    font-size: var(--edx-font-sm);
    color: var(--edx-text-light);
}

/* =========================================================
   RESULTADOS
========================================================= */

.edx-product-list-results {
    width: 100%;
}

.edx-product-list-results.is-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--edx-space-5);
}

.edx-product-list-results.is-list {
    display: flex;
    flex-direction: column;
    gap: var(--edx-space-4);
}

/* =========================================================
   CARD BASE
========================================================= */

a.edx-product-list-card {
    display: block;
    background: #fff;
    border: 1px solid var(--edx-border-color);
    border-radius: var(--edx-radius-lg);
    box-sizing: border-box;
    overflow: hidden;
    transition: 0.25s ease;
    cursor: pointer;
    text-decoration: none !important;
    color: inherit;
}

a.edx-product-list-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--edx-shadow-md);
    text-decoration: none !important;
}

a.edx-product-list-card * {
    text-decoration: none;
}

/* =========================================================
   CARD - GRID
========================================================= */

.edx-product-list-card-grid {
    display: flex;
    flex-direction: column;
    padding: var(--edx-space-4);
    min-height: 460px;
    box-sizing: border-box;
}

/* =========================================================
   IMAGEM DO PRODUTO - GRID
========================================================= */

.edx-product-list-thumb {
    width: 100%;
    min-height: 220px;
    max-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--edx-space-3);
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
    padding: 12px;
    background: #fff;
}

.edx-product-list-thumb img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto;
}

.edx-product-list-thumb-fallback {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    background: #f3f3f3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #777;
}

/* =========================================================
   CONTEÚDO DO CARD
========================================================= */

.edx-product-list-body {
    margin-top: auto;
    width: 100%;
    text-align: left;
    display: block;
}

/* TÍTULO DO PRODUTO
   Mantido em maiúsculo para padronização visual
========================================================= */

.edx-product-list-title {
    margin: 0 0 var(--edx-space-2);
    font-size: 20px;
    line-height: 1.3;
    text-align: left;
    color: var(--edx-text-color);
    width: 100%;
    display: block;
    word-break: break-word;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

a.edx-product-list-card:hover .edx-product-list-title {
    text-decoration: underline !important;
}

/* DESCRIÇÃO DO PRODUTO
========================================================= */

.edx-product-list-excerpt {
    font-size: var(--edx-font-sm);
    line-height: 1.6;
    color: #444;
    margin-bottom: var(--edx-space-3);
    width: 100%;
    display: block;
    text-align: left;
    word-break: break-word;
}

/* =========================================================
   BADGES / EMPRESAS VINCULADAS
========================================================= */

.edx-product-list-companies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.edx-product-list-company-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #dcdcdc;
    background: #fafafa;
    font-size: 12px;
    color: var(--edx-text-color);
    font-weight: 600;
    text-transform: uppercase;
}

/* =========================================================
   SEGMENTO / KICKER
========================================================= */

.edx-product-list-segmento {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #dcdcdc;
    background: #fafafa;
    font-size: 12px;
    line-height: 1.2;
    color: #111;
    margin: 0 0 10px;
    width: fit-content;
    text-transform: uppercase;
}

.edx-product-kicker {
    display: inline-block;
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #666;
}

/* =========================================================
   CARD - LISTA
========================================================= */

.edx-product-list-card-list {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: var(--edx-space-4);
    align-items: start;
    padding: var(--edx-space-4);
}

/* IMAGEM DO PRODUTO - LISTA
========================================================= */

.edx-product-list-thumb-list {
    height: 220px;
    min-height: 220px;
    max-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
    padding: 12px;
    background: #fff;
}

.edx-product-list-thumb-list img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto;
}

/* CONTEÚDO PRINCIPAL - LISTA
========================================================= */

.edx-product-list-main {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: var(--edx-space-2);
    width: 100%;
    min-width: 0;
}

.edx-product-list-main .edx-product-list-title {
    margin: 0;
    text-align: left;
    width: 100%;
}

.edx-product-list-main .edx-product-list-excerpt {
    margin-bottom: 0;
    text-align: left;
    width: 100%;
}

.edx-product-list-companies-inline {
    margin-top: 6px;
    justify-content: flex-start;
}

/* =========================================================
   ESTADOS
========================================================= */

.edx-product-list-empty {
    padding: var(--edx-space-5);
    border: 1px solid var(--edx-border-color);
    border-radius: var(--edx-radius-lg);
    background: #fff;
}

.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* =========================================================
   RESPONSIVO - DESKTOP MENOR
========================================================= */

@media (max-width: 1200px) {
    .edx-product-list-results.is-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* =========================================================
   RESPONSIVO - TABLET
========================================================= */

@media (max-width: 1024px) {
    .edx-product-list-results.is-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .edx-product-list-card-list {
        grid-template-columns: 180px minmax(0, 1fr);
    }

    .edx-product-list-thumb-list {
        height: 180px;
        min-height: 180px;
        max-height: 180px;
    }
}

/* =========================================================
   RESPONSIVO - TOOLBAR INTERMEDIÁRIA
========================================================= */

@media (max-width: 900px) {
    .edx-product-list-toolbar-top {
        grid-template-columns: 1fr;
    }

    .edx-product-list-toolbar-bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .edx-product-list-toolbar-actions {
        justify-content: space-between;
    }
}

/* =========================================================
   RESPONSIVO - MOBILE
========================================================= */

@media (max-width: 700px) {
    .edx-product-list-directory {
        padding: 0 var(--edx-space-4) var(--edx-space-6);
    }

    .edx-product-list-toolbar-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .edx-product-list-view-toggle {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--edx-space-1);
        width: 100%;
    }

    .edx-product-clear-filters-btn,
    .edx-product-view-btn {
        width: 100%;
    }

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

    .edx-product-list-card-list {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .edx-product-list-thumb-list {
        height: 220px;
        min-height: 220px;
        max-height: 220px;
    }

    .edx-product-list-main .edx-product-list-title,
    .edx-product-list-main .edx-product-list-excerpt {
        text-align: left;
    }
}