/**
 * ╔══════════════════════════════════════════════════╗
 * ║  EASoares Sites — Elementor: Widget Listing CSS ║
 * ║  Arquivo: elementor/css/eas-widget-listing.css   ║
 * ║  Versão: 1.0.0                                   ║
 * ║  Prefixo: eas-wl-                                ║
 * ╚══════════════════════════════════════════════════╝
 */

/* ── Grid Layout ── */
.eas-wl-listing {
    width: 100%;
}

.eas-wl-grid {
    display: grid;
    grid-template-columns: repeat(var(--eas-wl-cols, 3), 1fr);
    gap: 20px;
}

/* ── List Layout ── */
.eas-wl-layout-list .eas-wl-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.eas-wl-layout-list .eas-wl-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.eas-wl-layout-list .eas-wl-content {
    flex: 1;
    min-width: 0;
}

.eas-wl-layout-list .eas-wl-thumb {
    flex: 0 0 200px;
    max-width: 200px;
}

/* ── Card (Item) ── */
.eas-wl-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    transition: transform .2s ease, box-shadow .2s ease;
}

.eas-wl-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,.1);
}

/* ── Thumbnail ── */
.eas-wl-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.eas-wl-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.eas-wl-item:hover .eas-wl-thumb img {
    transform: scale(1.05);
}

/* ── Conteúdo ── */
.eas-wl-content {
    padding: 16px;
}

.eas-wl-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.eas-wl-title a {
    text-decoration: none;
    color: #1f2937;
    transition: color .2s;
    display: block; /* garante que text-align do pai funcione */
}

.eas-wl-title a:hover {
    color: #2563eb;
}

/* ── Resumo ── */
.eas-wl-excerpt {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 10px;
    line-height: 1.5;
}

.eas-wl-excerpt p {
    margin: 0;
}

/* ── Preço ── */
.eas-wl-price {
    font-size: 18px;
    font-weight: 700;
    color: #16a34a;
    margin-bottom: 10px;
}

.eas-wl-price del {
    font-size: 14px;
    color: #9ca3af;
    font-weight: 400;
}

.eas-wl-price ins {
    text-decoration: none;
}

/* ── Meta Fields ── */
.eas-wl-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
}

.eas-wl-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.eas-wl-meta-label {
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
}

.eas-wl-meta-value {
    color: #374151;
}

.eas-wl-meta-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.eas-wl-meta-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,.1);
}

/* ── Filtros ── */
.eas-wl-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.eas-wl-filter-btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    transition: all .2s;
}

.eas-wl-filter-btn:hover,
.eas-wl-filter-btn.is-active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* ── Paginação ── */
.eas-wl-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
}

.eas-wl-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #6b7280;
    background: #f3f4f6;
    transition: all .2s;
}

.eas-wl-page-btn:hover,
.eas-wl-page-btn.is-active {
    background: #2563eb;
    color: #fff;
}

/* ── Estado Vazio ── */
.eas-wl-empty {
    text-align: center;
    padding: 48px 20px;
    color: #9ca3af;
}

.eas-wl-empty p {
    margin: 0;
    font-size: 15px;
}

/* ── Responsivo ── */
@media (max-width: 1024px) {
    .eas-wl-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .eas-wl-grid {
        grid-template-columns: 1fr;
    }

    /* ── Filtros: largura total no mobile ── */
    .eas-wl-filters {
        flex-direction: column;
    }

    .eas-wl-filter-btn {
        width: 100%;
        text-align: center;
    }

    .eas-wl-layout-list .eas-wl-item {
        flex-direction: column;
    }

    .eas-wl-layout-list .eas-wl-thumb {
        flex: none;
        max-width: 100%;
    }

    .eas-wl-layout-list .eas-wl-content {
        width: 100%;
    }
}

/* ── Botão Adicionar ao Carrinho ── */
.eas-wl-add-to-cart {
    display: inline-block;
    padding: 10px 20px;
    margin-top: 10px;
    background: #16a34a;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: background .2s, transform .2s;
    cursor: pointer;
    border: none;
}

.eas-wl-add-to-cart:hover {
    background: #15803d;
    color: #fff;
}

.eas-wl-add-to-cart.loading {
    opacity: .6;
    pointer-events: none;
}

.eas-wl-add-to-cart.added::after {
    content: " ✓";
}

.eas-wl-out-of-stock {
    display: inline-block;
    padding: 8px 16px;
    margin-top: 10px;
    background: #f3f4f6;
    color: #9ca3af;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}