/* Reset e Variáveis */
:root {
    --primary: #6C63FF;
    --primary-dark: #5A52D5;
    --secondary: #FF6584;
    --success: #00C9A7;
    --warning: #FFC107;
    --danger: #FF6B6B;
    --dark: #2D3436;
    --gray: #636E72;
    --light-gray: #DFE6E9;
    --white: #FFFFFF;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: #F8F9FA;
}

/* Container Principal com espaços para anúncios */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 30px;
}

.content-area {
    grid-column: 1;
}

.ad-sidebar {
    grid-column: 2;
    position: sticky;
    top: 20px;
    height: fit-content;
}

/* Componente de Anúncio */
.ad-placeholder {
    background: #F1F2F6;
    border: 2px dashed #B2BEC3;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: var(--gray);
    margin: 20px 0;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}

.ad-placeholder:hover {
    border-color: var(--primary);
    background: #E8EAF6;
}

/* Ad entre produtos */
.ad-between {
    margin: 30px 0;
    min-height: 90px;
}

/* Ad no rodapé */
.ad-footer {
    min-height: 90px;
    margin: 20px 0;
}

/* Navbar */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.navbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

/* Cards de Produtos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--light-gray);
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
}

.product-description {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 15px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--dark);
}

.btn-secondary:hover {
    background: #C8CCD4;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-featured {
    background: var(--warning);
    color: var(--dark);
}

.badge-new {
    background: var(--success);
    color: var(--white);
}

.badge-best-seller {
    background: var(--secondary);
    color: var(--white);
}

/* Search */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 20px auto;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--light-gray);
    border-radius: 50px;
    font-size: 16px;
    transition: var(--transition);
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: var(--transition);
}

.suggestion-item:hover {
    background: #F8F9FA;
}

/* Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.category-item {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.category-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

/* Newsletter */
.newsletter {
    background: var(--primary);
    color: var(--white);
    padding: 50px 0;
    margin: 50px 0;
    border-radius: 12px;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-input {
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    width: 70%;
    margin-right: 10px;
    font-size: 16px;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer h4 {
    margin-bottom: 15px;
}

.footer a {
    color: #B2BEC3;
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--white);
}

/* Responsividade */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
    }
    
    .ad-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .newsletter-input {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 15px 0;
    font-size: 14px;
    color: var(--gray);
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumbs span {
    margin: 0 8px;
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}