/**
 * ═══════════════════════════════════════════════════════════════════════════
 * CUSTOM CSS - AUTO PEÇAS INDUSTRIAL
 * ═══════════════════════════════════════════════════════════════════════════
 * 
 * Visual industrial/automotivo - Paleta: Vermelho + Azul Escuro + Laranja
 * 
 * Este arquivo deve ser carregado APÓS o main.css do tema base.
 */

/* ==========================================================================
   CSS VARIABLES (CORES DO TEMA INDUSTRIAL)
   ========================================================================== */
:root {
    /* Cores principais - Paleta Industrial */
    --theme-primary: #E63946;      /* Vermelho - preços, CTAs */
    --theme-primary-dark: #C62828;
    --theme-primary-light: #FF6659;
    --theme-primary-rgb: 230, 57, 70;
    
    --theme-secondary: #1D3557;    /* Azul escuro - menu, header */
    --theme-secondary-dark: #0D1B2A;
    --theme-secondary-light: #2D4A7C;
    
    /* Cor de destaque (CTAs, promoções) */
    --theme-accent: #F77F00;       /* Laranja - destaques */
    --theme-accent-dark: #E65100;
    --theme-accent-light: #FF9800;
    
    /* Cores de feedback */
    --theme-success: #2E7D32;
    --theme-warning: #F9A825;
    --theme-danger: #D32F2F;
    --theme-info: #1D3557;
    
    /* Backgrounds */
    --theme-bg-dark: #0D1117;
    --theme-bg-light: #F3F4F6;
    --theme-bg-white: #FFFFFF;
    
    /* Textos */
    --theme-text-dark: #1F2937;
    --theme-text-medium: #6B7280;
    --theme-text-light: #9CA3AF;
    
    /* Bordas */
    --theme-border: #E5E7EB;
    --theme-border-dark: #D1D5DB;
    
    /* Sombras */
    --theme-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --theme-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --theme-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* Transições */
    --theme-transition: all 0.3s ease;
    
    /* Border radius */
    --theme-radius-sm: 4px;
    --theme-radius: 8px;
    --theme-radius-lg: 12px;
    
    /* Sobrescreve variáveis do tema base (se existirem) */
    --ec-violet: var(--theme-primary);
    --ec-violet-dark: var(--theme-primary-dark);
}

/* ==========================================================================
   RESET/OVERRIDE DO TEMA BASE
   ========================================================================== */
a {
    color: var(--theme-primary);
    transition: var(--theme-transition);
}

a:hover {
    color: var(--theme-primary-dark);
}

/* ==========================================================================
   HEADER - ESTILO INDUSTRIAL
   ========================================================================== */
.header-top,
.top-bar {
    background: var(--theme-bg-dark) !important;
    color: #fff;
    font-size: 13px;
    padding: 8px 0;
}

.header-top a,
.top-bar a {
    color: rgba(255, 255, 255, 0.9);
}

.header-top a:hover,
.top-bar a:hover {
    color: var(--theme-accent);
}

.header-main,
.header-middle {
    background: #fff;
    box-shadow: var(--theme-shadow);
    padding: 15px 0;
}

/* Logo area */
.header-logo img {
    max-height: 60px;
    transition: var(--theme-transition);
}

/* Barra de busca estilizada */
.search-wrapper,
.header-search {
    position: relative;
}

.search-wrapper input,
.header-search input {
    background: var(--theme-bg-light);
    border: 2px solid var(--theme-border);
    border-radius: var(--theme-radius);
    padding: 12px 50px 12px 20px;
    font-size: 15px;
    transition: var(--theme-transition);
    width: 100%;
}

.search-wrapper input:focus,
.header-search input:focus {
    border-color: var(--theme-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb), 0.1);
    outline: none;
}

.search-wrapper button,
.header-search button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--theme-primary);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: var(--theme-radius-sm);
    cursor: pointer;
    transition: var(--theme-transition);
}

.search-wrapper button:hover,
.header-search button:hover {
    background: var(--theme-primary-dark);
}

/* Menu de navegação */
.main-nav,
.header-nav {
    background: var(--theme-secondary);
}

.main-nav a,
.header-nav a,
.main-menu > li > a {
    color: #fff !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    padding: 15px 20px;
    transition: var(--theme-transition);
}

.main-nav a:hover,
.header-nav a:hover,
.main-menu > li:hover > a,
.main-menu > li.active > a {
    background: var(--theme-primary) !important;
    color: #fff !important;
}

/* Destaque para Ofertas no menu */
.main-menu .highlight > a,
.nav-item.highlight > a {
    background: var(--theme-accent) !important;
    color: var(--theme-secondary) !important;
}

.main-menu .highlight > a:hover,
.nav-item.highlight > a:hover {
    background: var(--theme-accent-dark) !important;
}

/* Ícones do header (carrinho, conta) */
.header-icons a,
.header-action a {
    color: var(--theme-text-dark);
    font-size: 22px;
    position: relative;
}

.header-icons a:hover,
.header-action a:hover {
    color: var(--theme-primary);
}

/* Badge de quantidade no carrinho */
.cart-count,
.header-action .count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--theme-accent);
    color: var(--theme-secondary);
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   BUSCA POR VEÍCULO (RECURSO ESPECÍFICO AUTOPEÇAS)
   ========================================================================== */
.vehicle-finder {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-dark) 100%);
    padding: 40px 0;
    margin: 0;
}

.vehicle-finder-title {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.vehicle-finder-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin-bottom: 25px;
}

.vehicle-finder-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.vehicle-finder-form .form-group {
    flex: 1;
    min-width: 180px;
}

.vehicle-finder-form label {
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 5px;
    display: block;
}

.vehicle-finder-form select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--theme-radius);
    background: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    cursor: pointer;
    transition: var(--theme-transition);
}

.vehicle-finder-form select:focus {
    border-color: #fff;
    outline: none;
}

.vehicle-finder-form .btn-search {
    background: var(--theme-accent);
    color: var(--theme-secondary);
    border: none;
    padding: 12px 30px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    border-radius: var(--theme-radius);
    cursor: pointer;
    transition: var(--theme-transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.vehicle-finder-form .btn-search:hover {
    background: var(--theme-accent-dark);
    transform: translateY(-2px);
}

/* ==========================================================================
   BENEFÍCIOS/DIFERENCIAIS
   ========================================================================== */
.benefits-section {
    padding: 40px 0;
    background: #fff;
    border-bottom: 1px solid var(--theme-border);
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
}

.benefit-icon {
    width: 60px;
    height: 60px;
    background: var(--theme-bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-primary);
    font-size: 24px;
    flex-shrink: 0;
}

.benefit-title {
    font-weight: 700;
    color: var(--theme-text-dark);
    margin-bottom: 3px;
}

.benefit-text {
    font-size: 13px;
    color: var(--theme-text-medium);
}

/* ==========================================================================
   CARDS DE PRODUTO - ESTILO INDUSTRIAL
   ========================================================================== */
.product-card,
.product-item {
    background: #fff;
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius);
    overflow: hidden;
    transition: var(--theme-transition);
    position: relative;
}

.product-card:hover,
.product-item:hover {
    border-color: var(--theme-primary);
    box-shadow: var(--theme-shadow-lg);
    transform: translateY(-5px);
}

/* Badge de desconto */
.product-badge,
.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--theme-danger);
    color: #fff;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--theme-radius-sm);
    z-index: 2;
}

/* Badge de marca */
.product-brand,
.brand-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--theme-secondary);
    color: #fff;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--theme-radius-sm);
    z-index: 2;
}

/* Imagem do produto */
.product-image {
    position: relative;
    overflow: hidden;
    background: var(--theme-bg-light);
}

.product-image img {
    width: 100%;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img,
.product-item:hover .product-image img {
    transform: scale(1.05);
}

/* Ações rápidas */
.product-actions {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    display: flex;
    gap: 8px;
    transition: var(--theme-transition);
}

.product-card:hover .product-actions,
.product-item:hover .product-actions {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.product-actions button,
.product-actions a {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid var(--theme-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-text-dark);
    cursor: pointer;
    transition: var(--theme-transition);
}

.product-actions button:hover,
.product-actions a:hover {
    background: var(--theme-primary);
    color: #fff;
    border-color: var(--theme-primary);
}

/* Info do produto */
.product-info {
    padding: 15px;
}

/* SKU do produto (importante para autopeças) */
.product-sku {
    font-size: 11px;
    color: var(--theme-text-light);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.product-title,
.product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title:hover,
.product-name:hover {
    color: var(--theme-primary);
}

/* Compatibilidade com veículo */
.product-vehicle-info {
    font-size: 11px;
    color: var(--theme-text-medium);
    background: var(--theme-bg-light);
    padding: 5px 8px;
    border-radius: var(--theme-radius-sm);
    margin-bottom: 10px;
}

.product-vehicle-info i {
    color: var(--theme-primary);
    margin-right: 5px;
}

/* Preços */
.product-price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.product-price-old,
.price-old {
    font-size: 13px;
    color: var(--theme-text-light);
    text-decoration: line-through;
}

.product-price,
.price-current {
    font-size: 20px;
    font-weight: 700;
    color: var(--theme-primary);
}

.product-installments {
    font-size: 12px;
    color: var(--theme-text-medium);
    width: 100%;
    margin-top: 3px;
}

/* Estoque */
.product-stock {
    font-size: 12px;
    margin-top: 8px;
}

.product-stock.in-stock {
    color: var(--theme-success);
}

.product-stock.low-stock {
    color: var(--theme-warning);
}

.product-stock.out-of-stock {
    color: var(--theme-danger);
}

/* Botão adicionar ao carrinho */
.btn-add-cart,
.add-to-cart {
    width: 100%;
    background: var(--theme-primary);
    color: #fff;
    border: none;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    border-radius: var(--theme-radius);
    cursor: pointer;
    transition: var(--theme-transition);
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-cart:hover,
.add-to-cart:hover {
    background: var(--theme-primary-dark);
}

.btn-add-cart:disabled,
.add-to-cart:disabled {
    background: var(--theme-text-light);
    cursor: not-allowed;
}

/* ==========================================================================
   SEÇÃO DE CATEGORIAS
   ========================================================================== */
.category-card {
    background: #fff;
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius);
    padding: 25px;
    text-align: center;
    transition: var(--theme-transition);
}

.category-card:hover {
    border-color: var(--theme-primary);
    box-shadow: var(--theme-shadow);
    transform: translateY(-3px);
}

.category-icon {
    width: 70px;
    height: 70px;
    background: var(--theme-bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 28px;
    color: var(--theme-primary);
    transition: var(--theme-transition);
}

.category-card:hover .category-icon {
    background: var(--theme-primary);
    color: #fff;
}

.category-name {
    font-weight: 600;
    color: var(--theme-text-dark);
    margin-bottom: 5px;
}

.category-count {
    font-size: 13px;
    color: var(--theme-text-medium);
}

/* ==========================================================================
   OFERTAS/PROMOÇÕES
   ========================================================================== */
.deals-section {
    background: #FEF3C7;
    padding: 50px 0;
}

.deals-title {
    color: var(--theme-text-dark);
    font-size: 28px;
    font-weight: 700;
}

.deal-card {
    background: #fff;
    border-radius: var(--theme-radius-lg);
    overflow: hidden;
    box-shadow: var(--theme-shadow);
}

.deal-timer {
    background: var(--theme-danger);
    color: #fff;
    padding: 10px;
    text-align: center;
    font-weight: 600;
}

.deal-timer span {
    display: inline-block;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--theme-radius-sm);
    margin: 0 3px;
}

/* ==========================================================================
   PÁGINA DO PRODUTO
   ========================================================================== */
/* Tabela de compatibilidade */
.compatibility-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.compatibility-table th {
    background: var(--theme-bg-light);
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--theme-text-dark);
    border-bottom: 2px solid var(--theme-border);
}

.compatibility-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--theme-border);
}

.compatibility-table tr:hover {
    background: rgba(var(--theme-primary-rgb), 0.05);
}

/* Especificações técnicas */
.specs-table {
    width: 100%;
}

.specs-table tr:nth-child(odd) {
    background: var(--theme-bg-light);
}

.specs-table th {
    width: 40%;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--theme-text-medium);
}

.specs-table td {
    padding: 12px 15px;
    color: var(--theme-text-dark);
}

/* ==========================================================================
   FOOTER - ESTILO INDUSTRIAL
   ========================================================================== */
.footer,
footer {
    background: var(--theme-bg-dark);
    color: var(--theme-text-light);
}

.footer-top {
    padding: 50px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-title {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--theme-text-light);
    font-size: 14px;
    transition: var(--theme-transition);
}

.footer-links a:hover {
    color: var(--theme-primary-light);
    padding-left: 5px;
}

.footer-contact {
    font-size: 14px;
}

.footer-contact i {
    color: var(--theme-primary);
    width: 20px;
    margin-right: 10px;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    transition: var(--theme-transition);
}

.footer-social a:hover {
    background: var(--theme-primary);
    transform: translateY(-3px);
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
}

.payment-icons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

.payment-icons img {
    height: 30px;
    opacity: 0.7;
    transition: var(--theme-transition);
}

.payment-icons img:hover {
    opacity: 1;
}

/* ==========================================================================
   BOTÕES GLOBAIS
   ========================================================================== */
.btn-primary,
.btn-theme {
    background: var(--theme-primary);
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-weight: 600;
    border-radius: var(--theme-radius);
    cursor: pointer;
    transition: var(--theme-transition);
}

.btn-primary:hover,
.btn-theme:hover {
    background: var(--theme-primary-dark);
}

.btn-secondary {
    background: var(--theme-secondary);
    color: #fff;
}

.btn-secondary:hover {
    background: var(--theme-secondary-light);
}

.btn-accent,
.btn-cta {
    background: var(--theme-accent);
    color: var(--theme-secondary);
}

.btn-accent:hover,
.btn-cta:hover {
    background: var(--theme-accent-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--theme-primary);
    color: var(--theme-primary);
}

.btn-outline:hover {
    background: var(--theme-primary);
    color: #fff;
}

/* ==========================================================================
   NEWSLETTER
   ========================================================================== */
.newsletter-section {
    background: var(--theme-primary);
    padding: 50px 0;
    text-align: center;
}

.newsletter-title {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.newsletter-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: var(--theme-radius);
    font-size: 15px;
}

.newsletter-form button {
    background: var(--theme-accent);
    color: var(--theme-secondary);
    border: none;
    padding: 15px 30px;
    font-weight: 700;
    border-radius: var(--theme-radius);
    cursor: pointer;
    transition: var(--theme-transition);
}

.newsletter-form button:hover {
    background: var(--theme-accent-dark);
}

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */
@media (max-width: 991px) {
    .vehicle-finder-form {
        flex-direction: column;
    }
    
    .vehicle-finder-form .form-group {
        width: 100%;
    }
    
    .product-card .product-actions {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@media (max-width: 767px) {
    .vehicle-finder {
        padding: 30px 0;
    }
    
    .vehicle-finder-title {
        font-size: 22px;
    }
    
    .benefits-section {
        padding: 20px 0;
    }
    
    .benefit-item {
        padding: 10px;
    }
    
    .benefit-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }
}
