/* Catálogo Moderno - Layout Profissional */

/* Layout principal do catálogo moderno */
body {
    background: #f1f1f1;
    min-height: 100vh;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
}

/* Header profissional com gradiente escuro */
.catalogo-moderno-header {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    color: white;
    padding: 4rem 0 3rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

/* Logo do iv:Card */
.ivcard-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-image {
    height: 50px;
    width: auto;
}

.ivcard-logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.ivcard-logo .play-icon {
    width: 12px;
    height: 12px;
    background: #e74c3c;
    clip-path: polygon(0 0, 0 100%, 100% 50%);
    margin-right: 8px;
    margin-top: -8px;
    margin-left: 2px;
}

.ivcard-logo .brand-text {
    letter-spacing: -0.02em;
}

.catalogo-moderno-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.catalogo-moderno-title {
    font-size: 3.2rem;
    font-weight: 700;
    color: white;
    text-align: center;
    margin: 0;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.catalogo-moderno-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin: 1rem 0 0 0;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

/* Barra de pesquisa elegante */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 1rem 6rem 1rem 1.5rem;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 0;
    font-size: 1.1rem;
    background: transparent;
    color: white;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    outline: none;
    border-bottom-color: white;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.search-btn {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.clear-search-btn {
    position: absolute;
    right: 72px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.clear-search-btn.show {
    opacity: 1;
    visibility: visible;
}

.clear-search-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

/* Filtros rápidos */
.quick-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    z-index: 1;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.filter-chip {
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(0,0,0,0.1);
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-chip:hover,
.filter-chip.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-1px);
    border-color: transparent;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.stats-container {
    text-align: center;
    margin: 1rem 0;
    color: #666;
    font-size: 1rem;
}

.loading-container {
    text-align: center;
    padding: 3rem;
}

.no-results {
    text-align: center;
    padding: 4rem;
    color: #666;
}

.no-results h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #333;
}

.no-results p {
    font-size: 1.1rem;
    opacity: 0.8;
}

.load-more-container {
    text-align: center;
    margin: 3rem 0;
}

.load-more-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Grid de Cards Profissionais */
.catalogo-moderno-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
    justify-items: center;
}

/* Quando há apenas 1 card, centralizar melhor */
.catalogo-moderno-grid:has(.catalogo-moderno-card:only-child) {
    grid-template-columns: minmax(320px, 400px);
    justify-content: center;
}

/* Fallback para navegadores que não suportam :has() */
.catalogo-moderno-grid.single-card {
    grid-template-columns: minmax(320px, 400px);
    justify-content: center;
}

/* Quando há poucos cards (2-3), ajustar layout */
.catalogo-moderno-grid.few-cards {
    grid-template-columns: repeat(auto-fit, minmax(300px, 350px));
    justify-content: center;
    max-width: 800px;
}

.catalogo-moderno-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    padding-bottom: 10px;
}

.catalogo-moderno-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    backdrop-filter: blur(2px);
    z-index: 1;
}

.catalogo-moderno-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

/* Header do card com badges */
.card-header {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
    display: flex;
    gap: 0.5rem;
}

.verification-badge {
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.action-btn:hover {
    background: white;
    transform: scale(1.1);
    color: #e91e63;
}

/* Avatar profissional */
.avatar-container {
    position: relative;
    padding: 2rem 1rem 1rem;
    text-align: center;
    z-index: 3;
}

.card-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    margin: 0 auto;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: 50%;
    margin: 0 auto;
    font-size: 24px;
    border: 4px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.online-indicator {
    position: absolute;
    bottom: 1.5rem;
    right: calc(50% - 40px + 10px);
    width: 16px;
    height: 16px;
    background: #4CAF50;
    border: 3px solid white;
    border-radius: 50%;
}

/* Conteúdo do card */
.card-content {
    text-align: center;
    flex-grow: 1;
    z-index: 3;
    position: relative;
}

/* Botão discreto para copiar link */
.copy-link-btn {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
    opacity: 0;
    transform: translateY(8px) scale(0.9);
    transition: all 0.25s ease;
}

.catalogo-moderno-card:hover .copy-link-btn {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.copy-link-btn:hover {
    border-color: rgba(255, 255, 255, 0.9);
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .copy-link-btn {
        opacity: 1 !important;
        transform: translateY(0) scale(1) !important;
    }
}

.card-name {
    font-size: 2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
    margin: 0;
}

.card-description {
    margin-bottom: 0.5rem;
}

.description-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.creator-location {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Ícones de contato */
.card-contact-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    z-index: 3;
    position: relative;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.contact-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    background: #5a6fd8;
}

.contact-icon.whatsapp {
    background: #25d366;
}

.contact-icon.whatsapp:hover {
    background: #1da851;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.contact-icon.location {
    background: #e74c3c;
}

.contact-icon.location:hover {
    background: #c0392b;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.contact-icon i {
    font-size: 18px;
}

/* Footer do card */
.card-footer {
    padding: 1rem 1.5rem;
    z-index: 3;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    position: absolute;
}

.catalogo-moderno-card:hover .card-footer {
    opacity: 1;
    transform: translateY(0);
}

.primary-btn {
    width: 100%;
    color: white;
    border: 1px solid #efefef;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    background: none;
}

.primary-btn:hover {
    transform: translateY(-2px);
}

/* Preview do card - REMOVIDO */

/* Responsividade */
@media (max-width: 1200px) {
    .catalogo-moderno-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .ivcard-logo {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .catalogo-moderno-title {
        font-size: 2.5rem;
    }
    
    .catalogo-moderno-subtitle {
        font-size: 1.1rem;
    }
    
    /* No mobile, manter botões sempre visíveis */
    .card-footer {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
    
    .catalogo-moderno-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .search-container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .quick-filters {
        gap: 0.3rem;
    }
    
    .filter-chip {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .catalogo-moderno-header {
        padding: 3rem 0 2rem 0;
    }
    
    .ivcard-logo {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .catalogo-moderno-title {
        font-size: 2rem;
    }
    
    .catalogo-moderno-subtitle {
        font-size: 1rem;
    }
    
    .search-input {
        padding: 0.8rem 2.5rem 0.8rem 1rem;
        font-size: 1rem;
    }
    
    .search-btn {
        width: 35px;
        height: 35px;
    }
    
    .card-avatar {
        width: 60px;
        height: 60px;
    }
    
    .avatar-placeholder {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }
    
    .card-name {
        font-size: 1.1rem;
    }
    
    .description-text {
        font-size: 0.9rem;
    }
}

/* Preview específico para catálogo moderno */
.catalogo-moderno-preview * {
    margin: 0;
    padding: 0;
}

.catalogo-moderno-preview #ivcard-template {
    width: 400px !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
    transform: scale(0.3) !important;
    transform-origin: top left !important;
}

.catalogo-moderno-preview .ivcard-item-icone:hover {
    transform: scale(1.1);
}
