/*
Theme Name:          AutoGic
Theme URI:           https://autogic.com.br
Description:         Tema filho do Elessi para catálogo profissional de auto peças AutoGic. Recursos: busca por referência OEM e aplicação, painel de cadastro simplificado, importação/exportação em massa via CSV+ZIP, SEO automático com integração Yoast, Schema.org Product, controle de admin configurável e modo catálogo puro sem preços.
Author:              Lupee Design
Author URI:          https://lupee.com.br
Template:            elessi-theme
Version:             1.4.0
Requires at least:   6.0
Tested up to:        6.7
Requires PHP:        8.0
License:             Proprietário — Todos os direitos reservados
License URI:         https://lupee.com.br
Text Domain:         autogic
Tags:                auto-pecas, catalogo, woocommerce, child-theme, elessi
*/

/* ================================================================
   1. RESET — oculta elementos de e-commerce (catálogo sem preço)
   ================================================================ */

/* Summary WC/Elessi — mantido no DOM para compatibilidade, ocultado visualmente */
.autogic-product-page .autogic-summary-hidden { display: none !important; }

.autogic-product-page .price,
.autogic-product-page .woocommerce-product-rating,
.autogic-product-page form.cart,
.autogic-product-page .cart,
.autogic-product-page .woocommerce-tabs,
.autogic-product-page .nasa-product-rating,
.autogic-product-page .nasa-pr-top,
.autogic-product-page .nasa-sticky-atc,
.autogic-product-page .nasa-add-to-cart-sticky,
.autogic-product-page .single_add_to_cart_button,
.autogic-product-page .quantity,
.autogic-product-page .nasa-woo-loop-countdown,
.autogic-product-page .nasa-countdown-wrap,
.autogic-product-page .nasa-col-sidebar,
.autogic-product-page .col-sidebar { display: none !important; }

/* ================================================================
   2. CABEÇALHO DO PRODUTO — nome (esq) + código (dir) na mesma linha
   ================================================================ */

.autogic-product-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.autogic-product-title {
    font-size: 28px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    color: #111 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    flex: 1;
}

/* Badge SKU no cabeçalho */
.autogic-sku-badge {
    display: inline-block;
    flex-shrink: 0;
    font-size: 13px;
    color: #555;
    background: #ebebeb;
    padding: 5px 14px;
    border-radius: 3px;
    white-space: nowrap;
    font-weight: 400;
    line-height: 1.5;
    align-self: center;
}
.autogic-sku-badge strong {
    font-weight: 700;
    color: #333;
}

/* ================================================================
   3. LAYOUT CORPO — galeria esquerda | coluna info direita
   ================================================================ */

/* Garante que o row principal ocupe 100% sem sidebar */
.autogic-product-page .autogic-layout > .large-12 {
    width: 100% !important;
    max-width: 100% !important;
}

.autogic-product-page .autogic-gallery-col {
    width: 58% !important;
    box-sizing: border-box;
    float: left;
}

.autogic-product-page .autogic-info-col {
    width: 42% !important;
    box-sizing: border-box;
    float: left;
    padding-left: 20px !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 959px) {
    .autogic-product-page .autogic-gallery-col,
    .autogic-product-page .autogic-info-col {
        width: 100% !important;
        float: none !important;
        padding-left: 0 !important;
    }
    .autogic-product-page .autogic-info-col { margin-top: 20px; }
    .autogic-product-header { flex-direction: column; gap: 8px; }
}

/* ================================================================
   4. CARDS DA COLUNA DIREITA — fundo #f7f7f7
   ================================================================ */

.autogic-card {
    background: #f7f7f7;
    border-radius: 4px;
    padding: 22px 20px;
    box-sizing: border-box;
    width: 100%;
}

.autogic-card--badges { padding: 20px; }
.autogic-card--share  { padding: 16px 20px; }

/* ================================================================
   5. BLOCO DE INFORMAÇÕES (aplicações / referências / características)
   ================================================================ */

/* ── Badge posição/lado ────────────────────────────────────────── */
.autogic-posicao-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2C3E50;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    padding: 5px 12px;
    border-radius: 3px;
    margin-bottom: 12px;
    text-transform: uppercase;
}
.autogic-posicao-badge svg { flex-shrink: 0; opacity: .8; }

/* ── Tabela de dados técnicos ──────────────────────────────────── */
.autogic-tec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.autogic-tec-table tr { border-bottom: 1px solid #ececec; }
.autogic-tec-table tr:last-child { border-bottom: none; }
.autogic-tec-label {
    padding: 5px 8px 5px 0;
    color: #888;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
    width: 40%;
}
.autogic-tec-val {
    padding: 5px 0;
    color: #333;
    font-weight: 500;
    font-size: 12px;
}

.autogic-section { margin-bottom: 0; }

/* Título de cada bloco: caixa alta, bold, pequeno */
.autogic-section__title {
    display: block !important;
    width: 100% !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: .1em !important;
    text-transform: uppercase !important;
    color: #1a1a1a !important;
    margin: 0 0 10px !important;
    padding: 0 0 8px !important;
    border: none !important;
    border-bottom: 1px solid #e5e5e5 !important;
    background: none !important;
    line-height: 1 !important;
}

/* Divisor interno entre seções */
.autogic-divider {
    border: none !important;
    border-top: 1px solid #ddd !important;
    margin: 12px 0 !important;
    background: none !important;
}
.autogic-divider--inner {
    border-top-color: #e5e5e5 !important;
    margin: 8px 0 !important;
}

/* Grupo por marca */
.autogic-marca-group { margin-bottom: 6px; }
.autogic-marca-group:last-child { margin-bottom: 0; }
.autogic-marca-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 3px;
}

/* Listas de itens */
.autogic-modelo-list,
.autogic-ref-list,
.autogic-char-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.autogic-modelo-list li,
.autogic-ref-list li,
.autogic-char-list li {
    font-size: 12px;
    color: #444;
    line-height: 1.45;
    padding: 1px 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

/* Bullet ■ */
.autogic-bullet {
    font-size: 7px;
    color: #888;
    flex-shrink: 0;
    position: relative;
    top: -1px;
}

/* Linha/motor em itálico */
.autogic-linha {
    font-style: italic;
    color: #aaa;
    font-size: 11px;
}

/* ================================================================
   6. BADGES (ícones de benefícios)
   ================================================================ */

.autogic-badges {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 8px;
}
.autogic-badge {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}
.autogic-badge__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
}
.autogic-badge__icon svg {
    width: 36px;
    height: 36px;
}
.autogic-badge__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #666;
    line-height: 1.4;
}

/* ================================================================
   7. SHARE AUTOGIC
   ================================================================ */

.autogic-card--share .autogic-share {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}
.autogic-share__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #555;
    white-space: nowrap;
    flex-shrink: 0;
}
/* Ícone SVG de compartilhar */
.autogic-share__label svg {
    width: 18px;
    height: 18px;
    color: #888;
    flex-shrink: 0;
}
.autogic-share__count { color: #999; font-weight: 400; }
.autogic-share__icons {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}
.autogic-share__btn {
    color: #aaa;
    display: flex;
    align-items: center;
    transition: color .2s;
    line-height: 1;
}
.autogic-share__btn:hover { color: #333; }
.autogic-share__btn svg  { width: 16px; height: 16px; }

/* ================================================================
   8. BUSCADOR [autogic_buscador]
   ================================================================ */

.autogic-buscador {
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 22px 24px;
    margin: 20px 0;
}
.apc-buscador__title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #111;
}
.apc-buscador__fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}
.apc-field { flex: 1 1 150px; }
.apc-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 5px;
    color: #666;
}
.apc-field select {
    width: 100%;
    padding: 9px 30px 9px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    color: #333;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23888' d='M5 7L0 2h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
    transition: border-color .2s;
}
.apc-field select:focus  { outline: none; border-color: var(--color-primary, #c00); }
.apc-field select:disabled { opacity: .45; cursor: not-allowed; }
.apc-field--submit { flex: 0 0 auto; }
.apc-buscador__btn {
    padding: 9px 22px;
    background: var(--color-primary, #c00);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    height: 38px;
    white-space: nowrap;
    transition: opacity .2s;
}
.apc-buscador__btn:hover { opacity: .85; }

@media (max-width: 640px) {
    .apc-buscador__fields { flex-direction: column; }
    .apc-field { min-width: 100%; }
    .apc-field--submit .apc-buscador__btn { width: 100%; }
}

/* ================================================================
   9. ICONES DE ACAO — apenas hover (layout via inline styles no PHP)
   ================================================================ */

/* Hover: muda para a cor primaria do site (vermelho) */
.autogic-action-icon:hover,
a.autogic-action-icon:hover,
span.autogic-action-icon:hover {
    color: var(--color-primary, #c00) !important;
    text-decoration: none !important;
}
.autogic-action-icon:hover svg,
a.autogic-action-icon:hover svg,
span.autogic-action-icon:hover svg {
    color: var(--color-primary, #c00) !important;
    stroke: var(--color-primary, #c00) !important;
}
/* WhatsApp fill em vez de stroke */
.autogic-action-icon--whatsapp:hover svg {
    fill: var(--color-primary, #c00) !important;
    stroke: none !important;
}

/* ================================================================
   10. MODAL REPORTE DE ERRO
   ================================================================ */

.autogic-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.autogic-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .62);
    cursor: pointer;
}

.autogic-modal__box {
    position: relative;
    z-index: 1;
    background: #f0f0f0;
    width: 92%;
    max-width: 440px;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 2px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}

.autogic-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111;
    color: #fff;
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 2;
}

.autogic-modal__title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.autogic-modal__close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    opacity: .75;
    transition: opacity .15s;
}
.autogic-modal__close:hover { opacity: 1; }

.autogic-modal__body {
    padding: 22px 20px 20px;
}

.autogic-modal__product-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    color: #888;
    margin: 0 0 4px;
}

.autogic-modal__product-name {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin: 0 0 16px;
    word-break: break-word;
}

.autogic-modal__sep {
    border: none;
    border-top: 1px solid #d0d0d0;
    margin: 14px 0;
}

.autogic-modal__field {
    margin-bottom: 12px;
}
.autogic-modal__field label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #555;
    margin-bottom: 5px;
    text-transform: uppercase;
}
.autogic-modal__field input,
.autogic-modal__field textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #c8c8c8;
    background: #fff;
    border-radius: 2px;
    outline: none;
    transition: border-color .15s;
    font-family: inherit;
}
.autogic-modal__field input:focus,
.autogic-modal__field textarea:focus {
    border-color: #888;
}
.autogic-modal__field textarea {
    resize: vertical;
    min-height: 100px;
}

.autogic-modal__submit {
    display: block;
    width: 100%;
    background: #111;
    color: #fff;
    border: none;
    padding: 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 6px;
    border-radius: 2px;
    transition: background .2s;
    font-family: inherit;
}
.autogic-modal__submit:hover:not(:disabled) { background: #333; }
.autogic-modal__submit:disabled { opacity: .6; cursor: not-allowed; }

.autogic-modal__feedback {
    text-align: center;
    font-size: 12px;
    min-height: 18px;
    margin: 10px 0 0;
}
