/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #000;
    color: #fff;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* Container principal */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
}

/* Frase motivacional - ACIMA do logo */
.motivational-phrase {
    text-align: center;
    font-size: 18px;
    font-style: italic;
    margin: 20px 0 30px;
    color: #fff;
    width: 100%;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Logo */
.logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
    position: relative;
}

.logo {
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* Barra de busca - SOBREPOSTA à parte preta inferior do logo */
.search-container {
    width: 90%;
    max-width: 600px;
    margin: -60px auto 0;
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 15px 60px 15px 20px;
    border-radius: 50px;
    border: 2px solid #FF8C00;
    background-color: rgba(30, 30, 30, 0.8);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #FFB84D;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.3);
}

.search-input::placeholder {
    color: #aaa;
}

.search-button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 60px;
    background-color: #FF8C00;
    border: none;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: #FF6A00;
}

.search-button:active {
    transform: scale(0.95);
}

/* Frase "O maior buscador fitness" - ABAIXO da barra de busca */
.tagline {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #FF8C00;
    margin-bottom: 30px;
    width: 100%;
}

/* Ícone de halter */
.halter-icon {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
}

.halter-icon.searching {
    animation: rotate 1.5s infinite linear;
}

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

/* Resultados */
.results-container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 0 20px 50px;
}

.product-card {
    background-color: #111;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 140, 0, 0.2);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background-color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    loading: lazy;
}

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

/* Placeholder para imagens que não carregam */
.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #333, #555);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 14px;
    text-align: center;
}

.product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.3;
    font-weight: 600;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: #FF8C00;
    margin-bottom: 10px;
}

.product-source {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.source-badge {
    background-color: #FF8C00;
    color: #000;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.product-details {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.product-tag {
    background-color: #333;
    color: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    border: 1px solid #555;
}

.product-description {
    font-size: 14px;
    color: #ddd;
    margin-bottom: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-link {
    display: block;
    background-color: #FF8C00;
    color: #fff;
    text-align: center;
    padding: 12px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: auto;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-link:hover {
    background-color: #FF6A00;
    transform: translateY(-2px);
}

.product-link:active {
    transform: translateY(0);
}

/* Mensagens */
.loading-message, .no-results, .error-message {
    width: 100%;
    text-align: center;
    padding: 30px;
    font-size: 18px;
    color: #aaa;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid #FF8C00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Sugestões de busca */
.suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(30, 30, 30, 0.95);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    backdrop-filter: blur(10px);
}

.suggestion-item {
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.suggestion-item:hover {
    background-color: rgba(255, 140, 0, 0.2);
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Estados de erro */
.error-state {
    border: 2px solid #ff4444;
    background-color: rgba(255, 68, 68, 0.1);
}

.success-state {
    border: 2px solid #44ff44;
    background-color: rgba(68, 255, 68, 0.1);
}

/* Responsividade */
@media (max-width: 768px) {
    .motivational-phrase {
        font-size: 16px;
        margin: 15px 0 25px;
    }
    
    .search-container {
        width: 95%;
        margin-top: -50px;
    }
    
    .results-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        padding: 0 10px 30px;
        gap: 15px;
    }
    
    .product-card {
        min-height: 400px;
    }
}

@media (max-width: 480px) {
    .results-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .search-container {
        margin-top: -40px;
    }
    
    .search-input {
        font-size: 14px;
        padding: 12px 50px 12px 15px;
    }
    
    .search-button {
        width: 50px;
    }
    
    .tagline {
        font-size: 18px;
    }
}

/* Melhorias de acessibilidade */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states para acessibilidade */
.search-input:focus,
.search-button:focus,
.product-link:focus,
.suggestion-item:focus {
    outline: 2px solid #FF8C00;
    outline-offset: 2px;
}

/* Animações reduzidas para usuários que preferem */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: light) {
    body {
        background-color: #f5f5f5;
        color: #333;
    }
    
    .product-card {
        background-color: #fff;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    .search-input {
        background-color: rgba(255, 255, 255, 0.9);
        color: #333;
    }
}

