/**
 * CSS Principal - Página Inicial
 * Sistema Afiliados ML
 */

/* ===================================
   Header
   =================================== */

.site-header {
    background: linear-gradient(135deg, #3483fa 0%, #2968c8 100%);
    color: white;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    position: relative;
    overflow: hidden;
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: relative;
    z-index: 1;
}

.site-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.site-title a {
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.site-logo {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.site-name {
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.site-title a:hover .site-name {
    text-shadow: 2px 2px 8px rgba(255, 255, 255, 0.3);
}

.main-nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-link {
    color: white;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 25px;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.nav-icon {
    font-size: 16px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-link-logout:hover {
    background: rgba(255, 77, 77, 0.3);
}

/* ===================================
   Main Content
   =================================== */

.site-main {
    padding: 40px 0 60px;
    flex: 1;
}

.page-title {
    font-size: 36px;
    margin-bottom: 40px;
    color: var(--text-dark);
    text-align: center;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3483fa, #2968c8);
    border-radius: 2px;
}

/* ===================================
   Grid de Produtos
   =================================== */

.produtos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 350px));
    gap: 24px;
    margin-top: 30px;
    justify-content: center;
}

/* ===================================
   Card de Produto
   =================================== */

.produto-card {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.produto-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(52, 131, 250, 0.25);
    border-color: rgba(52, 131, 250, 0.2);
}

.produto-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.produto-imagem {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.produto-imagem::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.02) 100%);
    pointer-events: none;
}

.produto-imagem img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.produto-card:hover .produto-imagem img {
    transform: scale(1.05);
}

.produto-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
}

.produto-titulo {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    color: #2d3748;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    min-height: 3em;
}

.produto-descricao {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.produto-cta {
    display: inline-block;
    background: linear-gradient(135deg, #3483fa 0%, #2968c8 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    margin-top: auto;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 131, 250, 0.3);
    position: relative;
    overflow: hidden;
}

.produto-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.produto-card:hover .produto-cta {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 131, 250, 0.4);
}

.produto-card:hover .produto-cta::before {
    left: 100%;
}

/* ===================================
   Footer
   =================================== */

.site-footer {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3483fa, #2968c8, #3483fa);
}

.footer-text {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
    letter-spacing: 0.3px;
}

/* ===================================
   Responsive
   =================================== */

@media (max-width: 768px) {
    .produtos-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }

    .page-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .site-title {
        font-size: 24px;
    }

    .site-logo {
        font-size: 28px;
    }

    .produto-imagem {
        height: 220px;
    }

    .produto-preco {
        font-size: 26px;
    }

    .nav-link {
        font-size: 14px;
        padding: 8px 16px;
    }
}

@media (max-width: 480px) {
    .produtos-grid {
        grid-template-columns: 1fr;
    }

    .site-main {
        padding: 30px 0 40px;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}
