/* Layout "lista" das categorias na loja (ex.: marmitas) — escolhido em admin/categorias.php.
 * Cada item é uma linha: nome, descrição e preço à esquerda; foto arredondada à direita com botão "+".
 * Usa as variáveis de cor da loja (--text-primary, --border-color, --primary...), então segue o tema do admin. */

/* Container: coluna única, itens separados por uma linha fina (usado na home e em categoria.php) */
.lista-itens { display: flex; flex-direction: column; }
.lista-itens .prod-wrap,
.lista-itens .prod-wrap:hover {
    flex: none;
    width: 100%;
    display: block;
    border-bottom: 1px solid var(--border-color, #eee);
}
.lista-itens .prod-wrap:last-child { border-bottom: 0; }

/* Na home a seção em lista não rola para o lado: sem setas, sem faixa horizontal */
.category-section.is-lista .scroll-arrow { display: none !important; }
.category-section.is-lista .lista-itens { overflow: visible; padding: 0; }
@media (min-width: 992px) {
    /* telas largas: duas colunas, para a lista não ficar um "corredor" de 1100px */
    .lista-itens.cols { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2rem; }
    .lista-itens.cols .prod-wrap:nth-last-child(-n+2):nth-child(odd),
    .lista-itens.cols .prod-wrap:last-child { border-bottom: 0; }
}

/* ── Linha do item ── */
.product-card.pc-lista,
.product-card.pc-lista:hover {
    display: flex;
    flex-direction: row;      /* style.css põe .product-card em coluna */
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0;
    transform: none;
    height: auto;
    overflow: visible;
    -webkit-tap-highlight-color: transparent;
}
.pc-lista .pcl-info { flex: 1; min-width: 0; font-family: var(--font-primary); }
.pc-lista .pcl-nome {
    margin: 0;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: 0;
}
.pc-lista .pcl-desc {
    margin: 4px 0 0;
    font-size: .8rem;
    line-height: 1.35;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pc-lista .pcl-preco {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 8px;
    margin-top: 10px;
}
.pc-lista .pcl-atual { font-size: .92rem; font-weight: 600; color: var(--text-primary); }
.pc-lista .pcl-atual.is-promo { color: #2e9e63; }
.pc-lista .pcl-orig { font-size: .76rem; color: var(--text-light, #999); text-decoration: line-through; }
.pc-lista .pcl-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.pc-lista .pcl-tag {
    font-size: .68rem;
    font-weight: 700;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 99px;
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text-secondary);
}
.pc-lista .pcl-tag-promo { background: rgba(46,158,99,.12); color: #2e9e63; }

/* ── Foto à direita ── */
.pc-lista .pcl-foto {
    position: relative;
    flex: 0 0 auto;
    width: 94px;
    height: 94px;
    border-radius: 16px;
    background: var(--bg-secondary, #f5f5f5);
}
.pc-lista .pcl-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 16px;
}
.pc-lista .pcl-foto-vazia {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-light, #bbb);
    font-size: 1.6rem;
}
@media (min-width: 768px) {
    .pc-lista .pcl-foto { width: 120px; height: 120px; }
    .pc-lista .pcl-nome { font-size: 1rem; }
    .pc-lista .pcl-desc { font-size: .84rem; }
}

/* Botão "+" no canto da foto (mesmo comportamento do layout de quadradinhos) */
.pc-lista .btn-add-cart {
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 3;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    background: #fff !important;
    color: var(--btn-add-cor1, var(--primary));
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
    font-size: 1.1rem;
    line-height: 1;
    -webkit-text-stroke: .6px currentColor;
    display: flex; align-items: center; justify-content: center;
    touch-action: manipulation;
}
.pc-lista .btn-add-cart:active { transform: scale(.9); }
.pc-lista .btn-add-cart.is-added {
    background: #2e9e63 !important;
    border-color: #2e9e63;
    color: #fff;
    animation: pcPop .35s ease;
}

/* ═════════ Lista compacta (sem foto) ═════════ */
.pcl-compacta.product-card.pc-lista,
.pcl-compacta.product-card.pc-lista:hover { align-items: center; padding: 12px 0; }
.pcl-compacta .pcl-nome { font-size: .92rem; }
.pcl-compacta .pcl-preco { margin-top: 6px; }
.pc-lista .pcl-add-solo {
    position: static;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--btn-add-cor1, var(--primary));
    box-shadow: none;
}

/* ═════════ Destaque grande (cartão largo) ═════════ */
.lista-itens.destaque { display: grid; grid-template-columns: 1fr; gap: 18px; }
.lista-itens.destaque .prod-wrap,
.lista-itens.destaque .prod-wrap:last-child { border-bottom: 0; }
@media (min-width: 768px) { .lista-itens.destaque { grid-template-columns: 1fr 1fr; gap: 24px; } }
@media (min-width: 1024px) { .lista-itens.destaque { grid-template-columns: repeat(3, 1fr); } }

.pcl-destaque.product-card.pc-lista,
.pcl-destaque.product-card.pc-lista:hover {
    flex-direction: column-reverse;     /* foto em cima, texto embaixo (o HTML tem o texto primeiro) */
    align-items: stretch;
    gap: 10px;
    padding: 0;
}
.pcl-destaque .pcl-foto { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 18px; }
.pcl-destaque .pcl-foto img { position: absolute; inset: 0; border-radius: 18px; }   /* senão a foto "estica" o cartão */
.pcl-destaque .pcl-foto-vazia { position: absolute; inset: 0; }
.pcl-destaque .btn-add-cart { right: 10px; bottom: 10px; width: 40px; height: 40px; font-size: 1.25rem; }
.pcl-destaque .pcl-nome { font-size: 1.02rem; }
.pcl-destaque .pcl-desc { -webkit-line-clamp: 2; }
.pcl-destaque .pcl-preco { margin-top: 8px; }
.pcl-destaque .pcl-atual { font-size: 1rem; font-weight: 700; }

/* ═════════ Lista: foto à ESQUERDA, texto à direita ═════════ */
.pcl-lista.product-card.pc-lista,
.pcl-lista.product-card.pc-lista:hover { flex-direction: row-reverse; justify-content: flex-end; }
