/* Reset e estilos gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', Arial, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
}

/* Header */
.site-header {
    background-color: #e02e5e;
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    max-width: 180px;
    height: auto;
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.05);
}

/* Botões de fonte (Shopee/Amazon) */
.source-toggle {
    display: flex;
    gap: 10px;
}

.source-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.source-btn:hover,
.source-btn.active {
    background: rgba(255, 255, 255, 0.4);
}

/* Navegação das categorias */
.category-nav {
    width: 100%;
    background-color: #24b45d;
    padding: 10px 0;
    overflow-x: auto;
    white-space: nowrap;
    position: sticky;
    top: 70px;
    z-index: 900;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-list {
    display: inline-flex;
    list-style-type: none;
    padding: 0 15px;
}

.category-item {
    margin: 0 15px;
}

.category-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 20px;
    transition: all 0.3s;
}

.category-link:hover, .category-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Container principal */
.main-container {
    width: 95%;
    max-width: 1400px;
    margin: 20px auto;
}

/* Título da seção */
.section-title {
    font-size: 24px;
    margin: 30px 0 8px;
    color: #333;
    border-left: 5px solid #e02e5e;
    padding-left: 10px;
}

.section-subtitle {
    font-size: 14px;
    color: #777;
    margin: 0 0 20px 12px;
}

.load-sentinel {
    height: 1px;
    width: 100%;
    pointer-events: none;
}

/* Grid de produtos - Mais cards por linha */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Cards menores */
    gap: 20px; /* Espaçamento menor entre os cards */
    margin-bottom: 40px;
}

/* Card de produto - Versão mais compacta e charmosa com borda rosa */
.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    min-height: 320px;
    transform: translateY(0);
    border: 1px solid #ffccd5;
    content-visibility: auto;
    contain-intrinsic-size: 0 320px;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
    border-color: #e02e5e; /* Borda rosa mais escura no hover */
}

.product-image-container {
    position: relative;
    padding-top: 100%; /* Aspect ratio 1:1 */
    overflow: hidden;
    border-bottom: 1px solid #ffccd5; /* Borda rosa abaixo da imagem */
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.store-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 20px; /* Mais arredondado */
    font-size: 10px;
    font-weight: 600;
    z-index: 10;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.product-card:hover .store-badge {
    transform: translateY(-2px);
}

.store-badge.shopee {
    background-color: #ee4d2d;
}

.store-badge.amazon {
    background-color: #ff9900;
    color: #111;
}

.product-details {
    padding: 14px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
}

.product-price-container {
    margin-top: auto;
}

.price-label {
    font-size: 11px;
    color: #888;
    display: inline-block;
    margin-bottom: 2px;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #24b45d;
    margin: 3px 0 12px;
}

.product-button {
    display: block;
    text-align: center;
    background-color: #e02e5e;
    color: white;
    padding: 10px 0;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s;
    margin-top: auto;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 3px 6px rgba(224, 46, 94, 0.2);
}

.product-button:hover {
    background-color: #c01e4e;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(224, 46, 94, 0.3);
}

/* Loader */
.loader-container {
    text-align: center;
    padding: 30px 0;
    display: none;
}

.loader {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid #e02e5e;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.footer {
    background-color: #333;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
}

.footer-column h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 3px;
    background-color: #e02e5e;
}

.footer-column p, .footer-column a {
    color: #bbb;
    margin-bottom: 10px;
    display: block;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s;
}

.social-links a:hover {
    background-color: #e02e5e;
}

.social-links i {
    color: white;
    font-size: 16px;
}

.copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
    font-size: 14px;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #e02e5e;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 15px rgba(224, 46, 94, 0.4);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(224, 46, 94, 0.5);
}

.back-to-top i {
    font-size: 18px;
}

/* Mensagem sem produtos */
.no-products {
    text-align: center;
    padding: 50px 0;
    font-size: 18px;
    color: #777;
}

/* Responsividade */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .product-card {
        min-height: 300px;
    }
    
    .product-title {
        font-size: 13px;
        height: 36px;
    }
    
    .product-price {
        font-size: 16px;
    }
    
    .product-button {
        padding: 8px 0;
        font-size: 11px;
    }
}

@media (max-width: 576px) {
    .source-toggle {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .source-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .site-logo {
        margin-bottom: 10px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .product-card {
        min-height: 280px;
    }
    
    .product-details {
        padding: 10px 8px;
    }
    
    .product-title {
        font-size: 12px;
        margin-bottom: 8px;
        height: 34px;
    }
    
    .product-price {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .store-badge {
        font-size: 9px;
        padding: 3px 6px;
    }
}