:root {
    /* Cores principais - Palette moderna */
    --vermelho-principal: #dc2626;
    --vermelho-fuso: #dc2626;
    --preto-principal: #000000;
    --preto-fuso: #231F20;
    --branco: #FFFFFF;
    
    /* Cores secundárias - Tons neutros suaves */
    --cinza-claro: #f8fafc;
    --cinza-medio: #e2e8f0;
    --cinza-escuro: #64748b;
    
    /* Cores derivadas para hover e variações */
    --vermelho-escuro: #991b1b;
    --vermelho-hover: #b91c1c;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--preto-fuso);
    background-color: #f5f5f5;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--preto-fuso);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.header-content {
    text-align: center;
    margin-bottom: 1.5rem;
}

.search-section {
    text-align: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.5px;
}

.search-box {
    display: flex;
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 300px;
    transition: all 0.3s ease;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 1rem;
}

.search-box input:focus {
    background-color: #fafafa;
}

.search-box:focus-within {
    box-shadow: 0 4px 15px rgba(230, 0, 18, 0.2);
    transform: translateY(-1px);
}

.search-box button {
    background: var(--vermelho-principal);
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: var(--vermelho-hover);
}

/* Filters */
.filters-section {
    padding: 1.5rem 0 2rem 0;
    margin-bottom: 2rem;
}

.filters-container {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    background: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
    transition: box-shadow 0.3s ease;
}

.filters-container:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--cinza-escuro);
    font-size: 0.9rem;
}

.filter-group select {
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.95rem;
    min-width: 150px;
    background: #f8fafc;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path d="M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z" fill="%23696D71"/></svg>');
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--vermelho-principal);
    background: white;
    box-shadow: 0 0 0 3px rgba(230, 0, 18, 0.1), 0 2px 6px rgba(0,0,0,0.12);
}

.filter-group select:hover {
    border-color: #94a3b8;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.filter-group select.active {
    border-color: var(--vermelho-principal);
    background-color: #fff5f5;
}

.btn-clear {
    background: var(--vermelho-principal);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    height: fit-content;
    align-self: flex-end;
    margin-bottom: 0;
    box-shadow: 0 2px 6px rgba(230, 0, 18, 0.25);
}

.btn-clear:hover {
    background: var(--vermelho-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(230, 0, 18, 0.3);
}

.btn-clear:focus {
    outline: 2px solid var(--vermelho-principal);
    outline-offset: 2px;
}

/* Results Info */
.results-info {
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: #555;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover,
.product-card:focus-within {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: rgba(230, 0, 18, 0.2);
}

.product-card:focus-within {
    outline: 2px solid var(--vermelho-principal);
    outline-offset: 4px;
}

.product-card.out-of-stock {
    opacity: 0.7;
}

.product-card.out-of-stock:hover {
    opacity: 0.85;
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #e74c3c;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
}

.product-badge.discount {
    background: #f39c12;
}

.product-badge.new {
    background: #27ae60;
}

.product-badge.out-of-stock {
    background: #95a5a6;
}

.product-image {
    height: 200px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.brand-logo-central {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.product-card:hover .brand-logo-central {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.brand-logo-central img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    background: white;
    border-radius: 8px;
}

.brand-logo-central .brand-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
}


/* Keep the small brand-logo for other uses if needed */
.brand-logo {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 3;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover .brand-logo {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    background: white;
    border-radius: 4px;
}

.brand-logo .brand-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 0.9rem;
    font-weight: bold;
}

.brand-logo.fallback {
    opacity: 0.8;
}

.product-info {
    padding: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-brand {
    color: var(--vermelho-principal);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-description {
    margin-bottom: 0.4rem;
    line-height: 1.4;
    min-height: 2.8rem;
}

.description-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    display: inline;
}

.description-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--preto-fuso);
    display: inline;
    margin-left: 0.3rem;
}

.product-size {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.product-features {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.feature-tag {
    background: #ecf0f1;
    color: #555;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Application tags with colors */
.application-tag {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.application-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.application-tag:active {
    transform: translateY(0);
}

/* Specific colors for each application type */
.application-tag[data-application="CARRETERA"] {
    background: #3498db;
    color: #ffffff;
}

.application-tag[data-application="CAMIÓN"] {
    background: #e67e22;
    color: #ffffff;
}

.application-tag[data-application="MOTO"] {
    background: #9b59b6;
    color: #ffffff;
}

.application-tag[data-application="AGRÍCOLA"] {
    background: #27ae60;
    color: #ffffff;
}

.application-tag[data-application="OTR"] {
    background: #e74c3c;
    color: #ffffff;
}

.application-tag[data-application="INDUSTRIAL"] {
    background: #34495e;
    color: #ffffff;
}

.application-tag[data-application="PASAJERO"] {
    background: #16a085;
    color: #ffffff;
}

.application-tag[data-application="SUV"] {
    background: #f39c12;
    color: #ffffff;
}

.application-tag[data-application="CAMIONETA"] {
    background: #8e44ad;
    color: #ffffff;
}

.application-tag[data-application="TRACCIÓN"] {
    background: #d35400;
    color: #ffffff;
}

.application-tag[data-application="COMBINADO"] {
    background: #2d3436;
    color: #ffffff;
}

.application-tag[data-application="TRABAJO"] {
    background: #636e72;
    color: #ffffff;
}

.application-tag[data-application="DIRECCIONAL"] {
    background: #a29bfe;
    color: #ffffff;
}

/* Default color for unknown application types */
.application-tag.unknown-application {
    background: #7f8c8d;
    color: #ffffff;
}

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.price-current {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--vermelho-principal);
    text-shadow: 0 1px 2px rgba(230, 0, 18, 0.1);
}

.price-original {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.price-note {
    font-size: 0.8rem;
    color: var(--cinza-escuro);
    font-weight: 500;
    margin-left: 0.5rem;
    display: inline-block;
}

.product-stock {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.stock-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #27ae60;
    transition: all 0.3s ease;
}

.product-card:hover .stock-indicator {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(39, 174, 96, 0); }
    100% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0); }
}

.stock-indicator.low {
    background: #f39c12;
}

.stock-indicator.out {
    background: #e74c3c;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn:focus {
    outline: 2px solid var(--vermelho-principal);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--vermelho-principal);
    color: white;
}

.btn-primary:hover {
    background: var(--vermelho-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(230, 0, 18, 0.3);
}

.btn-secondary {
    background: var(--cinza-claro);
    color: var(--cinza-escuro);
}

.btn-secondary:hover {
    background: var(--cinza-medio);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #1DA851;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.btn-success {
    background: #2ecc71;
    color: white;
}

.btn-success:hover {
    background: #27ae60;
}

.btn-error {
    background: #e74c3c;
    color: white;
}

.btn-error:hover {
    background: #c0392b;
}

/* Loading */
.loading {
    text-align: center;
    padding: 4rem;
    display: none;
    background: white;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.loading.show {
    display: block;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--vermelho-principal);
    border-right: 4px solid var(--vermelho-fuso);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    margin: 0 auto 1.5rem;
}

.loading p {
    color: #666;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid var(--cinza-claro);
    background: white;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
}

.pagination button:hover {
    background: #f8f9fa;
}

.pagination button.active {
    background: var(--vermelho-principal);
    color: white;
    border-color: var(--vermelho-principal);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button:focus {
    outline: 2px solid var(--vermelho-principal);
    outline-offset: 2px;
}

/* Footer */
.footer {
    background: var(--preto-fuso);
    color: white;
    padding: 2.5rem 0 1.5rem;
    margin-top: 4rem;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1.3fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: left;
    }
}

.footer-section h3 {
    color: var(--vermelho-principal);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.footer-section h4 {
    color: var(--cinza-claro);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.footer-section p {
    line-height: 1.6;
    color: var(--cinza-medio);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
}

.footer-bottom a {
    color: var(--vermelho-principal);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--cinza-claro);
    text-decoration: underline;
}


/* Contact Section Redesign */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: var(--vermelho-principal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    color: white;
    font-size: 1.1rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.contact-label {
    font-size: 0.75rem;
    color: var(--cinza-medio);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.contact-link {
    color: var(--cinza-claro);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    word-break: break-word;
}

.contact-link:hover {
    color: var(--vermelho-principal);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        margin-bottom: 1rem;
    }
    
    .logo {
        font-size: 1.6rem;
    }
    
    .logo i {
        font-size: 2rem;
        margin-right: 0.3rem;
    }
    
    .search-box {
        min-width: 100%;
        max-width: 400px;
        margin: 0 auto;
        border-radius: 20px;
    }
    
    .search-box input {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .search-box button {
        padding: 10px 16px;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
        padding: 1.5rem;
        gap: 1.2rem;
        border-radius: 12px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select {
        min-width: 100%;
    }
    
    .btn-clear {
        align-self: stretch;
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .contact-info {
        gap: 1.5rem;
    }
    
    .contact-item {
        padding: 1rem;
        gap: 1rem;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
    }
    
    .contact-icon i {
        font-size: 1.3rem;
    }
    
    .contact-details {
        gap: 0.5rem;
    }
    
    .contact-label {
        font-size: 0.8rem;
    }
    
    .contact-link {
        font-size: 1rem;
        line-height: 1.4;
    }
}

/* Mobile: Uniform Card Heights */
@media (max-width: 768px) {
    .product-card {
        min-height: 480px;
    }
    
    .product-size {
        min-height: 1.3rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-card {
        width: 100%;
        min-height: 500px;
    }
}