/* catalogo.css — Extracted from app/views/catalogo/index.php */

/* PERFORMANCE: Override FontAwesome for Display Swap */
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-solid-900.woff2) format('woff2');
}

@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-brands-400.woff2) format('woff2');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: #F5F7F9;
}

/* HEADER STYLE WHATSAPP PREMIUM */
.wa-header {
    background: linear-gradient(135deg, #1B3A5C 0%, #122744 100%);
    color: white;
    padding: 10px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wa-header .profile-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.wa-header .avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: none;
    border: none;
    flex-shrink: 0;
}

.wa-header .title-group {
    min-width: 0;
    overflow: hidden;
}

.wa-header .title-group h1 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-header .title-group h2 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-header .title-group p {
    margin: 0;
    font-size: 10px;
    opacity: 0.85;
    font-weight: 400;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-header .actions {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

/* FILTERS BAR */
.filters-bar {
    background: #f0f2f5;
    padding: 8px 12px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-bottom: 1px solid #e1e1e1;
    min-height: 44px;
    position: sticky;
    top: 60px;
    z-index: 99;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.filters-bar::-webkit-scrollbar { display: none; }

.filter-chip {
    background: #e9edef;
    padding: 6px 16px;
    border-radius: 24px;
    font-size: 14px;
    color: #54656f;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    font-weight: 500;
}

.filter-chip.active {
    background: #1B3A5C;
    color: white;
    border-color: #122744;
    box-shadow: 0 1px 3px rgba(7, 94, 84, 0.3);
}

/* CATEGORY SECTIONS */
.category-section {
    margin-bottom: 32px;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 10px 0;
    border-bottom: 2px solid #e4e9ec;
    margin-bottom: 4px;
}

.section-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a2e35;
    padding: 0 16px 10px 16px;
    margin-bottom: 4px;
    border-bottom: 2px solid #e4e9ec;
    letter-spacing: -0.2px;
}

.cat-count {
    font-size: 12px;
    font-weight: 400;
    color: #9CA3AF;
    margin-left: 6px;
}

.cat-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ffebee;
    color: #b71c1c;
    border: 1px solid #ffcdd2;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.cat-pdf-btn:hover {
    background: #ffcdd2;
}

/* PREMIUM PRODUCT CARDS */
.product-list {
    padding: 16px;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
@media (max-width: 520px) {
    .product-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px;
    }
}

.product-card {
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.13);
}

.product-img {
    width: 100%;
    aspect-ratio: 1;
    background: #fff;
    object-fit: contain;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.product-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    padding: 12px 12px 4px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #111b21;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    height: 52px;
}

.stars-row {
    padding: 4px 12px 6px;
    color: #ffc107;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Footer Color Block Style */
.product-footer {
    margin-top: auto;
    background: #FFFFFF;
    border-top: 1px solid #edf0f2;
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
}

.product-price {
    font-size: 23px;
    font-weight: 900;
    color: #1B3A5C;
    letter-spacing: -1px;
    line-height: 1.2;
}

.btn-pedir {
    flex: 1;
    text-align: center;
    background: #1B3A5C;
    color: white !important;
    padding: 10px 6px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    transition: background 0.2s;
    letter-spacing: 0.3px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-pedir:hover {
    background: #145B5C;
}

.btn-ver {
    flex: 1;
    text-align: center;
    background: transparent;
    color: #1B3A5C !important;
    border: 1.5px solid #1B3A5C;
    padding: 9px 6px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.2s;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-ver:hover {
    background: #1B3A5C;
    color: white !important;
}

.badges-container {
    position: absolute;
    top: 10px;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    z-index: 2;
}

.badge-corner {
    background: #d32f2f;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 4px 0 0 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

/* Badge Colors - Unified */
.badge-frete { background: #1B3A5C !important; }
.badge-mais-vendido { background: #1F6F8B !important; }
.badge-novo { background: #1F6F8B !important; }
.badge-promo { background: #D62828 !important; }
.badge-pronta { background: #1B3A5C !important; }
.badge-generic { background: #1F6F8B !important; }

.bldc-badge-inline {
    display: block;
    background: linear-gradient(135deg, #B8860B, #DAA520);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 5px 12px;
    margin: 4px 12px 0;
    border-radius: 4px;
    text-align: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Dropdown Menu */
.menu-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 220px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    z-index: 1000;
    margin-top: 10px;
    overflow: hidden;
}

.dropdown-content a {
    color: #333;
    padding: 14px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background: #f5f5f5; }
.dropdown-content a i { width: 20px; text-align: center; color: #1B3A5C; }
.dropdown-content a .fa-whatsapp { color: #25D366; }
.dropdown-content.show { display: block; }

/* SEARCH BAR & AUTOCOMPLETE */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.search-input-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #1B3A5C;
    padding: 10px 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    align-items: center;
    gap: 10px;
}

.search-input-container.active { display: flex; }

#searchInput {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 16px;
    font-size: 16px;
    background: white;
    color: #333;
    border-radius: 24px;
}

#searchClose {
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
}

.search-results {
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    background: white;
    max-height: 70vh;
    overflow-y: auto;
    display: none;
    z-index: 9998;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.search-result-item {
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #f9f9f9; }

.search-result-item img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    background: #eee;
}

.search-result-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-result-name {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    color: #111b21;
}

.search-result-price {
    font-size: 13px;
    color: #1B3A5C;
    font-weight: 700;
}

/* FAQ ACCORDION STYLES */
.faq-accordion details {
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.faq-accordion summary {
    padding: 15px;
    font-weight: 500;
    cursor: pointer;
    color: #1B3A5C;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-accordion summary::-webkit-details-marker { display: none; }

.faq-accordion summary::after {
    content: '+';
    font-weight: bold;
    font-size: 20px;
    color: #1B3A5C;
}

.faq-accordion details[open] summary::after { content: '-'; }

.faq-accordion .faq-answer {
    padding: 0 15px 15px 15px;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    border-top: 1px solid #f0f0f0;
}

/* AI Quick Answer Block (Collapsible) */
.ai-quick-answer { margin: 6px 12px 10px; }

.ai-quick-answer details {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 6px 12px;
    transition: all 0.2s ease;
}

.ai-quick-answer summary {
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #1B3A5C;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-quick-answer summary::marker,
.ai-quick-answer summary::-webkit-details-marker { display: none; }

.ai-quick-answer summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: #1B3A5C;
    transition: transform 0.2s ease;
}

.ai-quick-answer details[open] summary::after { transform: rotate(180deg); }

.ai-quick-answer p {
    font-size: 12px;
    color: #555;
    line-height: 1.5;
    margin: 8px 0 4px;
}

/* Breadcrumb Style */
.breadcrumb {
    padding: 8px 16px;
    font-size: 12px;
    color: #666;
    margin-bottom: 0;
}

.breadcrumb a { color: #1B3A5C; text-decoration: none; }
.breadcrumb span { margin: 0 5px; color: #555; }

/* Floating Cart (FAB) */
.fab-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    text-decoration: none;
    transition: transform 0.3s;
}

.fab-cart:hover { transform: scale(1.1); }

/* Botao Orcamento no Header */
.btn-orcamento-header {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #25D366;
    color: white !important;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
    margin-right: 8px;
}
.btn-orcamento-header:hover { background: #20BD5A; }

/* Bloco de Autoridade */
.authority-bar {
    background: #f8faf9;
    border-bottom: 1px solid #e8ece9;
    padding: 10px 16px;
    text-align: center;
    font-size: 12px;
    color: #4a5e52;
    line-height: 1.5;
}
.authority-bar strong { color: #1B3A5C; }
.authority-brands {
    margin-top: 4px;
    font-size: 11px;
    color: #7a8e82;
    letter-spacing: 0.3px;
}
.authority-brands span {
    display: inline-block;
    margin: 0 3px;
    padding: 2px 8px;
    background: #eef3f0;
    border-radius: 10px;
    font-weight: 500;
    color: #3d5a47;
    font-size: 10px;
}

/* Secao Qual Mixer - Compacta */
.uso-filter-bar {
    background: #fff;
    padding: 10px 16px;
    border-bottom: 1px solid #e8ece9;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.uso-filter-bar .uso-label {
    font-size: 12px;
    font-weight: 700;
    color: #1a2e35;
    white-space: nowrap;
}
.uso-filter-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    flex: 1;
}
.uso-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f3f6f4;
    color: #3d5a47;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid #dce3de;
    transition: all 0.2s;
    cursor: pointer;
}
.uso-chip:hover {
    background: #1B3A5C;
    color: white;
    border-color: #1B3A5C;
}
.uso-chip.active {
    background: #1B3A5C;
    color: white;
    border-color: #1B3A5C;
    box-shadow: 0 2px 6px rgba(15,61,62,0.25);
}
.uso-chip .uso-emoji { font-size: 13px; }

/* Bloco Diferenciais - Inline compacto */
.differentials-inline {
    background: #f8faf9;
    padding: 8px 16px;
    border-bottom: 1px solid #e8ece9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.diff-inline-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #5a6e62;
    white-space: nowrap;
}
.diff-inline-item i { color: #1B3A5C; font-size: 9px; }

@media (max-width: 768px) {
    .wa-header { padding: 8px 12px; gap: 8px; }
    .wa-header .avatar { width: 36px; height: 36px; min-width: 36px; max-width: 36px; }
    .wa-header .title-group h1 { font-size: 15px; }
    .wa-header .title-group h2 { font-size: 11px !important; }
    .wa-header .title-group p { font-size: 9px; display: none; }
    .wa-header .actions { gap: 6px; }
    .btn-orcamento-header { padding: 5px 10px; font-size: 11px; margin-right: 0; }
    .filters-bar { top: 52px; padding: 6px 10px; gap: 6px; min-height: 40px; }
    .filter-chip { padding: 5px 12px; font-size: 13px; }
    .breadcrumb { padding: 6px 12px; font-size: 11px; }
    .uso-filter-bar { padding: 8px 12px; flex-direction: column; align-items: flex-start; gap: 6px; }
    .uso-filter-chips { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .uso-filter-chips::-webkit-scrollbar { display: none; }
    .differentials-inline { gap: 8px; padding: 6px 12px; }
    .diff-inline-item { font-size: 9px; }
    .authority-bar { padding: 8px 12px; font-size: 11px; }
}
@media (max-width: 400px) {
    .wa-header .title-group h1 { font-size: 14px; }
    .wa-header .title-group h2 { font-size: 10px !important; }
    .btn-orcamento-header span { display: none; }
    .filters-bar { top: 48px; }
}

/* Potencia Badge nos Cards */
.power-badge {
    display: inline-block;
    background: #1B3A5C;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    margin: 4px 12px 0;
}
