/* Estilos para cards de produtos - Garantir consistência visual */

/* Line clamp para truncar texto em múltiplas linhas */
.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* Garantir que os cards tenham altura consistente */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 460px;
    max-height: 460px;
}

/* Imagem do produto - altura fixa */
.product-image {
    width: 100%;
    height: 192px; /* h-48 */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 0.75rem;
    overflow: hidden;
    flex-shrink: 0;
}

/* Conteúdo do produto */
.product-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5rem;
    margin-top: 0.75rem;
    min-height: 0;
}

/* Título do produto */
.product-title {
    color: #101518;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.25;
    height: 2.5rem; /* altura exata para 2 linhas */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Descrição do produto */
.product-description {
    color: #5c748a;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.25;
    height: 2.75rem; /* altura generosa para 2 linhas */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Preço do produto */
.product-price {
    color: #101518;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1;
    margin-top: auto;
}

/* Informação da loja */
.store-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

.store-label {
    color: #5c748a;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.25;
}

.store-tag {
    display: inline-flex;
    height: 1.75rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

.store-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

/* Tags de pagamento */
.payment-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    min-height: 1.5rem; /* min-h-6 */
}

.payment-tag {
    display: flex;
    height: 1.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background-color: #dcfce7;
    color: #166534;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    flex-shrink: 0;
}

/* Botão de compra */
.buy-button {
    display: flex;
    height: 2.5rem; /* h-10 */
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background-color: #101518;
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25;
    margin-top: 0.75rem;
    width: 100%;
    flex-shrink: 0;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.buy-button:hover {
    background-color: #2a2a2a;
}

/* Espaçador para manter consistência */
.spacer {
    height: 2.5rem; /* h-10 */
    margin-top: 0.75rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .product-card {
        min-height: 420px;
        max-height: 420px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-title {
        height: 2.25rem; /* altura exata para 2 linhas em mobile */
        font-size: 0.875rem;
    }
    
    .product-description {
        height: 2.5rem; /* altura generosa para 2 linhas em mobile */
        font-size: 0.75rem;
    }
}

/* Fallback para navegadores que não suportam line-clamp */
@supports not (-webkit-line-clamp: 2) {
    .line-clamp-2 {
        max-height: 2.5em;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
} 