/* Catálogo Óptico Pro — Frontend CSS */

/* ========== Variáveis ========== */
:root {
    --cop-primary: #1a4f8a;
    --cop-primary-light: #2563ab;
    --cop-accent: #25d366;
    --cop-accent-dark: #1da851;
    --cop-text: #1a1a2e;
    --cop-text-muted: #6b7280;
    --cop-border: #e5e7eb;
    --cop-bg: #f9fafb;
    --cop-white: #ffffff;
    --cop-tag-bg: #e0eaf6;
    --cop-tag-color: #1a4f8a;
    --cop-radius: 10px;
    --cop-shadow: 0 2px 10px rgba(0,0,0,0.08);
    --cop-shadow-hover: 0 6px 24px rgba(0,0,0,0.14);
}

/* ========== Wrapper ========== */
.cop-catalogo-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
    color: var(--cop-text);
}

/* ========== Header ========== */
.cop-header {
    margin-bottom: 32px;
}

.cop-titulo {
    font-size: 28px;
    font-weight: 700;
    color: var(--cop-primary);
    margin: 0 0 20px 0;
    line-height: 1.2;
}

/* ========== Filtros ========== */
.cop-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.cop-filtro-btn {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: var(--cop-white);
    color: var(--cop-text-muted);
    border: 1.5px solid var(--cop-border);
    text-decoration: none;
    transition: all 0.2s;
}

.cop-filtro-btn:hover,
.cop-filtro-btn.ativo {
    background: var(--cop-primary);
    color: var(--cop-white);
    border-color: var(--cop-primary);
    text-decoration: none;
}

/* ========== Grid ========== */
.cop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* ========== Card ========== */
.cop-card {
    background: var(--cop-white);
    border-radius: var(--cop-radius);
    border: 1.5px solid var(--cop-border);
    box-shadow: var(--cop-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cop-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--cop-shadow-hover);
}

.cop-card-destaque {
    border-color: var(--cop-primary);
    border-width: 2px;
}

/* ========== Tags do card ========== */
.cop-tag-destaque,
.cop-tag-indisponivel {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
}

.cop-tag-destaque {
    background: var(--cop-primary);
    color: var(--cop-white);
}

.cop-tag-indisponivel {
    background: #fee2e2;
    color: #991b1b;
    left: auto;
    right: 10px;
}

/* ========== Imagem ========== */
.cop-card-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--cop-bg);
}

.cop-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.cop-card:hover .cop-card-img img {
    transform: scale(1.04);
}

.cop-sem-foto {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cop-text-muted);
    font-size: 13px;
    background: var(--cop-bg);
}

/* ========== Body do card ========== */
.cop-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.cop-marca {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--cop-primary);
}

.cop-nome {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.cop-nome a {
    color: var(--cop-text);
    text-decoration: none;
    transition: color 0.15s;
}

.cop-nome a:hover {
    color: var(--cop-primary);
}

.cop-desc {
    font-size: 13px;
    color: var(--cop-text-muted);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== Tags de atributo ========== */
.cop-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 2px;
}

.cop-tag {
    background: var(--cop-tag-bg);
    color: var(--cop-tag-color);
    font-size: 11px;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 10px;
}

/* ========== Preço ========== */
.cop-preco {
    font-size: 22px;
    font-weight: 700;
    color: var(--cop-primary);
    margin-top: 4px;
    line-height: 1;
}

/* ========== Ações ========== */
.cop-acoes {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    flex-wrap: wrap;
}

.cop-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    line-height: 1;
}

.cop-btn-ver {
    background: var(--cop-bg);
    color: var(--cop-primary);
    border: 1.5px solid var(--cop-border);
    flex: 1;
    justify-content: center;
}

.cop-btn-ver:hover {
    background: var(--cop-primary);
    color: var(--cop-white);
    border-color: var(--cop-primary);
    text-decoration: none;
}

.cop-btn-whatsapp {
    background: var(--cop-accent);
    color: var(--cop-white);
    flex: 1;
    justify-content: center;
}

.cop-btn-whatsapp:hover {
    background: var(--cop-accent-dark);
    color: var(--cop-white);
    text-decoration: none;
}

/* ========== Paginação ========== */
.cop-paginacao {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.cop-paginacao .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    background: var(--cop-white);
    color: var(--cop-primary);
    border: 1.5px solid var(--cop-border);
    text-decoration: none;
    transition: all 0.2s;
}

.cop-paginacao .page-numbers:hover,
.cop-paginacao .page-numbers.current {
    background: var(--cop-primary);
    color: var(--cop-white);
    border-color: var(--cop-primary);
}

/* ========== Vazio ========== */
.cop-vazio {
    text-align: center;
    padding: 60px 20px;
    color: var(--cop-text-muted);
    font-size: 15px;
}

/* ========== Responsivo ========== */
@media (max-width: 600px) {
    .cop-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .cop-titulo {
        font-size: 22px;
    }

    .cop-card-img {
        height: 150px;
    }

    .cop-preco {
        font-size: 18px;
    }

    .cop-acoes {
        flex-direction: column;
    }
}

@media (max-width: 380px) {
    .cop-grid {
        grid-template-columns: 1fr;
    }
}
